4 pointsby vfssantos4 months ago1 comment
  • billconan4 months ago
    I will just use sqlite to save json. it supports indexing and query
    • vfssantos4 months ago
      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.

      • billconan4 months ago
        I attempted to develop my own embedded mongodb on top of sqlite in rust:

        https://github.com/shi-yan/hoardbase

        but then I realized that the sql syntax isn't too bad compared to mongodb, so I abandoned this idea.

        For my next project, I will still use sqlite. My app will be electron based, I will probably write rust based nodejs modules.

        • vfssantos4 months ago
          Thanks for sharing your project! Hoardbase looks really interesting - I appreciate you taking the time to link it.

          Your experience of starting with the MongoDB API idea and then deciding SQL syntax was sufficient is really valuable feedback. It makes me wonder about the specific pain points that initially drove you toward a MongoDB API, and what aspects of SQL ended up working well enough for your needs.

          For document-oriented workloads, did you find any particular patterns or techniques with SQLite's JSON functions that made working with nested data and arrays more manageable? Or did you end up modeling your data differently to better fit SQL's approach?

          I'm also curious about your decision to use Rust for the implementation. Was that primarily for performance reasons, or were there other factors that led you in that direction?

          Thanks again for sharing your experience - it's really helpful to hear from someone who's explored this space before.