I love it! I like how it's just pure php and purposefully built for small size I/O needs. The documentation also looks great, so I might actually give it a try. Has anyone used it?
On a side note, for small projects everyone preaches about serverless js functions and firebase, but a can't imagine how sleekdb + a micro framework like slim + modern php 8 is actually bad
Glad you liked it! Totally agree with you on that! Yes, I am using it in production for a company. Few are just landing pages with simple admin interface to update data on the fly.
I like the small codebase with no dependencies - I imagine it's easy to start using. Also appreciate the extensive query interface and documentation.
It reminds me of NeDB in Node.js world, which has proven its worth to me on several occasions when I needed a simple JSON-based database for a small(ish) audience, with mostly read operations (which are served from memory). They're running for literally years with no issue at all.
I'm very skeptical of this. It doesn't seem like something that could scale. By accessing database files through PHP, you are begging for race conditions while serving multiple requests simultaneously. At best, you will hit write-errors while other requests are working with the file. SQLite has a good explanation of the problem here: https://sqlite.org/faq.html#q5
You are correct, it is suitable for small-medium traffic websites with less write operations and more read operations. We have a simple file locking mechanism to handle this situation. The caching part makes it a static storage by combining multiple files per query.
I built something like this in the run up to my first major engineering job. I embraced NoSQL after for a while. But ultimately types won, and then tools that work with them.
If you are using this or something like it I strongly encourage connecting your type system to it with common JSON Schema tools so it at least lets the rest of your tools find out what your data model is, even if you haven’t defined it
Fantastic! I will give it a try asap but it looks super easy to get started and the documentation is brilliant. Amazing work! Regarding security, could you please elaborate how sensitive data can be stored (and protected)?
If you want to store password then use php password_hash function, otherwise all the data will be stored as plaintext JSON files. We don't have any data encryption implemented yet.
@rakibtg - not sure if it's just me (Windows, Chrome) but if I scroll down manually and then click any of the links on the left I end up in the middle of the section, rather then at the top. So go to the site, scroll down a little using the scrollbar, click "Delete Data" on the left. You are now in the middle of the "Delete Data" section. Looks like you show/hide different sections, you should scroll to the top of the section on click.
Besides that it seems rather great, I am going to test it out.
that's super cool! What are everyone's thoughts on using
php for this vs. something like airtable as a db for prototyping? I've been running everything off of Airtable for a while and it's working really well, and my cofounder can work straight in the interface with no problems.
(It's aggressively cached, runs several serverless sites, and I know it doesn't scale, but I'm setup to move to Postgres if I need to, but so far I haven't...)
Somewhat related. I wrote a very very simple tool called JSONlite (https://github.com/nodesocket/jsonlite) which is pure bash and stores JSON in flat files. It does not support nested querying, or querying really of any sort besides the primary id. So, it technically is more of a K/V.
On a side note, for small projects everyone preaches about serverless js functions and firebase, but a can't imagine how sleekdb + a micro framework like slim + modern php 8 is actually bad