Live data from Hacker News

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

github.com

31–40 of 66 posts

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

#31

Earlier quoted context omitted.

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.

With 1, you are trusting the directory returned by uuid will be unique --it should be, but it might not be, in particular if it is based on time and I run in two threads. With 4, I find once a directory has about 100,000 files in it, things get bad, from the simple (ls * won't work) to the nastier (git starts using huge amounts of space, you'll hit github's size limit even though all your files are quite small).

In all fairness, I find this (and only this) criticism unsubstantiated/nitpicky.

Many systems are relying on the statistical improbability of 32-hexdigits uuid collision (name-dropping one - Disque).

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

#32

Hint: If you really want to use your filesystem as a database (and don't mind the haters, there's a long and storied history of doing just this), make sure you break it up into many subdirs usually based on the first few characters of the uuid. Example: ./jasondir/aa/bb/cc/aabbccdd You won't like what happens when you put 100k files in one directory.

hasn't the file system improved to the point where this is less of a problem?

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

#35
post #28

Wouldn't you be much better off storing JSON in a SQLite table?

How would that be an improvement? you still wouldn't be able to readily query and build indexes? Or does SQLite handle that now?

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

I really don't get why this made it to HN first page, especially when plenty of other show HN demonstrate way more efforts than writing a short bashscript yet never make it. I suspect it has to do with the number of buzzwords that were inserted into the title.

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

#36

Hint: If you really want to use your filesystem as a database (and don't mind the haters, there's a long and storied history of doing just this), make sure you break it up into many subdirs usually based on the first few characters of the uuid. Example: ./jasondir/aa/bb/cc/aabbccdd You won't like what happens when you put 100k files in one directory.

hasn't the file system improved to the point where this is less of a problem?

Even if it's running on a filesystem that deals with it well, standard utilities like 'ls' don't deal with it well, as the default behavior is to sort. You end up having to look up obscure options, like 'ls -U' to disable sorting.

You can also run into issues like "Argument list too long". ARG_MAX is larger on linux than it used to be, but it's pretty short on older kernels. I assume similar issues might exist on other operating systems.

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

#37
post #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…

No, serverless database is not a recent buzz word, but a term frequently used to describe DB that doesn't need a separate server running to which clients connect: compare MySQL, PostgreSQL against BDB, LMDB, SQLite.

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

#38
post #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…

[deleted]

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

#40
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…

Zero configuration usually means it doesn't have to be configured, not that it can't.
Post reply on HN