Live data from Hacker News

Show HN: EdgeDB 1.0

edgedb.com

201–210 of 332 posts

Re: Show HN: EdgeDB 1.0

#201

I’ll add to the positivity: this is the first time I’ve ever found a “we can do better than SQL” compelling. It’s easy to understand what it’s doing with a variety of known quantities. It solves a difficult problem elegantly. It has 100% overlap with the goals I want it to have. It’s designed to be usable with minimal fuss. It does really a good job of portraying itself as magic (it will be awesome to use) without po…

> I’ll add to the positivity

Thank you!

> Serializable transactions are expensive, and that deserves to be an explicit caveat. Not everyone knows this, and it’s an important thing to put up front.

We've not seen a major difference in our benchmarks (though maybe our benchmarks are wrong :-)). EdgeDB tends to produce very short transactions, so that helps. EdgeDB also knows if your statements are read-only or not, so we have the ability to steer these into a read-only transaction, though this isn't implemented yet.

Re: Show HN: EdgeDB 1.0

#202

Could someone explain what a graph-relational database is? I'm not able to extract a technical definition from the paragraph below: "What is a graph-relational database? EdgeDB is built on an extension of the relational data model that we call the graph-relational model. This model completely eliminates the object-relational impedance mismatch while retaining the solid basis of and performance of the classic relation…

