Ask HN: Best Approach for MongoDB-Like Experience in Deno?
I've been building serverless applications with Deno and really appreciate its built-in KV store for simple data persistence. However, I'm finding myself missing MongoDB's query capabilities and document-oriented model.
For those using Deno in production:
1. How are you handling document-based data storage in Deno applications, especially for edge deployments?
2. Have you found any good abstractions over Deno KV that provide MongoDB-like querying (find with complex filters, update with operators like $set/$push, etc.)?
3. What's your approach to indexing and query optimization when using Deno KV for document storage?
4. If you migrated from a Node.js/MongoDB stack to Deno, what was your strategy for the database layer?
I'm considering building a thin MongoDB-compatible layer over Deno KV, but I'm wondering if there are existing solutions or if this approach has fundamental flaws I'm not seeing.
Any insights or experiences would be greatly appreciated!
I will just use sqlite to save json. it supports indexing and query
Going straight to SQLite is a great option! The JSON1 extension is quite powerful (which are now part of sqlite core, right?). Are you using this with Deno currently?
I'm curious about your approach to deployment, especially for edge functions. Do you bundle SQLite with your application, or are you using a hosted solution?
Have you found any good abstractions or libraries that provide a document-oriented API over SQLite in Deno/Node? I'd be interested in how you handle things like nested document queries or array operations with the JSON1 extension in a friendlier manner.