14 ms·
EdgeDB 2.0
- endigma 4y agoWill there ever be a full golang library with a query builder or codegen? Something along the lines of entgo perhaps?
- 1st1 4y agoThe Go client implements the full client API, but yeah, it lacks the query building capability. We want all of our client APIs to have it; it's a matter of time, but I don't have a concrete ETA on when we get to it. Hopefully in the coming months. Here's a blog post by one of our users and it has some feedback on edgedb-go: https://divan.dev/posts/edgedb/ https://divan.dev/posts/edgedb/
- RedCrowbar 4y agoYes: https://github.com/edgedb/edgedb-go/issues/182 https://github.com/edgedb/edgedb-go/issues/182 Feel free to jump in with suggestions, we need feedback from experienced Go devs.
- abdellah123 4y agoCongrats. EdgeDB is really a game changer. 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!
- 1st1 4y agoThanks! Depends on what kind of frameworks you like. EdgeDB+Next.js or EdgeDB+Flask are very pleasant to use already. But there's no heavyweight one like Django or RoR just yet.
- canadiantim 4y agoWould you foresee any difficulties using EdgeDB with Django? 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
- 1st1 4y agoI think you'll be able to use Django alright, but half of its value prop is their ORM and admin panel. Both of which you don't need with EdgeDB.
- 1st1 4y agoEdgeDB 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 https://www.youtube.com/watch?v=1jloGHV31Ow
- topspin 4y agoHave you considered cockroachdb as a backend database? I imagine that although the postgresql emulation of cockroachdb isn't 100% complete, the availability story of cockroachdb is miles ahead of postgresql, so perhaps it might be worth whatever adaptations are necessary.
- RedCrowbar 4y agoAlas, we have to wait until CockroachDB becomes a bit more capable SQL-wise. I gave a more elaborate answer in https://github.com/edgedb/edgedb/discussions/3403 https://github.com/edgedb/edgedb/discussions/3403.
- infogulch 4y ago> To realize the full potential of ... EdgeQL efficiently, we must squeeze every last bit of functionality out of PostgreSQL's implementation > 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?
- 1st1 4y agoNot yet. Our reference documentation is extremely thorough though, an implementor of an alternative backend should be able to use it.
- Sytten 4y agoFor the rust client, is there any plan to introduce a query builder and/or generated typing? Currently it feels very sqlx like which is ok for some, but I prefer to have a bit of typing.
- nikivi 4y agoDoes EdgeDB support full text search queries?
- 1st1 4y agoWill be a feature of 3.0 in 6 months. We want to do it right and allow transparent integration with things like elastic, as well as allowing faceted search.
- canadiantim 4y agoYeah I really want to use EdgeDB, but I need full text search somehow. 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
- 1st1 4y agoWe'll be working on (3) soon and maybe (2) shortly after.
- canadiantim 4y agoThat’s great to hear. Option 3 is the best choice too as it allows for the FTS results to also be constrained by the object level security access logic. Thanks for the great work and replies!
- kardianos 4y agoRight 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.
- RedCrowbar 4y agoYes, we'll be adding a way to choose the index type. It's even more relevant now that we've exposed range types.
- divan 4y agoShameless plug of my post on the one-year experience with EdgeDB: https://divan.dev/posts/edgedb/ https://divan.dev/posts/edgedb/
- 1st1 4y agoIt's a great one, Ivan, thank you for writing it! :)
- nikivi 4y agoI want to build local first software backed by EdgeDB. Similar to these tools: - https://replicache.dev https://replicache.dev - https://github.com/tantaman/conflict-free-sqlite https://github.com/tantaman/conflict-free-sqlite - https://aphrodite.sh https://aphrodite.sh 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?
- 1st1 4y agoWe don't have that yet. Maybe it will be possible to bootstrap EdgeDB to run on top of SQLite, but that will be a ton of work and limit the schema/language. Nothing prevents you from just running EdgeDB or even bundling in your app except packaging that can get a bit hairy.
- jitl 4y agoIsn't EdgeDB a python program? I fear python packaging - especially inside a browser or Android device.
- 1st1 4y agoIt's a mix of Python, C, Rust, Cython, etc. It's fully safe-contained though, the fact that there's some Python inside is an implementation detail, you'll never know that as a user.
- jitl 4y agobut, I would know as an app builder if I was running EdgeDB against a local datastore on a user's device, right?
- fnord123 4y agoCouchbase-lite seems to do what you're asking. It's backed onto sqlite. It's more sync based than crdt based afaict.
- bavell 4y agoCongrats to the team, looking forward to testing out the new changes! I'd love to see some examples on non-trivial schemas realized in EdgeQL for reference.
- 1st1 4y agoI'm going to start writing some case studies soon about how various companies use EdgeDB in prod. I'm sure we'll spot some interesting schemas and patterns to share :)
- canadiantim 4y agoWhen do you think it will be possible to migrate an existing Postgres database to EdgeDB?
- 1st1 4y agoAutomatically - we might have some built-in scripts in time for 3.0. You can migrate manually now by writing some sql/edgeql scripts.
- daniel_levine 4y agoAnd I bet the team would help with those migration scripts if you asked!
- 1st1 4y agoObviously :)
- pyentropy 4y agoCurrently watching the launch event! :) 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.
- 1st1 4y agoHaha, thanks so much! `edgedb-server --help` is pretty elaborate, but yeah, we don't have an official page. What kind of info are you looking for?
- siddontang 4y agoEdgeDB seems more popular in NA and Europe. See https://ossinsight.io/analyze/edgedb/edgedb https://ossinsight.io/analyze/edgedb/edgedb
- 1st1 4y agoWow, that's one great dashboard. Thanks for sharing.
- deleted 4y ago[deleted]
- rawoke083600 4y agoLooks good :) 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
- 1st1 4y agoThanks! > 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).
- Rochus 4y ago> extends the relational model to eliminate the objet-relational impedance mismatch Anyone remembering object databases and the ODMG standard? It had even a query language called OQL which was an OO superset of SQL.
- 1st1 4y agoJust a side note: EdgeDB doesn't implement OOP persistence, so it's not an classical object database.
- Rochus 4y agoSure, but I recognize concepts we were dealing with in the nineties; I assume you are aware of ODMG and OQL.
- RedCrowbar 4y agoYes, you can easily put OQL in the list of prior art EdgeQL was inspired by.
- OliverGilan 4y agoI really like EdgeDB so far. Only played around with it for side projects up to this point but with 2.0 and the introduction of Object Level Security I will definiteyl use it in production. 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.
- 1st1 4y agoThank you, we'll keep pushing! :)
- ape4 4y agoTypo: "eliminate the objet-relational impedance mismatch." Well "objet" is French for "object"
- 1st1 4y agoThe fix will be up in a few minutes :)
- jimbost 4y agoI like being "close to the metal" when it comes to database queries. I don't want to learn an ORM api, and neither EdgeQL; I just want to do the thing I already know how to do. PureORM[0] is this right balance of write SQL, get properly structured data. [0] https://github.com/craigmichaelmartin/pure-orm https://github.com/craigmichaelmartin/pure-orm
- colinmcd 4y agoEdgeDB is a long-term effort for a DB/query language that's as intuitive as possible for the greatest number of people. The early adopters are primarily those who are frustrated by ORMs and/or SQL, as you'd expect. But you should pick whatever makes you most productive—if you're already productive and happy with SQL, then that's definitely the right choice! Good luck with PureORM, looks very cool.
- melony 4y agoCan you improve the deployment story for wireguard to match the native PostgreSQL experience? Currently deploying EdgeDB requires setting up multiple VPN connections and environmental variables. Ideally it should be one click, zero-config just like Postgres.
- fghjp 4y agoConceptually it sounds a bit like Semmle's CodeQL? Except a general purpose database rather than one optimised for storing program code.
- 1st1 4y agoI'll check CodeQL out, thanks!
- turtlebits 4y agoBeen 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.
- 1st1 4y agoWould really appreciate it if you could open issues in the main [1] repo and we'll figure it out. We're investing a ridiculous amount of time into our docs and want them to be the best possible. [1] https://github.com/edgedb/edgedb https://github.com/edgedb/edgedb
- upupandup 4y agoim hesitant to bet the horse against something this young. I can see the allure of it but there are just as many equal me-too ORMs on top of postgres. The idea of graph-relational is interesting but I'm not sure the pain points it describes (having to use JOIN) is enough to get me to use EdgeDB since it's not really an issue for most use cases unless you are doing very complex queries across dozens of tables. 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.
- 1st1 4y ago> 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) 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.
- gz5 4y agovery nice. 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 https://youtu.be/s-skpw7bUfI disclosure: i run a company that built saas on top of the openziti open source.
- 1st1 4y agoThanks!
- e-master 4y agoI barely ever used Postgres, but I’m curious - does Postgres support some sort of extensibility, so that something like EdgeDB could be just another plug-in that you could package into Postgres?
- RedCrowbar 4y agoPostgres does have a very elaborate extension system, but it's unsuitable for something like EdgeDB, because we are fundamentally altering the database interface: EdgeQL vs SQL and a different client/server protocol.
- MrTawti 4y agoCongratulation on the 2.0 release. EdgeDB looks awesome. However, I will not advocate using it for any of my clients unless there's a clear path to derisking its adoption. Like all new software products/services there's a significant risk of it becoming abandonware. I'd obviously want EdgeDB to succeed but how can one de-risk adopting it? Would it be possible to somehow "transpile" both queries and modeling scripts to readable SQL? That way, worste case scenario one may fall back on Postgresql without loosing most of previous work. Let me be clear. I really like EdgeDB and obviously want the best for and you guys but I do not think I'm alone in thinking that we need a clear, easy and verifiable way to fallback to Posgresql if/when needed.
- RedCrowbar 4y agoDemangling 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.
- MrTawti 4y agoHow 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?
- RedCrowbar 4y agoYou 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 <your instance>
- deleted 4y ago[deleted]
- 4y ago
- fithisux 4y agoIs EdgeDB suitable for OLAP or is it focused on OLTP queries?
- RedCrowbar 4y agoWith the addition of `GROUP` in 2.0, EdgeDB is as suitable for OLAP as vanilla Postgres is (unless you absolutely need window functions, which we don't implement yet).
- fithisux 4y agoThank you. The more OLAP support the better (at least for us).
- deleted 4y ago[deleted]
- Koffiepoeder 4y agoCongratulations 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]: https://www.edgedb.com/docs/reference/backend_ha https://www.edgedb.com/docs/reference/backend_ha [2]: https://www.edgedb.com/docs/stdlib/sys#type::sys::TransactionIsolation https://www.edgedb.com/docs/stdlib/sys#type::sys::Transactio...
- RedCrowbar 4y agoThat `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 multiple instances of it in front of the same Postgres cluster. Admittedly, we need to document this better. [1] https://github.com/edgedb/edgedb/discussions/3466 https://github.com/edgedb/edgedb/discussions/3466
- Koffiepoeder 4y agoThanks 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-server-backend-dsn https://www.edgedb.com/docs/guides/deployment/docker#edgedb-...
- nikolay 4y agoIt sounds great, but being in Python still gives me a bit of concern.
- RedCrowbar 4y agoOnly 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 https://github.com/edgedb/imdbench
- nikolay 4y agoIt's not a rational concern, but it still is a concern.
- circlingthesun 4y agoI believe these are the people behind the asyncpg Postgres library for Python. We use it daily, thanks :)
- 1st1 4y agoYeah. Also behind uvloop :blush:
- pdimitar 4y agoI actually dig the declarative schema syntax. Is it something separate that one can use in various programming languages, or is it specific to EdgeDB?
- 1st1 4y agoIt's specific to EdgeDB. And part of what makes it great is a tight integration with our query language - EdgeQL. You can specify aliases, default expressions, access policies with arbitrary EdgeQL expressions in your schema. Fun fact: our schema declaration language is actually a trimmed down DDL syntax of our query language.
- pdimitar 4y agoThanks for responding. 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.
- jesuspiece 4y agoCongrats on 2.0 release, this is the first I'm hearing of EdgeDB. As someone who is not a DBA and dreads working w/ complicated SQL queries, this looks like a breath of fresh air. Hope it continues to grow in features and support!
- 1st1 4y agoThanks! I think most people dread working with complicated SQL queries, especially experienced DBAs :)
- themisto 4y agoThanks for sharing. Wasn't aware of EdgeDB and running through the interactive tutorial now. As a general novice when it comes to databases (only ever interacted with pretty mature database systems on the job, never implemented one myself) I've always struggled with a personal lack of intuition when it came to getting comfortable with SQL. So far that's not the case with EdgeDB from what I've seen. I'm excited to dig into this a more and try it out with a personal project I'm working on.
- 1st1 4y agoThank you! Yeah, we spent significant amount of effort making the syntax of EdgeQL logical and predictable. Most of the time, queries can be read from top to bottom easily, even when you don't know EdgeQL.
- laszlokorte 4y agoI just took a look at the quickstart guide. The way the code snippets are implemented is gorgeous. They are syntax highlighted, are formatted/indented exactly as they would be in the terminal, line breaks are indented correctly but css is used to make them easily copy/pastable without including any line numbers/indentation characters. Such a delight. Such focus on details. Makes me really confident in the rest of the project.
- 1st1 4y agoFinally somebody compliments that! Jokes aside, thank you!
- sedatk 4y agoI agree. There was a small glitch where the field year was defined as release_year at the beginning. I wanted to submit a PR but it was already fixed on github version, just not published yet.
- jeshin 4y agoTIL about user-select:none; That's useful, I hate copying code snippets alongside line numbers and other weirdness
- 1st1 4y agoWe use it throughout our UI in all interactive elements. It's super annoying when, say, a button or a navigation element gets accidentally selected for no reason.
- matheusmoreira 4y agoIt's great... Until people start abusing it as an ineffective copy protection mechanism.
- jeshin 4y agopeople can already do that with javascript anyway
- 4y ago
- laweijfmvo 4y agoI couldn’t get past the lack of `SELECT *` support last time I played with this, but looking forward to trying it again!
- 1st1 4y agoWe'll have that in 3.0; we're shooting for a more advanced splat-like syntax. Simple * wouldn't cut it because one of the principals of EdgeQL is to fetch only what you need, aiming for efficiency. That said, our UI repl has autocomplete and a `*` option in it, that expands it to all fields. We might implement something similar in the command-line REPL too.
- HillRat 4y agoInteresting; looks a bit like a modernized CODASYL on top of a Codd model.
- canadiantim 4y agoCould you use efficiently query a page for all its comments? Like an HN page or Reddit page? 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
- RedCrowbar 4y agoEfficient transitive closure (aka link recursion) is something we plan to tackle soon (see https://github.com/edgedb/edgedb/discussions/2634 https://github.com/edgedb/edgedb/discussions/2634 for some discussion on the topic).
- rebataur 4y agoCould you please elaborate, What is the state of using postgresql extensions and PL UDF in EdgeDB? Is it on the roadmap?
- glomyst 4y agoIs there any plans for A Dart Client for flutter
- zzzeek 4y agoHey EdgeDB, SQLAlchemy guy here! 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).
- normanshelley 4y agoWill edgeql_https be supported at some time?
- dustingetz 4y agoQuestions: 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")