4 ms·
In-memory databases do make sense for some things if you can: a. easily dump data as code and b. construct good key-value maps. Incidentally, doesn't HN run as
by Robin_Message 16y ago
In-memory databases do make sense for some things if you can: a. easily dump data as code and b. construct good key-value maps.
Incidentally, doesn't HN run as a stoarray?
- jimbokun 16y ago"Incidentally, doesn't HN run as a stoarray?" This is the very first thing I thought of. The guy seems to have re-invented S-expressions in VB (or whatever ASP language that is). Data is code, code is data. Load it into memory, write it to a file. With 500 products, maybe even 1000 products, maybe even 10000, or more, this might work fine, in terms of performance, at least. Now, my critique of the code is that there are no apparent abstractions, which means that it will be very difficult to change anything about the implementation later. All of the hard coded indices from 0 to 7 are very opaque and very brittle. However, change those to JSON-ish dictionaries and add some slightly higher level abstractions, and you could get something that looks a little more like the interface to a MySQL database. So what I find interesting about putting this as a WTF with no explanation is that the author just seems to assume that everyone should use a relational database for every problem without thinking about how good a fit it is for their specific problem. At least, without more explanation it's hard to tell what exactly the assumed critique is.
- Rickasaurus 16y agoI've got to say, it's nice to see HN users who look a bit deeper.