4 ms·
EdgeDB co-founder Yury here. Ask me anything :) Live launch stream: https://www.youtube.com/watch?v=WRZ3o-NsU_4 https://www.youtube.com/watch?v=WRZ3o-NsU_4
by 1st1 5y ago
EdgeDB co-founder Yury here. Ask me anything :)
Live launch stream: https://www.youtube.com/watch?v=WRZ3o-NsU_4 https://www.youtube.com/watch?v=WRZ3o-NsU_4
- j-pb 5y agoHey Yury, Cool stuff! How do you folks solve the large amount of joins that are the result of graph queries? Any worst-case-optimal multi-way-join secret sauce :D? Also, with DBs like Datomic competing in the same area, do you have an immutability/versioning story?
- 1st1 5y agoThanks! The secret sauce is to pack nested shape queries into array_agg-ed SQL subquery. So we never select unnecessarily wide rows.
- kall 5y agoSounds like this is not dissimilar from the GraphQL-to-SQL compiler in Hasura, which also brings out surprising performance for wildly nested frontend queries.
- 1st1 5y agoYeah, indeed, Hasura uses json_agg, which is similar but returns you a JSON string. We use array_agg, so we often avoid data serialization altogether. Our binary protocol just lets the data messages pass through with the original binary encoding. And because we fully control the schema, we can make all sorts of interesting optimizations, like implementing high-perf data codecs on the client side to unpack data fast.
- kall 5y agoYeah, that‘s an appealing idea, if there never even has to be any json. Hasura has the frontend safe API and strong authz going for it. Is that something you might also do, or are you focused on serving the backend? End-user row and column level authz gives me a lot of peace of mind when writing bigger queries.
- boxed 5y agoIs there an eta or public wip of a python query builder?
- 1st1 5y agoOur topmost priority now is launching a hosted version of the product, all hands on deck. Having a proper (and potentially fully type-safe) query builder for Python is literally the next to-do.
- Dnguyen 5y agoHow do we migrate from existing Postgres database to EdgeDB? Can traditional app still access all the relational as before and new app access via EdgeDB? We're making use of existing environment and extending it with our own frontend. I would like to understand how I can mix legacy and new code.
- 1st1 5y agoWe plan to introduce a tool for assisting migration from SQL databases, but at this very moment, the only way to migrate an existing app is to re-create your DB schema in EdgeDB and then write a script to import the data. EdgeDB right now is definitely more geared towards starting new projects with it.
- infogulch 5y agoMaybe if you move all data to be managed by EdgeDB, then create a separate "legacy" schema that just contains views & triggers that forwards queries and mutations to the EdgeDB database.
- mritchie712 5y agoDo you support columnar storage? i.e. to make analytics queries fast.
- 1st1 5y agoNot yet, but theoretically we might support something like Timescale in the future.
- hyuuu 5y agodo you have plans to integrate with prisma? it's almost a DIRECT translation of how the query is expressed in Prisma compared to edgedb. Googling quickly, it seems there is a ticket already. I wonder if this could be a low hanging fruit and a great growth channel since prisma is very popular. https://github.com/prisma/prisma/issues/10210 https://github.com/prisma/prisma/issues/10210
- 1st1 5y agoNot really, there's no point in using prisma with EdgeDB as our own query builder is more idiomatic for our product, faster, and we gape more capable. See also this reply by Colin: https://news.ycombinator.com/item?id=30293544 https://news.ycombinator.com/item?id=30293544
- torartc 5y agoAny plans to have a gui?
- 1st1 5y agoYes, it's in the works!
- torartc 5y agoDumb question, how do you exit the shell? I feel like I've scoured the docs and can't find it.
- colinmcd 5y ago\q or \quit If you get stuck, run \help for a list of commands.
- msully4321 5y agoWhat colin said, or (in every terminal emulator I've used), ctrl-d to send end of file, which will close it.
- sizediterable 5y agoCongrats Sully and thanks for your work on mypy!
- torartc 5y agoThat's interesting, I've always though ctrl-c would close things. I tried so many things like "quit" "exit" ctrl-c "help"
- emj 5y agoCtrl-c cancels running processes, but not shells. When a process becomes a shell I can not say, but if make an infinite loop in the Python repl you can Ctrl-C that loop. $ python >>> while True: ... pass ... ^CTraceback (most recent call last): File "<stdin>", line 1, in <module> KeyboardInterrupt
- nextaccountic 5y agoI have a few questions I can't find after skimming the documentation.. Can someone use Postgres extensions with EdgeDB, like TimescaleDB, PostGIS, Zombodb and Postgres_fdw? How are sum types (called enums in Rust) modelled in EdgeDB? (like Rust's Result). Do I need to define it with inheritance, where each variant inherits from it? What about adding specific syntax for sum types? edit: also, I see there's a WIP custom #[derive] for Rust in https://github.com/edgedb/edgedb-rust https://github.com/edgedb/edgedb-rust - can it store Rust types on EdgeDB? Something like http://diesel.rs/ http://diesel.rs/ or even https://lib.rs/crates/turbosql https://lib.rs/crates/turbosql
- 1st1 5y agoRegarding extensions: we plan to wrap the most popular ones like PostGIS to give them idiomatic EdgeQL flavor. We need to do a bit of work to make that the right way. Sum types can be modeled with inheritance. You can create an abstract base type and use that as target for the links. You can then derive types from it and write polymorphic EdgeQL queries to select/match data. Rust client is still work on progress, not really open to tinkering unless you want to experiment.
- ranguna 5y agoI looked through the documentation and all I could find was how to spin this up locally. How do I run this on the cloud? Do you offer fully managed service to host this or do I need to spin up some compute instances of my own ?
- ranguna 5y agoFound it: https://www.edgedb.com/docs/guides/deployment/index https://www.edgedb.com/docs/guides/deployment/index Can't wait for edgeDB cloud!
- the-alchemist 5y agoWhat advantages/disadvantages does EdgeDB have over Dgraph.io?
- colinmcd 5y agoUnfortunately DGraph is having some serious troubles as a company: https://discuss.dgraph.io/t/quitting-dgraph-labs/16702 https://discuss.dgraph.io/t/quitting-dgraph-labs/16702 Technically speaking though, using GraphQL as a data model is quite limiting: just basic scalar types and a handful of custom types implemented by DGraph (Polygon, etc). By contrast EdgeDB schemas support a much wider range of granular types, constraints, computed properties, link properties, etc. Perhaps more importantly EdgeQL is a full query language with composable syntax, a standard library of functions and operators, for loops, primitive literal manipulations (e.g. string indexing and slicing), the ability to cast values to different types, subqueries, etc. Basically it's a complete query language contrast GraphQL is closer to an ORM in that it really only supports CRUD. I think DQL is marginally more powerful though admittedly I'm not very familiar with it: https://dgraph.io/docs/get-started/ https://dgraph.io/docs/get-started/