Closed rglover closed 2 months ago
When doing this, make sure that changes to the json files are reflected in memory (use a watcher). Just found an issue where deleting the log file on disk doesn't clear memory, so the file is rewritten with the full in-memory DB on the next log.
This should be available as the default database option for new Joystick apps. The idea being that you can start playing around without having to install a third-party database. It should be performant enough that you could run a small blog or static site with < 100K posts and never get a performance hit. Technically already there but needs some polish and testing.
I've come up with an alternative plan for this. There will be a database option, but will be more robust and scalable for the majority of apps built w/ Joystick (not just a toy/demo DB). Closing this for now.
I wrote a simple in-memory database not too far back and published it as
@tuskdb/node
. This was mostly to help with Push deployments, but I'd like to incorporate this into Joystick proper.I'd also like to add Tusk as a default DB option for Joystick apps. The only piece missing is a simple server to handle a write queue so the database doesn't fall out of sync. Other than that, it'd be a great option for apps/sites that don't have a ton of data and want an easy to manage/query database (Tusk mimics the MongoDB query language).