Live data from Hacker News

Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

github.com

1–10 of 66 posts

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#2
I currently don't see the similarity to SQLite, that is implied in the readme.

SQLite stores all its data (every table and all entries in tables) in one single file. JSONlite does store every JSON entry in one particular file, as much I saw. So, JSONlite uses the file system (one directory) as data storage -- in contrast to SQLite!

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#3
If you are going to invoke the sacred name of 'sqlite', then I expect to see rock-solid code and quality testing.

Instead, there are two tiny tests, and I found a couple of issues in 30 seconds of looking at the code.

EDIT: I should prove my point.

1) Race condition on calculating uuid (obviously won't be too serious for a good uuid implementation)

2) No check that file is written successfully.

3) No check when json is invalid, just silently swallowed, or filesystem full.

4) Makes one file a json file, will scale terribly past a few thousand json files.

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#4

If you are going to invoke the sacred name of 'sqlite', then I expect to see rock-solid code and quality testing. Instead, there are two tiny tests, and I found a couple of issues in 30 seconds of looking at the code. EDIT: I should prove my point. 1) Race condition on calculating uuid (obviously won't be too serious for a good uuid implementation) 2) No check that file is written successfully. 3) No check when json…

Create some issues and pull requests and help out. :-)

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#5

If you are going to invoke the sacred name of 'sqlite', then I expect to see rock-solid code and quality testing. Instead, there are two tiny tests, and I found a couple of issues in 30 seconds of looking at the code. EDIT: I should prove my point. 1) Race condition on calculating uuid (obviously won't be too serious for a good uuid implementation) 2) No check that file is written successfully. 3) No check when json…

Good point on 2 and 3. Should just involve checking the previous commands return code before echoing the uuid. I'll get that patched up and ship a new version in a bit.

Not sure what you mean exactly by 1 and 4 though.

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#7
I think your title might not be the best;

* Serverless typically implies something accessible from more than the host you're on

* It's not zero configuration, there's at least 1 configurable parameter (albeit with a sensible default)

* I'm actually not even clear why this is a document store limited to JSON, other than you're piping it though a JSON python module.

Having done some things like this in the past, as you continue, you'll probably want to create subdirectories based on the first N characters of the UUID, but I'm not sure you wouldn't get considerably more value of just putting your json blobs into an AWS Dynamo table.

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#8
post #7

I think your title might not be the best; * Serverless typically implies something accessible from more than the host you're on * It's not zero configuration, there's at least 1 configurable parameter (albeit with a sensible default) * I'm actually not even clear why this is a document store limited to JSON, other than you're piping it though a JSON python module. Having done some things like this in the past, as you…

There is already an issue about supporting sharding https://github.com/nodesocket/jsonlite/issues/15.

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#9

This is 200 lines of bash using the file system as a database. The term document store implies a database which this is not. How is this different than just writing files to a directory? What are the use cases of this project?

"A database is an organized collection of data". I think writing files in a directory with a convention falls in that category.

[1]https://en.m.wikipedia.org/wiki/Database

Re: Show HN: JSONlite – A simple, serverless, zero-configuration JSON document store

#10
Serverless means anything really, a cli app is now serverless. I didn't know I was writing serverless applications for 20 years then. Serverless was already a bad buzz word, it gets more and more meaningless by the hour.

By the way sqlite just got support for JSON :

https://www.sqlite.org/json1.html

off-topic : I'd like to see more books on database implementation for beginners. Of all the crap load of CS books that come out year after year this is a matter with very little literature, as most papers on the subject are research papers. Seems like an excellent topic to teach distributed programming.

Post reply on HN