I’m really excited this was finally shared. A little backstory. This framework is the manifestation of ideas that Mike developed at Mixtent, a startup that produced three products in 2 years and eventually got acquired by Facebook.<p>The biggest advantage this framework has over other more traditional ones like RoR or Django is being able to model product ideas as a graph in code abstractions. This enables product engineers to rapidly prototype ideas (no need to interact with the DB), and jump into features built by other engineers (the node-edge API is standardized).<p>While the first product Mixtent built used more traditional django-style models, it resulted in features that became hard to manage over time. Each model had its own DB table and making changes was painful. The next two were built using a similar graph framework on top of CodeIgniter, and the benefits to prototyping speed and ease-of-understanding were visibly felt by all engineers (including myself).
Wait, so this is a graph-like layer on top of an SQL database? I don't quite understand this claim:<p>"DB API is designed for fast performance. No implicit joins or other magic, but expressive enough for nice readable code."<p>When you have a database with a node, edge, and node_data (EAV) tables.<p>What am I missing? How would I get a node and its properties including edges, other nodes, etc. without joining other tables or flat-out magic?
Recently I had some related ideas, although from a completely different background. Here is what I would have done differently:<p>1) Implement other storages. Although databases are a natural part of web applications, a direct storage in files and/or directories may be justified. Also, for most applications the full dataset fits easily in the RAM on modern systems.<p>2) Keep full history. Or provide for this possibility at least. Adding history features to classic database models becomes cumbersome quickly, but for a simple schema it may be provided directly by the framework. This provides for a great audit log if something went wrong. Probably to be disabled if really unwanted and/or storage size is an issue.<p>Regarding the different background: Although most people want graph databases if they don't want to enforce a certain schema, my desire is the exact opposite. I want more constraints, data integrity as much as possible. I want more than can be easily reached even in PostgreSQL with user-defined functions, such as constraints across foreign keys. So a separate checker is needed, and I believe graph structure with plain links provide a good, simple base to define a constraints framework upon it.
I love seeing new, interesting work done with PHP. I'm particularly interested in ORMs so I'll definitely give this a try. Thanks for sharing.
The Readme talks about a bank account.
How would transactional update look?
If I want to transfer $20 from user A to user B, the following four things need to happen transactionally:<p>- make sure user A has the necessary funds (reserve)<p>- put money into user B account (debit)<p>- take money from user A account (credit)<p>- commit<p>At the same time, nobody else must make an operation where they see partial results, and we can't let two operations reserve the same funds in parallel.<p>I don't see how this use case is supported, but that may just be because I don't know where to look?
Wow, I am glad that graph stuff is really starting to take off, for all the JavaScript people out there I wrote <a href="http://github.com/amark/gun" rel="nofollow">http://github.com/amark/gun</a> .<p>Great work, I really hope you help usher in the era of graphs!