HNHacker News
TopNewBestAskShowJobs

adamlouis

50 karma · joined July 11, 2018

https://suczewski.com

email: firstname@lastname.com

submissionscomments
adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Thank you! Appreciate it! Glad you noticed some of the details.

I didn't intentionally model the Mongo query language. Some requirements were:

- JSON-based: so I did not have to parse the query

- Easy to extend: so I could add new operators later

- DB independent: so I could swap out SQLite with postgres, mongo, cockroach, duckdb, etc. IF I ever wanted to

- Expressive: so I could do aggregations / group-bys / etc

I considered using more popular standards like the ElasticSearch API but they weren't quite what I wanted. I liked how jsonlogic was basically just an AST. Its primitive structure makes code generation to other DB query languages straightforward.

I started this project with my own "JSON lisp" variant, but then found jsonlogic & used that since mine was _pretty_ close (only lists, no objects).

The top-level fields of my queries look like SQL (select, where, group_by, order_by) - I really like the Honeycomb query UI (https://www.honeycomb.io/query/) - so wanted to be able to support user experiences like that ... but also go further via arbitrary jsonlogic expressions.

adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Nice! The nested explorer you have there is REALLY slick. Great work!

This is something I had been thinking about - when dealing w/ normalized JSON documents, how might I allow exploration of referenced documents? & how might I encode those relationships is some way that's lightweight?

Thanks for sharing.

adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Thanks!

Yeah, jsonlogic does not seem THAT popular. A JSON-based solution that looks like an AST means you can skip query parsing & just do generation. I started this project with my own JSON Lisp DSL before going with jsonlogic.

In either case, I like the idea of being able to swap out arbitrary storage layers - sqlite, postgres, mongo, etc. - while keeping the JSON api.

Had not encountered odata - thanks for sharing!

adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Thanks for sharing! This is great work. Cool to see it's written in Nim!
adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Nice! Thank you!

By implementing the the ES API you may then be able to re-use parts of Kibana, Elastalert & other parts of the ES ecosystem ... could be cool!

adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Nice! Glad it resonated. Never quite sure how a project like this will land.

Thanks for sharing those - will check them out. Interested to see what happens as the size of the dataset grows.

I have not looked deeply, but Typesense[1] seems like another interesting project. Similar to ES or Algolia, easy to self-host, & with a seemingly efficient memory & disk footprint.

[1]https://github.com/typesense/typesense

adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Will look into it - thank you for the tip!
adamlouis··on Show HN: Squirrelbyte – a SQLite-based JSON document server
Thank you for checking it out! Glad to hear it might be useful.

Will take a cleanup pass soon - was excited just to ship it.

adamlouis··on Show HN: Track Spotify plays, trends and discover weekly (article and app)
Hi! About 6 months ago, I built a Spotify integration to:

- save all plays

- save all “Discovery Weekly” playlists

- save top songs & artists of the last month, 6 months, and all-time & observe how each changes over time

This weekend, I wrote an article with some technical descriptions & learnings. Sharing my work here!

Thanks!

app link: https://spotify.suczewski.com

adamlouis··on Show HN: Returnif – the conditional return statement
Thank you! Definitely a bit overboard.

`returnif` is fun, but there's certainly value in the simplicity of restricted, opinionated syntax (e.g Go).

adamlouis··on Show HN: Returnif – the conditional return statement
Thanks! Agreed on the cost/benefit.

Was mostly a fun project to prove out & build a new idea. No plan ahead for this, but always new projects in the pipeline!