EdgeDB 2.0
edgedb.com
edgedb.com
That's useful, I hate copying code snippets alongside line numbers and other weirdness
[1] edgedb instance start --auto-restart --foreground -I <your instance>
edit: ps I love the direction y'all are heading. EdgeQL feels more like relational-algebra notation which I always felt fit better with modern programming languages.
I've implemented select columns, join tables and where statements. Still having more to work on (e.g. order by, group by, aggregate function, and more important, the readme)
- https://github.com/tantaman/conflict-free-sqlite
I wonder if EdgeDB provides any utilities to make this already perhaps? Or community has to build some kind of CRDT software that builds on top of EdgeDB that will do local syncing? Maybe that's planned to be tackled for 3.0?
We are streaming EdgeDB 2.0 launch event right now, join here: https://www.youtube.com/watch?v=1jloGHV31Ow
How do folks deal with the latency of not being able to run EdgeDB on the same server as their managed Postgres service (e.g. RDS)?
Full disclosure: I work on SpiceDB[0] which is a fine-grained permissions database. SpiceDB can also be backed by Postgres, but we form a distributed cache with our database instances so that trips to the datastore (e.g. Postgres) are avoided at all costs.
That said, we're working on our cloud, all hands on deck. There you wouldn't have any additional latency.
According to the roadmap:
- Python, Javascript/Typescript, HTTP are done
- Go, Rust, Ruby, Java, and .NET are planned
Looks like it hasn't been updated now that Rust is out. But seems like those are the languages planned.[0] https://github.com/edgedb/edgedb-go
[1] https://www.edgedb.com/docs/clients/http/index#edgeql-over-h...
I wonder if you might wanna join efforts on building your cloud offer with guys at https://neon.tech/ (i'm not affiliated, but I'm waiting for your cloud offering)
We'll be working on tightening and adding the necessary security mechanisms to allow exposing the DB directly to web in 3.0 and onward.
You can already hack this by defining access policies and writing an EdgeQL proxy server that authenticates incoming requests, sets the appropriate global, and forwards the query to the database. There's a Python/Flask implementation of this pattern here[0].
We also have a JavaScript example app demonstrating access policies to simplify authorization logic using Next.js/getServerSideProps[1] and a user management platform you may have heard of called Clerk[2] :)
[0] https://github.com/edgedb/edgedb-examples/tree/main/flask-pr...
[1] https://github.com/edgedb/edgedb-examples/blob/main/nextjs-a...
> That said, EdgeDB, the implementation, and EdgeQL, the language and the model, are different, and we encourage research into alternative EdgeQL implementations. We'll be releasing the formal EdgeQL spec and the graph-relational model whitepaper to make this easier.
Has the mentioned spec and model whitepaper been released?
What's the current approach for triggers, subscriptions, etc?
Can you perform raw SQL queries through your client or do apps still need to use a separate PG client for that?
Regarding subscriptions -- polling is the current best (and unfortunate) answer. We'll keep researching this area.
> Can you perform raw SQL queries through your client or do apps still need to use a separate PG client for that?
Not yet. We plan to eventually allow read-only SQL queries to go through EdgeDB for plugging existing analytical tools/BI. But the demand from the community for this feature has been so far pretty low.
It's interesting you say this. This is the reason I passed on EdgeDB. If it was additive to SQL (you can use EdgeDB optionally) that would be great. Im not sure people would ask for it, but given the option everyone would use it.
Makes sense since most read queries can (probably) be performed already with EdgeDB.
But my point about executing raw SQL was regarding having an escape hatch for features like listen/notify, etc.
I guess the solution is that for now apps will need a second PG client. Do you anticipate any problems with that approach?
Does EdgeDB implement object-level access control on top of PostgreSQL's RLS? Have you run into any tricky edge cases? Did you have any particular inspirations for the design (e.g. Google Zanzibar)?
I’m currently using a graph database (dgraph) mostly so I can easily query complex relationships), and I’m wondering whether EdgeDB has similar performance due to how it stores data?
my understanding of EdgeDb is that it stores everything in a single table, and there’s an underlying graph structure. does this give added performance on complex queries?in other words, does EdgeDB perform complex queries involving multiple relationships better than an equivalent complex Postgres JOIN query? how does the performance compare to the average graph database for queries involving complex relationships? has it been performance tested on complex queries?
The performance of deep hierarchical queries with EdgeQL will be better than SQL with joins because with joins you'd have an unnecessarily wide denormalized set of rows. EdgeDB instead aggregates data in nested arrays via subqueries. The performance is great.
Repos: the first repo is the database itself; the second is our CLI -- tools for migrations, dump/restore, repl, etc.
The EdgeQL is the first graph-based query language that is more intuitive to me than plain SQL and the local dev experience has been far smoother than pretty much any other db I’ve used to date. Really excited to see this project mature.
Only downside (ok more philosophy choice ?) is that it seems quite strict on schema ?
Ive been exploring none-strict schema dbs xtdb or solr. And for unexplored problems (are they not all like that ?) schemaless has been an interesting tool in my toolbox (ymmv)
Scemaless does sound like an 'absolute' and the opposite is probably 'struct-to-table-mapping' which is okish in a dynamic language and downright horrible in my second favourite language Go
I like the query 'language' of EdgeDB but then if you looking for sql alternative (language + methodology wise) look into datalog-like dbs and their query language. Datahike, datalevine, xtdb and of course datatomic. Datalogic-query-lang really offers a nice alternative in my view.
All of the above is not a silver bullet but a worthwhile alternative to at least investigate for your needs :)
Once again Well.done to EdgeDB as a solo or just a dev in general i know how hard it is to release or just get something out there, nevermind opensource
> is that it seems quite strict on schema ?
Yes, it is. But you can use JSON in your schema, we have amazing support for it on all levels (the query language, std library, schema integration, client APIs, etc).
What is the current support level for `scale-out` clusters? I can find a thing or two about high availability [1] and a small set of transaction isolation levels [2], but I'm unable to find detailed information about locking mechanisms and cluster propagation. Is this a documentation problem, is it fully analogous to PostgreSQL or rather something that is still on the roadmap?
[1]: https://www.edgedb.com/docs/reference/backend_ha
[2]: https://www.edgedb.com/docs/stdlib/sys#type::sys::Transactio...
At this point EdgeDB supports Postgres HA passively, i.e. it will react to a failover event in your cluster via one of the documented mechanisms. Support for "active" cluster management is a planned feature too.
Finally, EdgeDB server itself is fully stateless and you can run multiple instances of it in front of the same Postgres cluster. Admittedly, we need to document this better.
Anyway, for others looking into a completely separate deployment, running EdgeDB against a postgres cluster can apparently easily be done using the `EDGEDB_SERVER_BACKEND_DSN` variable in their docker container.
https://www.edgedb.com/docs/guides/deployment/docker#edgedb-...
There would also be some friction as to having to learn this new ORM language and having to rely on it completely whereas if we just stick to SQL and traditional ORM that is more popular (SQLAlchemy and SQLModel) we could more or less achieve the same level of productivity (Relational Classes in SQLModel) and still be close to the PostgreSQL, using SQL when we want to etc.
Again this is not to bash on EdgeDB just saying its rather tough to have to constantly shift attention to the next shiny thing when the boring way is still a solid ground for majority of use cases.
My first impressions were that this is some type of Prisma + Graph/SQL hybrid language but uncertain about introducing more obfuscation for limited productivity gains that I can find.
What I want to see are large established companies using a tech for a while, not startups.
You'll be surprised with how little time it takes to master EdgeQL and how much more you will be able to do with it compared to any ORM in existence or even raw SQL. Give it a try.
Other than that -- use whatever you like best.
The UI editor was fantastic: https://raw.githubusercontent.com/datamosaic/data-sutra-waka...
The query language was imperative in the "fluent" style:
var record = ds.Group.query("name = :1",group).first();
Really psyched about what EdgeDB is doing moving this space forward. The declarative composable query language is a paradigm shift imo — not just a better ORM.
This!
Hope it continues to grow in features and support!
I took a look at the low level stuff, compiled it and tried breaking it and pushing it to the limits. It's quite stable, something that you would expect from a Python Core developer as a founder.
My only concern is that the actual `edgedb-server` CLI isn't documented at all.
`edgedb-server --help` is pretty elaborate, but yeah, we don't have an official page. What kind of info are you looking for?
you may want to check out openziti (open source) to eliminate vpn (while closing EdgeDB server and Postgres server link listeners and open IB FW ports). can be done agentless via sdk, or modified jdbc driver. basic postgres example video here: https://youtu.be/s-skpw7bUfI
disclosure: i run a company that built saas on top of the openziti open source.
One thing I'm excited about is a framework that uses EdgeDB instead of ORM+SQL. This would make the framework itself leaner and lead to writing less code since the db can do so much more!
I know there would be no need to use Django's ORM and migrations if using EdgeDB - but then again I might use EdgeDB and SQLite (for FTS in the near term and mobile/offline in the long term), so maybe Django migrations still helpful there
EdgeDB is of course beautiful but any thoughts on how the Python client might support pep-484 integration? if all the queries are strings, the Python code has no way to know anything about what datatypes the returned records would have, unless you spell it out explicitly for every query which is very cumbersome. You'd need something that looks more like SQLAlchemy's class definitions corresponding to EdgeDB types for that to be possible (that is, something that looks more like a Python DSL/ORM type of thing).
Currently I’m using materialized paths to handle this but it would be awesome if I no longer have to as it’s a bit of a hairball
Options would be:
1. Somehow being able to query underlying postgresql database using traditional postgres FTS queries
2. Something like ZomboDB to bring the data into ElasticSearch or other like PGroonga
3. Ideally there would be some kind of FTS within EdgeDB so no need for another service
SQL schemas are rigid and hard to refactor, does EdgeDB solve this?
I would like to know more about why building a graph db on top of postgres will be better than building a native graph database directly? (With numbers, not "pg is fast")
Anyone remembering object databases and the ODMG standard? It had even a query language called OQL which was an OO superset of SQL.
Fun fact: our schema declaration language is actually a trimmed down DDL syntax of our query language.
I am asking because more and more I see a need for universal type-describing language, one that transcends the programming languages and can be used for various things e.g. specifying DB schemas, code-level invariants, generating network clients to interact with a service, and many others.
It's a passion and I am going around gathering data on such syntaxes and trying to ascertain their viability. Your answer helped.
Feel free to jump in with suggestions, we need feedback from experienced Go devs.
PureORM[0] is this right balance of write SQL, get properly structured data.