by utopianism · 2d ago · 0 comments
Its performance is pretty bad for most things that aren't in that set of operations, including some stuff one might expect a "graph database" to be really good at, based on the name. Like, worse than Postgres at some of the graphy stuff. (To be fair, this take is years old, but unless they totally re-engineered the fundamental way it represents its data, or expanded its memory use by a multiple more than its already very-high demands to store supplemental, differently-structured copies of the data... I don't see how it could have changed much)
Their marketing folks liked to snag non-technical (or unwary technical) people with corporate buying power by being like "when you think about it all your data is a graph! So clearly you need a graph database!" but employing it as a database of record outside very narrow use cases was a bad idea (at least back when I was looking at it). Unless you were dealing with some pretty unusual data (and not much else) it was much better-suited for querying a supplementary, ephemeral dataset, if you had extremely graph-heavy queries of the type it was good at to run, on large graphs (on small ones, hell, just use sql)
Cypher's great, though. I came away from my encounter hoping never to be stuck on a project where someone above me'd been fooled into adopting Neo4j, but I'd definitely not mind working with Cypher again in some other context.
Incidentally, by far the best overall database for the requirements of the system I got stuck using it on would have been... sqlite. And I don't mean one of those hipster use cases where you use it for something that'd traditionally use Postgresql or whatever, I mean it just straight-up would have saved them so much money getting them features they paid to build for free. Way, way more than the almost-nonexistent benefits Neo4j provided for their use case (I did also have insight into another project we were working on for them that also got stuck with Neo4j and also absolutely did not need it, didn't base my negative opinion on my project alone; the amount of time burned on the back half of that project on bugs that'd never have happened at all on a SQL database of almost any kind, was large, mostly to due to their having a really poor set of available data types, made even worse by weak transaction support, at least beak then)
A guy in our client's organization who seemed to be their main allegedly-technical cheerleader for neo4j and appeared to be one of those guys who's always going to one conference or another rather than doing actual work informed me that I'd regret it if I didn't go deep on graph databases, like it'd really hurt my career because that was The Future. Like my dude I've seen this song and dance a couple times before. SQL man. SQL is eternal. Your shit's definitely a fad, and you're a victim of professional liars (salesmen and marketers). I'm not even happy about that, necessarily, that's just how it is. The parallels to how caught up he was in the marketing was so similar to predecessor database fads that it was uncanny. Also this database had like no features so I pretty much exhausted my exploration of it in a week or so, LOL, not like there was even anything to learn... wonder how that guy's doing these days, got a great title and still mostly attending conferences for pay and misleading teams, I bet.
Their use case would max out in hundreds-of-thousands of nodes and edges per client (with most being in the 5-figures) and OK you might want to mix those together in one master database for a bunch of reasons but they wanted to be able to run the whole thing on-premises with local data storage on client sites so they weren't dependent on an Internet connection, and to share full datasets over [name omitted] dropbox-alike file storage service, so in fact they did not want to do that (later ingestion of the datasets to some other store for, ah, research purposes was surely among their goals, but that's separate and doesn't at-all need to inform how the data's represented while in use for its primary purpose).
They needed sqlite. Could have served it from a potato. Performance for some operations they needed would have been a multiple faster, others, slower, but so fast you'd still miss it if you blinked because the datasets were so small. A solid 50% of our development timeline would have evaporated into free money for them. LOL.
But "it's graphs" (so's everything, according to neo4j salesmen) so "must need a GRAPH database".
Same client insisted we needed GraphQL for this because graph and were frequently confused and incredulous when I repeatedly explained to them that it's actually not an especially good fit for the kinds of graph queries and datasets they had, just because that word's in the name. Like it'll work but not by leveraging any special features other than its ability to return tabular data, it was gaining us nothing but I just kept having to refer them to official docs explaining why no, it was not getting us anything graph-related "for free" and was actually adding extra work.
Which ones?
> employing it as a database of record outside very narrow use cases was a bad idea
Why would you ever use a database *outside* of it's use case? Neo4j is a graph database, for graph solutions.
> unless they totally re-engineered the fundamental way it represents its data
Sounds like you are talking about block format? Which is a complete re-engineering of the storage engine, has been in Neo4j Enterprise Edition for three years, and was released for Community edition a couple weeks ago. https://medium.com/@david.pond/a-faster-foundation-for-neo4j...
> SQL is eternal. Your shit's definitely a fad
20+ years and counting since this was first uttered. Since then we've also seen wide column, document store, time series, the list goes on. You could store timestamps in Postgres and perform date arithmetic. Postgres can also store JSONB, so why do we even need Mongo or Cassandra when we can just dump a blob into a single field. /s
Lots of databases are useful, while not being a great choice for a primary, general datastore.
Every new one that comes along, the marketing department tries to sell it as the best general datastore, because pretending that's true increases the TAM and can score you some sales with people who aren't savvy.