929 karma · joined September 20, 2012
It's not easy to write generic code.
False, even if there is graph in its name it's not restricted to graph, and that what is great about it compared to things like RDF and SPARQL. Backend data can be stored in key/value store, document, files, RDBMS or whatever. And you will still be able to make it work. AFAIK you write a "translation" layer that interprets a pseudo-JSON file into your data.
AFAIK GraphQL is not good at querying recursive datastructure, it's better at "neighborhood" kind of query, so you can traverse Foreign Keys, but not "indefinitely".
> graphql allowed you to run complex operations in the backend without fetching each individual node on the client.
Yes.
> I clearly missed something?
IDK. For me, GraphQL basically it's an RPC interface particularly suited at "reading" data.
> And if you can also elaborate on why SPARQL and RDF were a major failure, and how GraphQL is different/better?
GraphQL is not tied to particular data layout. I don't know much of SPARQL and RDF actually and don't know why they failed. I am just guessing.
That said, GraphQL it "just" another query language, it's "just" another DSL targeted at querying datastructures. As something that was thought a long time, focused to solve a particular issue.
frontend: reactjs
Actually I started @ https://github.com/amirouche/socialite
Because I can :)
1. a GNU/Linux (Ubuntu or Debian)
2. urxvt or terminology, I use always the same commnands (cd, ls, git, emacs, find, ag)
3. emacs with elpy, rainbow-delimiters and web-mode using monokai theme
4. i3 window manager
5. weechat
And I am looking for a proper email client (webmail or whatever).
1) python with aiohttp framework with asyncpg for the backend serving REST and WebSockets, with a posgresql database, memo (a pure python clone of redis), celery (but I might switch to something lighter) and sentry. On the frontend I use, reactjs (but I might move to preactjs because of the license) with a custom redux-like framework built on CRA with async/await support and optional ImmutableJS dependency. I call it the 'django2' stack.
2) GNU Guile Scheme with fibers (which brings asyncio, but still lakes websocket support) for the backend. Database is built on top of wiredtiger glued with Guile again using EAV pattern that I call the feature space (it's somewhat similar to MUMPS and datomic, some call it RDF store). On the frontend, I use a simiar framework but written in Scheme powered by BiwaScheme (I plan to move to RacketScript). That stack is missing a lot of features (queues for background job scheduling, proper pooling of database connections, websockets). I call it the 'mono' stack, because everything lives in a single processus. NO GIL FTW!
None of them support true isomorphic (or universal) web app. Even mono stack which only rely on scheme doesn't support it. That said I can render backend side the same thing that frontend renders and achieve the same goal without the elegance.
Another example: same language, new framework: In a Python web app, we needed to have websockets. But at that time Django had no real websocket support. But there is future proof framework that does: aiohttp! Also one might argue that you can use old django with websocket using another process. But it leads to a more complicated architecture. We want to keep monolith the app as long as possible/sane.
I wanted to build a database in a dynamic language. While others have succeed to do so by layering their DB on top RDBMS (like EdgeDB or Datomic) I went lower level and built a datomic like DB with GNU Guile Scheme using wiredtiger (now mongodb storage engine). The reason for that is that Guile doesn't have a Global Interpreter Lock (GIL). Using the same design in Python would simply not be possible. I did not benchmark, but I don't think it's possible for a single thread DB to be faster than multithread DB. In this chance changing language made the project possible.