D1: Our SQL database
blog.cloudflare.com
D1: Our SQL database
1–10 of 241 posts
Re: D1: Our SQL database
#2Its perfect for content type sites that want search and querying.
Anyone from CF here, is it using Litestream (https://litestream.io) for its replication or have you built your own replication system?
I assume this first version is somewhat limited on write performance having a single "main" instance and SQLite laking concurrent writes? It seems to me that using SQLite sessions[0] would be a good way to build an eventually consistent replication system for SQLite, would be perfect for an edge first sql database, maybe D2?
Re: D1: Our SQL database
#3This is really interesting, it's (basing it on SQLite) exactly what I was expecting CloudFlare to do for their first DB. Its perfect for content type sites that want search and querying. Anyone from CF here, is it using Litestream ( https://litestream.io ) for its replication or have you built your own replication system? I assume this first version is somewhat limited on write performance having a single "main" inst…
2. We are going all in on databases and D2 sounds like a cool name for something...
Re: D1: Our SQL database
#4Maybe they will announce a Hashicorp competitor in their next reveal. Who knows.
Re: D1: Our SQL database
#5One thing I hope to see in the future is a better product filtering experience. When I worked on a jquery product filter I realized the DOM bloat was the main problem.
I wonder if D1 can help devs build instant product filtering pages that don’t require the reload like microcenter or Newegg does.
Re: D1: Our SQL database
#6https://tailscale.com/blog/database-for-2022
Re: D1: Our SQL database
#7This is really interesting, it's (basing it on SQLite) exactly what I was expecting CloudFlare to do for their first DB. Its perfect for content type sites that want search and querying. Anyone from CF here, is it using Litestream ( https://litestream.io ) for its replication or have you built your own replication system? I assume this first version is somewhat limited on write performance having a single "main" inst…
1. No, it's not built on Litestream. Operating a massive network and shuttling data around is kind of our thing. 2. We are going all in on databases and D2 sounds like a cool name for something...
Re: D1: Our SQL database
#8Not a expert on DOM or JavaScript so be kind ;) One thing I hope to see in the future is a better product filtering experience. When I worked on a jquery product filter I realized the DOM bloat was the main problem. I wonder if D1 can help devs build instant product filtering pages that don’t require the reload like microcenter or Newegg does. IE https://www.newegg.com/p/pl?d=hdmi+cable&N=-1&SortType=8
It’s not DOM bloat… it’s too many records. If you’re building a DOM node for each record, that’s bloat, but you still have the problem even if the results are stored in a JSON object and dynamically queried on the client side.
So, for each new filter or new query you need to hit the server anyway. If that’s an asynchronous query that returns a json blob or a full refresh, IMHO, it doesn’t really matter that much. Either way, you’re rebuilding a large portion of the DOM with the new results. The only thing that skews things in favor of an async call is if the rest of the page is so heavyweight that reloading the page takes a significant amount of time. This is probably what you’re taking about.
Having a SQLite db close to your worker node really isn’t going to affect this problem all that much.
Re: D1: Our SQL database
#9Also, I wonder how hard it will be to migrate existing PostgreSQL databases and SQL statements. Of course, I understand if Cloudflare is focused on greenfield applications.
Re: D1: Our SQL database
#10Any current or planned support for existing ORMs, such as Prisma or TypeOrm? Also, I wonder how hard it will be to migrate existing PostgreSQL databases and SQL statements. Of course, I understand if Cloudflare is focused on greenfield applications.