(EdgeDB CTO here) In a classic relational model everything is a tuple containing scalar values. Graph-relational extends the relational data model in three ways: - every relation always has a global immutable key independent of data (explicit autoincrement keys aren't needed) - this enables us to add a "reference type", which is essentially a pointer to some other record (i.e. a foreign key) - attributes can be set-v…

Hi! Thanks for taking the time to engage on HN.

I have a couple of questions around this.

Firstly, what happens to the performance when I have a sizeable resultset of set-valued data?

I've seen similar ideas implemented in the past that look fine for the Movies and Actors or Books and Authors examples but fall apart badly when you query a number of fields (20+) that have sets within them, which can happen on say, a sizeable reference database of marketing information.

Another question: How deep in the graph can I go, and how much circular reference protection is there? E.g. if I query Movie.actors.movies.actors?

I'm interested in graph databases and data modeling and while it offers some convenience I'm always skeptical but hopeful (mostly from having lost a lot of hours) that these problems have been solved sufficiently to keep performance good in practical use cases.

Re: Show HN: EdgeDB 1.0

#203
post #198

Earlier quoted context omitted.

The problem sounds like something that could be solved with a GIST index. EdgeDB doesn't yet have a way to specify the index type, though, mostly because we aren't sure what would be the best way to do it without things becoming too Postgres-specific in schemas.

What do you mean by "too Postgres-specific"? Will you be supporting other DBs behind the EdgeDB interface in the future?

This is not something we plan to do in the near future, but it’s also not outside the realm of possibility. We picked Postgres because of its power, quality and unparalleled extensibility, but we are also very careful to not leak any implementation details into our interfaces.

Re: Show HN: EdgeDB 1.0

#204
Congrats on the milestone! I've been following for a while - awesome to see the progress you've made.

Q: What are your plans for sharding / scale-out?

At Notion, we run ~480 logical schemas spread across ~32 Postgres databases [1]. Our data model [2] (sorry for the blog post spam) has a recursive / graph-like structures, and we make use of columns or jsonb attributes like `{ table: Table, id: UUID }` which sounds like your polymorphic links feature. It seems like EdgeDB's model lines up well with how we already use our database.

I did a quick cmd-f here, on the linked announcement, and in your docs looking for "shard" and "scale" but didn't find any relevant results. Postgres needs a Vitess!

Q: Do you have plans to support EdgeQL embedding or SQLite?

I am always looking for a way to compile "better than SQL" languages down to SQL. I like Datalog in this area because it's a composable way to define relationships/facts/derivations but no one is putting serious business effort to this idea (honorable mention to logica [3]). EdgeQL also fits the bill -- queries aren't logical, but they are composable -- plus looks easier to teach than most Datalog variants.

I took a peek in the repo and saw that a few EdgeQL components are written in Rust [4]; are you considering porting more logic to Rust? That would make EdgeQL much more embeddable - it could run in WASM or linked into an Android/iOS app. My pie in the sky dream is to use a single composable query/logic language to define all my relations and queries, and then compile that stuff so it works the same on both the client, server DB, and data streams (for incremental materialized views, ideally on both client & server).

If EdgeDB had a Lite version that ran on SQLite, we'd be 66% of the way there.

(To get the materialized view bits on the server, a mad scientist might already be able to point EdgeDB at Materialize [5])

[1]: https://www.notion.so/blog/sharding-postgres-at-notion

[2]: https://www.notion.so/blog/data-model-behind-notion

[3]: https://opensource.googleblog.com/2021/04/logica-organizing-...

[4]: eg https://github.com/edgedb/edgedb/tree/master/edb/edgeql-pars...

[5]: https://materialize.com/docs/overview/architecture/

Re: Show HN: EdgeDB 1.0

#205
Looks great, but the example for SQL looks kind of bad. Is that how pg does things? I thought "modern SQL" used CTEs and other fun features, or this that not a thing for pg as much as say snowflake?

Re: Show HN: EdgeDB 1.0

#206

Looks great, but the example for SQL looks kind of bad. Is that how pg does things? I thought "modern SQL" used CTEs and other fun features, or this that not a thing for pg as much as say snowflake?

Yea the SQL example looks like the intentionally made it way worse than it needed to be...

Re: Show HN: EdgeDB 1.0

#207
Poking a bit at the documentation, I see like/ilike but are there plans for text search/trigram capabilities? Recently I’ve been working with lots of different entities that have searchable properties and exploring searching across different elasticsearch indexes to do “JOIN” like operations but have been exploring Postgres (and related) solutions for better “JOIN” support out of the box

Re: Show HN: EdgeDB 1.0

#208

I’ll add to the positivity: this is the first time I’ve ever found a “we can do better than SQL” compelling. It’s easy to understand what it’s doing with a variety of known quantities. It solves a difficult problem elegantly. It has 100% overlap with the goals I want it to have. It’s designed to be usable with minimal fuss. It does really a good job of portraying itself as magic (it will be awesome to use) without po…

> I’ll add to the positivity Thank you! > Serializable transactions are expensive, and that deserves to be an explicit caveat. Not everyone knows this, and it’s an important thing to put up front. We've not seen a major difference in our benchmarks (though maybe our benchmarks are wrong :-)). EdgeDB tends to produce very short transactions, so that helps. EdgeDB also knows if your statements are read-only or not, so…

It’s been a few years so this is pretty fuzzy (though I just jogged my memory re-reading the docs, which are consistent with my recollection)… there are two expenses:

- The overhead discussed in the docs, which is ~negligible for lots of use case and a perfectly reasonable tradeoff for those.

- The overhead of retries, which with appropriate defensiveness can effectively become an indefinite lock in, but undetected by, the client. When automated by an abstraction layer, this can become pathological pretty easily depending on usage patterns.

The most realistic alternatives are to provide a lower level abstraction (eg “I don’t want your guarantees, I want your errors”), or to provide other isolation options (eg “I don’t want your guarantees, I want my errors”). But there may well be opportunities here because EdgeDB knows as much as it does about the schema, and positions itself as a SQL replacement rather than a companion so it can potentially optimize for at least some of those cases at query time.

That sounds complex enough to boggle my mind, but if y’all are up to it I’ll be excited to see how it goes!

Re: Show HN: EdgeDB 1.0

#209
post #5

EdgeDB co-founder Yury here. Ask me anything :) Live launch stream: https://www.youtube.com/watch?v=WRZ3o-NsU_4

Dumb question, how do you exit the shell? I feel like I've scoured the docs and can't find it.

What colin said, or (in every terminal emulator I've used), ctrl-d to send end of file, which will close it.

Re: Show HN: EdgeDB 1.0

#210
post #192

This query language looks really nice! I wish GraphQL were more like this and considered built-in features like where clauses and cursors, instead of having to add those over the top with loose conventions.

GraphQL is great for what it was designed for. It just was never designed to be a querying language with analytical capabilities, like EdgeQL.

Forget analytics, it can't even do pagination. That really limits the benefit of being introspectable.
Post reply on HN