Live data from Hacker News

Dropbox-as-a-Database

blog.opalang.org

21–30 of 34 posts

Re: Dropbox-as-a-Database

#23

is this part of the app open-sourced? it's a great idea.

You can find the source code here : https://github.com/cedricss/server-monitor/

The list of commits is interesting: https://github.com/cedricss/server-monitor/commits/master

And also shows its really a one-day app!

Re: Dropbox-as-a-Database

#24

I've used .json files in place of a database before on a read-only site. It worked very well. I do believe that we over-engineer some times and use databases when flat files will do just fine.

Using sqlite as the "this is just an idea" phase positions you better for scale-out/build-up if it becomes necessary. Helps keep your head straight but doesn't slow you down.

I say this as someone who worships Crockford for inventing JSON.

I've seen too many projects get fucked hard because they used flatfiles.

Edit: Seriously though, managing synchronization/atomic changes to flatfiles manually is a Bad Idea (TM).

It's somewhere up there with, "I have a performance problem. I'll use pthreads!" Now you have 1,02-SEGMENTATION FAULT problems.

Re: Dropbox-as-a-Database

#26

I've used .json files in place of a database before on a read-only site. It worked very well. I do believe that we over-engineer some times and use databases when flat files will do just fine.

You're not alone. Guess which famous tech website uses flat files as a database? Hint: orange header, heirarchical comments...

Re: Dropbox-as-a-Database

#27
post #4

It seems rather generous to call this a database. It's files on a filesystem. The lack of any kind of transactional consistency guarantees (Dropbox is notoriously awful at this), and the lack of any sane mechanism for querying this "database" means that it's just "data", not a "database".

Transactions are not a requirement for databases, and querying is the domain of the DBMS, not the database itself.

You're quite right. I think my complaint was that it reduces the definition of "database" to "anything that is used to store data", rather than the database being the json file(s) themselves, at which point we have degenerated to about the same terminological point where it would be reasonable to call saving CSV or MS-Access files into a Dropbox folder "Dropbox-as-a-Database", which seems an unhelpful label, if nothing else.

Re: Dropbox-as-a-Database

#28
post #4

It seems rather generous to call this a database. It's files on a filesystem. The lack of any kind of transactional consistency guarantees (Dropbox is notoriously awful at this), and the lack of any sane mechanism for querying this "database" means that it's just "data", not a "database".

I think he calls it "database" because it is strongly integrated with the database syntax of the Opa language. You can declare and use this "dropbox-database" just like a Mongo one, independently of the notion of safe-ness of the database.

Consistent with the complaint leveled against my previous comment, I should think that this is really consistent with the DBMS syntax of the Opa language

Re: Dropbox-as-a-Database

#29
post #3

It is a fun exercise to do these kinds of things. Obviously, they are very inefficient. But that is not the point! Perhaps there's some residual value related to some Dropbox feature (such as automatic replication) that makes this useful . But that is countered by getting your account rate-limited by Dropbox. I wonder, is there some way to create a key-value store out of any physical or virtual object that can store…

A Minecraft game would make a hilarious database. The fact that it's probably pretty trivial to CRUD it programmatically outside the Minecraft client by manipulating save files is a great bonus.

Start using the DB. If you get bored enough you can examine the data physically in-game.

Re: Dropbox-as-a-Database

#30
post #3

It is a fun exercise to do these kinds of things. Obviously, they are very inefficient. But that is not the point! Perhaps there's some residual value related to some Dropbox feature (such as automatic replication) that makes this useful . But that is countered by getting your account rate-limited by Dropbox. I wonder, is there some way to create a key-value store out of any physical or virtual object that can store…

A Minecraft game would make a hilarious database. The fact that it's probably pretty trivial to CRUD it programmatically outside the Minecraft client by manipulating save files is a great bonus. Start using the DB. If you get bored enough you can examine the data physically in-game.

Why not go full-hilarity and not touch the save files? The DB API simply performs clicks, keydowns, and mouse movements on the game client, so you see the character moving on the screen. I guess you would have to initially read the save file though, to know what you start with. Would be hilariously slow.
Post reply on HN