10 ms·
EdgeDB: EdgeQL
- anotherhue 5y agoThe actual website: https://www.edgedb.com/ https://www.edgedb.com/ Apache 2 license: https://github.com/edgedb/edgedb https://github.com/edgedb/edgedb
- rad_gruchalski 5y agoWhat makes this product an “edge” database?
- no_circuit 5y agoPresumably it refers to edges in an object graph [0]. EdgeDB seems to be currently deployed as a management, schema, and graph-to-sql translation layer for PostgreSQL. [0] https://www.edgedb.com/blog/edgedb-a-new-beginning#edgedb https://www.edgedb.com/blog/edgedb-a-new-beginning#edgedb.
- 1st1 5y agoCorrect!
- methyl 5y ago> Note that this SQL query is not very efficient. An experienced developer would rewrite it to use subqueries Anyone care to explain why is that? I thought the query plan should be the same for JOINs and subqueries.
- RedCrowbar 5y agoThere is a difference in how large a set `array_agg` would need to process, since `LEFT JOIN` may produce a very sparse relation and NULLs still have to be scanned over.
- karmakaze 5y agoIt's not a database meant to run on the 'edge'. I'm guessing it's a graph database built on the PostgreSQL codebase. > EdgeDB is a relational database that stores and describes the data as strongly typed objects and relationships between them. > EdgeDB is built on top of PostgreSQL, inheriting all its core strengths: ACID compliance, performance, and reliability.
- 1st1 5y agoHah, I'm not sure how our dev staging URL ended up on HN :) Here's a direct link to the documentation page about EdgeQL: https://www.edgedb.com/docs/edgeql/index https://www.edgedb.com/docs/edgeql/index. EdgeQL, the query language of EdgeDB, is a very interesting piece of tech. It's a new, strictly typed query language, that aims to surpass SQL in querying power. Functional in its nature it was designed to be composable and easy to learn. Happy to answer any kind of questions. EdgeDB itself is almost ready for its 1.0 release, stay tuned. The GH link: https://github.com/edgedb/edgedb/ https://github.com/edgedb/edgedb/ // Disclaimer: I'm a co-founder & CEO.
- default-kramer 5y agoWow, EdgeQL looks amazing! I've spent a good amount of time looking into SQL alternatives and building my own, and this is the only one that feels like "I must try this!" (Too bad my current project has no need for a DB; now I have a dilemma...) > You can run EdgeDB as a query engine on top of an externally hosted Postgres instance or let EdgeDB manage Postgres for you under the hood. This is excellent. Allows me to use EdgeDB for the majority of my application, but still treat it as a "plain old Postgres DB" when needed.
- 1st1 5y agoAlso feel free to play with EdgeDB in your browser with our interactive EdgeQL tutorial: https://www.edgedb.com/tutorial https://www.edgedb.com/tutorial
- your_challenger 5y agoWhen will EdgeDB be production ready? Also will it handle large scale deployment with Fail-Over and Replication?
- 1st1 5y agoWe plan to release 1.0 in a month or two. The upcoming beta 3 (in 1-2 weeks) will be the last beta before the RC. That said, EdgeDB is already stable and solid thanks to the amazing Postgres that we're building it on top of. It's definitely ready now to play with and learn.
- 1st1 5y ago> Also will it handle large scale deployment with Fail-Over and Replication? Built-in support for that is coming, but it's already possible to run EdgeDB on top of Amazon RDS, for example. Ultimately EdgeDB is built on top of Postgres, so it will support replication and fail-over and many of the existing deployment strategies.
- Aeolun 5y agoDo you ever intend to replace it with a custom backend? Just asking due to the article yesterday that said the only way to start is with an abstraction over an existing RDBMS, but could potentially evolve later.
- 1st1 5y agoUnlikely
- your_challenger 5y agoFor me to use EdgeDB with RDS I would need to compile it [1]. But I don't think this is recommended usage of EdgeDB and there isn't enough documentation on using EdgeDB with an external postgres instance. I see that I could use: edb server --postgres-dsn But I guess you'll release more docs on using EdgeDB with external instances soon, maybe before 1.0 release. [1] https://www.edgedb.com/docs/internals/dev https://www.edgedb.com/docs/internals/dev
- mirekrusin 5y agoHey, after 1 minute of looking at it, it looks very interesting (composable etc), especially after reading recent sql rants like [0] [0] https://news.ycombinator.com/item?id=27791539 https://news.ycombinator.com/item?id=27791539
- 1st1 5y agoThanks! You can also read our own rant here: https://www.edgedb.com/blog/we-can-do-better-than-sql https://www.edgedb.com/blog/we-can-do-better-than-sql (We can do better than SQL, it was on the front page of HN a couple of times).
- p2hari 5y agoOk, this comes at a right time.. I was just starting a new project and considering Neo4j. I think it is unfair to compare it to Postgres but the EdgeQL make it look like the nested queries are easy to execute and comes with graphql support too. SO are there any pointers to how much production ready it is? How does it compare to raw SQL queries and nested queries? thanks. Also could not find much on authentication and authorizations. are there any pointers/
- 1st1 5y agoEdgeDB is very close to be production ready. We will release 1.0 in a month or two and we're based on Postgres, so the hardest part of storing the data reliably is there already. EdgeQL queries are typically way shorter than corresponding SQL equivalents. You can see comparisons and benchmarks here in this blog post: https://www.edgedb.com/blog/edgedb-1-0-alpha-1 https://www.edgedb.com/blog/edgedb-1-0-alpha-1 Authentication currently is very basic. We plan to have a relatively short release cycle, so in 3-4 months after 1.0 we'll have more robust access control, including read/write policies of individual types and their properties/links.
- continuational 5y agoHmm 'select' before 'filter'. This is one of the things that's clunky in SQL; you have to select what you want before you know what you have.
- historyloop 5y agoIt's interesting that you know SELECT being first is clunky, without understanding why. SELECT in SQL is clunky because it comes before FROM and JOIN. Do you see FROM or JOIN anywhere here? No. The collections you're selecting from are literally written before the fields you select. The real WTF for me is this claims to be a relational database and you can't join seemingly.
- 1st1 5y agoI replied to another similar comment here: https://news.ycombinator.com/item?id=27795685 https://news.ycombinator.com/item?id=27795685
- continuational 5y agoThat seems a bit snarky to me? In any case, the collection you're selecting from is presumably the filtered one, not the original one. Or am I misunderstanding the semantics?
- ricardobeat 5y agoYou select the collection here, then specify the fields. The opposite of SQL.
- aeaa3 5y agoThe tech looks impressive and interesting. How will you guys make money? As a prospective user, what are the chances of being rethinkdb'd?
- 1st1 5y agoCloud & enterprise solutions. There are a few reasons why RethinkDB failed; there's an excellent blog post written by the founder. I think there are many areas where we are quite different: - We are building on top of Postgres, so we are not investing too much time into the hardest technical problems like creating robust DB storage and query planning/execution engines. - Instead we focus our time on designing proper high level APIs, the EdgeQL language, migrations, and the DX. - Yet still, EdgeDB is a relational DB; it's strictly typed and fast. Which is still what the majority of companies want.
- historyloop 5y ago> EdgeDB, a relational database with strongly typed schema Relational database without relational algebra wouldn't be useful, would it? So... uhmm. How do we join? There's no JOIN statement.
- 1st1 5y agoI replied in another comment: https://news.ycombinator.com/item?id=27795685 https://news.ycombinator.com/item?id=27795685
- PostThisTooFast 5y agoThat's not a title. Come back when you can write something descriptive.
- xarope 5y agowould you be able to use EdgeQL to introspect an existing postgresql database and run queries on it? Asking as I have a project ongoing where I don't really have the time to recreate everything in EdgeDB, but wouldn't mind spending a few hours to check how the query language works compared to SQL.
- 1st1 5y agoNo, this isn't supported, sadly. We might support this mode eventually, but the ETA is unknown.
- xarope 5y agoWould you have any documentation on how to install EdgeDB and connect to an existing postgresql database then? From browsing the current documentation, I can't seem to find anything similar to sqlalchemy's: meta = MetaData() meta.reflect(bind=someengine) users_table = meta.tables['users']
- kvdmolen 5y agoLooks interesting. How does it compare to Dgraph? Both in features and in performance?
- ekianjo 5y ago> The easiest and preferred way to install and set up the EdgeDB server is using our command-line tool. On the main page. I wish devs stopped giving command line instructions that execute remote bash scripts without any way to look at what's happening under the hood. It's a recipe for disaster, and really, really bad practice.
- 1st1 5y agoEverything is open source and we explain what the command will do. And on the Install page there are manual installation instructions + we have a docker image. How else can we improve things?
- Aeolun 5y agoWhat I really like about Prisma et al is that they provide me with a native client. I don’t have to think about my queries as strings, I have autocomplete for everything that can possibly be part of the select/delete/update (in typescript at least). Now that I’ve gone there I don’t think I can go back, even if this looks otherwise amazing.
- vosper 5y agoAgreed, Prisma with TS is really nice. I’ve recently been using Blitz, which integrates Prisma and Zod (amongst other things) and it feels like so much of the old webapp plumbing is either now gone or is practically writing itself through autocomplete.
- 1st1 5y agoYeah, we'll have it all for EdgeDB too.
- Aeolun 5y agoBlitz feels like beta software, but I agree it makes the whole React single page development experience really nice.
- vosper 5y agoYeah, Blitz does feel beta-y, in a true sense: a few things are still being polished, but it’s pretty stable and v1 seems to be close to done. I’ve only been using it for a personal project, but since the fix for the Material UI recipe (which I think was actually related to an npm behavior) I haven’t run into a single bug. I suspect that’s because it seems like a lot of Blitz is unifying some really good established libraries into a framework. It’s not written from the ground up.
- rishav_sharan 5y agoWill EdgeDB have a http api? I want to use postgres with a serverless app but there are practically no options
- 1st1 5y agoIt already has it. In addition to the binary protocol you can shoot GraphQL or EdgeQL queries at it via HTTP.
- rishav_sharan 5y agoThanks. I am very interested now.
- neximo64 5y agoWould be cool if you could also run normal postgres alongside
- RedCrowbar 5y agoYou can. It is possible to point EdgeDB at an arbitrary Postgres cluster and have it coexist with other databases.
- neximo64 5y agoDo you have more info about how to do this?
- your_challenger 5y agoYou can run a normal postgres DB alongside EdgeDB. You can use a regular Postgres cluster and create your pg databases in it and at the same time point EdgeDB to the cluster docker run --name edgedb -e EDGEDB_PASSWORD=secret \ -e EDGEDB_POSTGRES_DSN='...' \ -d edgedb/edgedb RedCrowbar answered this question here [1] [1] https://news.ycombinator.com/item?id=27815177 https://news.ycombinator.com/item?id=27815177
- kuraja 5y agoI'm thinking about learning SQL. Would it be a sane decision for me to learn EdgeQL instead, as my first introduction to databases?
- cgio 5y agoIf I were you, I would rather start with SQL. It is so pervasive that it would never be a skill you regret having. I don’t believe you would regret learning EdgeQL either, or any skill for that matter, but in terms of priority I would suggest SQL would be a safer bet and help you contextualise other querying approaches down the way.
- 1st1 5y agoIf you decide to go the EdgeQL route first we have some great learning materials, e.g. here's a book about EdgeQL: https://www.edgedb.com/easy-edgedb https://www.edgedb.com/easy-edgedb
- option_greek 5y agoIts not very clear if rust is supported. Please please support rust bindings :)
- 1st1 5y agoNot yet. Our CLI is written in Rust and we have crates for the protocol and other pieces, but their APIs are not stable yet. It is on our roadmap though.
- deleted 5y ago[deleted]
- NicoJuicy 5y agoEdgedb seems very nice. Is there any plan currently to give back to postgress? If this is already the case, was there anything going upstream from your team?
- kaelwd 5y agoDoes it have something like SQL's select * or do you always have to specify which keys you want?
- 1st1 5y agoWe plan to implement splats soon, e.g.: SELECT User { ...User }
- renszarv 5y agoWhy did you choose Python for your servers implementation language?