Let Your Database Update You with EctoWatch
Elixir allows application developers to create very parallel and very complex systems. Tools like Phoenix PubSub and LiveView thrive on this property of the ...
I have a bit of a problem.
Sometimes I have a hard time implementing a specific solution to a problem. Sometimes I think: “If I just took a step back, I could create a tool which anybody could use to do anything!” If I do it right, nobody will ever need to write a piece of software again!
I’m not there yet, but I’d like to announce a big step on my journey: neo4j-meta_model
neo4j-meta_model
is a tool for managing Neo4j graph databases in Ruby on Rails apps. A big goal of the project is to create something which, while a very powerful tool for programmers, can also be used by non-programmers. This is such an important goal that I created a Rails app (creatively named neo4j-meta_model-app) which you need only to download, install, and run to set up a user-friendly interface for working with Neo4j databases.
neo4j-meta_model
provides a web-based user interface for doing two things:
An administrative section is provided to allow users to define models and associations. Since the neo4j Ruby library’s ActiveNode is used behind the scenes, models and associations correspond to Neo4j’s nodes and relationships. A quick primer:
Models correspond to Neo4j Labels which define entity tyes like User
, Product
, etc… For a model, you can define
name
or price
) with which we are concernedCurrently neo4j-meta_model
supports properties and inheritance but not validation or custom business logic.
Associations specify which nodes are related to a node under consideration. For example, if there are Person
and Article
models with a WROTE_ARTICLE
relationship between them, one might define an articles
association for the Person
model and an author
association for the Article
model. In neo4j-meta_model
, both associations are always defined at the same time.
To the right is the diagram which is shown when creating associations. The diagram represents a pair of associations and changes in real time as the pair of associations is defined. In this case it indicates a one-to-many relationship where:
Song
model has one artist
Person
model has many songs
WRITTEN_BY
relationship type in Neo4j which goes from Songs to People and it is used to find nodes for the associationsOnce the database model has been established users can browse and edit the data itself. A simple CRUD interface is provided for records of the defined models. When a record is found all other records known via associations are displayed (see screenshot to the right which shows a Gist
and it’s associated UseCases
and Domains
). When editing a record properties can be edited but associations can also be selected to create/destroy relationships. For has one
relationships this is done via a simple drop-down, but for has many
relationships an add/remove list interface is provided.
I’ve deployed an instance of neo4j-meta_model-app at http://neo4j-meta-model-app.herokuapp.com/ so that you can play around with it. Let me know what you think and if you have any issues feel free to report them on the project page!
neo4j-meta_model
is a Rails engine, which means it is a Rails application inside a Rails application. It must be given a route inside the host rails application to provide the user interface for the Neo4j database. In the case of neo4j-meta_model-app, this is simply the root (‘/’) route.
The admin side of the engine is built as an Ember.js application, while the CRUD record management side is built with standard Rails server-side rendering (with a touch of Rivets.js and Backbone.js where needed)
The current version of this project is a bare bones starting point. Some things that I’d like to see in the near future:
Elixir allows application developers to create very parallel and very complex systems. Tools like Phoenix PubSub and LiveView thrive on this property of the ...
(This post was originally created for the Erlang Solutions blog. The original can be found here)
with
It, Can’t Live with
out It
(This post was originally created for the Erlang Solutions blog. The original can be found here)
I’ve been using Elixir for a while and I’ve implemented a number of GenServers. But while I think I mostly understand the purpose of them, I’ve not gotten t...
I love Lodash, but I’m not here to tell you to use Lodash. It’s up to you to decide if a tool is useful for you or your project. It will come down to the n...
I’ve mix phx.new ed many applications and when doing so I often start with wondering how to organize my code. I love how Phoenix pushes you to think about th...
What can a 50 year old cryptic error message teach us about the software we write today?
For just over a year I’ve been obsessed on-and-off with a project ever since I stayed in the town of Skibbereen, Ireland. Taking data from the 1901 and 1911...
Recently the continuous builds for the neo4j Ruby gem failed for JRuby because the memory limit had been reached. I wanted to see if I could use my favorite...
A while ago my colleague Michael suggested to me that I draw out some examples of how my record linkage algorithm did it’s thing. In order to do that, I’ve ...
Last night I ran a very successful workshop at the Friends of Neo4j Stockholm meetup group. The format was based on a workshop that I attended in San Franci...
In my last two posts I covered the process of importing data from StackOverflow and GitHub for the purpose of creating a combined MDM database. Now we get t...
In my last post I said I would “bring in another data source, show how I linked the data together, and demonstrate the sort of bigger picture that one can ge...
Joining multiple disparate data-sources, commonly dubbed Master Data Management (MDM), is usually not a fun exercise. I would like to show you how to use a g...
I have a bit of a problem.
When using neo4j for the first time, most people want to import data from another database to start playing around. There are a lot of options including LOA...
Having recently become interested in making it easy to pull data from Twitter with neo4apis-twitter I also decided that I wanted to be able to visualize an...
I’ve been reading a few interesting analyses of Twitter data recently such as this #gamergate analysis by Andy Baio. I thought it would be nice to have a ...
I am he as you are he as you are me and we are all together – The Beatles
When I told the people of Northern Ireland that I was an atheist, a woman in the audience stood up and said, ‘Yes, but is it the God of the Catholics or t...
“Wilkins! Yes! I’ve considered decorating these walls with some graffiti of my own, and writing it in the Universal Character.. but it is too depressing...