Live data from Hacker News

EdgeDB 2.0

edgedb.com

71–80 of 150 posts

Re: EdgeDB 2.0

#71

Been using EdgeDB for ~6 months and it's great. I do wish the documentation was better (more examples please!). I spent more time than should be necessary trying to figure out simple things like NOT NULL, or how to get a backref for a linked table.

Why's NOT NULL a problem? ("required property" syntax is already in quickstart examples)

Re: EdgeDB 2.0

#72

Earlier quoted context omitted.

Demangling the schema into readable SQL schema is quite trivial already, as it's a fairly normal looking schema, except we use schema object ids in place of names (to simplify renaming). Turning EdgeQL into "readable" SQL is probably also possible, depending on your definition of "readable" and the complexity of a query, though the current codegen does not prioritize SQL readability at all.

That's great regarding the schema! The biggest risk mitigation factor in my estimation would be preserving the schema and the data. Re-writing queries would be annoying but doable if the schema is relatively sane. 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.

Thanks!

Re: EdgeDB 2.0

#73
post #69

Earlier quoted context omitted.

Demangling the schema into readable SQL schema is quite trivial already, as it's a fairly normal looking schema, except we use schema object ids in place of names (to simplify renaming). Turning EdgeQL into "readable" SQL is probably also possible, depending on your definition of "readable" and the complexity of a query, though the current codegen does not prioritize SQL readability at all.

How can one test this. Say I create a model and a slue of EdgeQL queries. How does one get the equivalent SQL (like a EdgeQL command to spit out the equivalent SQL). If this is not possible yet, could we at least have some examples on the EdgeDB website so as to have an idea?

You can run the server in foreground [1] with `env EDGEDB_DEBUG_EDGEQL_COMPILE_SQL_TEXT=1` and observe emitted SQL.

[1] edgedb instance start --auto-restart --foreground -I

Re: EdgeDB 2.0

#74
post #69

Earlier quoted context omitted.

Demangling the schema into readable SQL schema is quite trivial already, as it's a fairly normal looking schema, except we use schema object ids in place of names (to simplify renaming). Turning EdgeQL into "readable" SQL is probably also possible, depending on your definition of "readable" and the complexity of a query, though the current codegen does not prioritize SQL readability at all.

How can one test this. Say I create a model and a slue of EdgeQL queries. How does one get the equivalent SQL (like a EdgeQL command to spit out the equivalent SQL). If this is not possible yet, could we at least have some examples on the EdgeDB website so as to have an idea?

[deleted]

Re: EdgeDB 2.0

#75
post #2

EdgeDB co-founder and CEO here. Ask me anything. We are streaming EdgeDB 2.0 launch event right now, join here: https://www.youtube.com/watch?v=1jloGHV31Ow

If I have an existing Postgres database (on RDS) can I use EdgeDB to query it? Are there tools to generate a schema from an existing Postgres schema? Or is this mainly for green field projects without an existing database?

Re: EdgeDB 2.0

#76
post #25

Earlier quoted context omitted.

We'll be working on (3) soon and maybe (2) shortly after.

Right now, I don't see a way to choose an index type. For instance, while I don't need full text search (stemming, etc), simple trigram (gist_trgm_ops) would be desirable.

Yes, we'll be adding a way to choose the index type. It's even more relevant now that we've exposed range types.

Re: EdgeDB 2.0

#77
post #71

Been using EdgeDB for ~6 months and it's great. I do wish the documentation was better (more examples please!). I spent more time than should be necessary trying to figure out simple things like NOT NULL, or how to get a backref for a linked table.

Why's NOT NULL a problem? ("required property" syntax is already in quickstart examples)

I think the OP meant `NOT NULL` as in nullness check in queries. EdgeQL uses `exists ` to check for existence of data. We have examples in the cheatsheet and elsewhere but it's probably hard to find if you're looking for "NOT NULL" specifically. We'll see about a way to improve the discoverability of this.

Re: EdgeDB 2.0

#79
post #78

It sounds great, but being in Python still gives me a bit of concern.

Only the query compiler is in pure Python and you only hit that once per query, as the compilation result is trivially cached. The hot path is a combination of Cython, C and Rust. We have a suite of benchmarks [1] that show relative overhead of EdgeDB compared to raw Postgres is quite low.

[1] https://github.com/edgedb/imdbench

Re: EdgeDB 2.0

#80

Congratulations with your release! 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]:…

That `sys::TransactionIsolation` doc is outdated, EdgeDB only supports the `Serializable` transaction isolation. See related discussion [1] 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 mul…

Thanks for the answer! It was clear to me that you were using Postgres under the hood, but it was not clear to me that your implementation was completely stateless. As a suggestions, maybe it might be useful to have a documentation page with some general EdgeDB architectural/internal structure information? I think that could be useful for future contributors as well.

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-...

Post reply on HN