[HN Gopher] Show HN: SleekDB - A NoSQL Database made using PHP
       ___________________________________________________________________
        
       Show HN: SleekDB - A NoSQL Database made using PHP
        
       Author : rakibtg
       Score  : 36 points
       Date   : 2021-01-29 14:42 UTC (8 hours ago)
        
 (HTM) web link (sleekdb.github.io)
 (TXT) w3m dump (sleekdb.github.io)
        
       | lioeters wrote:
       | Nicely done!
       | 
       | 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.
       | 
       | https://github.com/louischatriot/nedb
        
       | dmje wrote:
       | Looks ace, will try it out!
        
       | psoots wrote:
       | 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
        
         | rakibtg wrote:
         | 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.
        
           | duhi88 wrote:
           | Seems great for blogs and marketing sites, especially if
           | you've got a CDN in front.
        
       | yagodragon wrote:
       | 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
        
         | rakibtg wrote:
         | 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.
        
       | yawnxyz wrote:
       | 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...)
        
         | rakibtg wrote:
         | That is really cool! Join our discord and we can discuss about
         | it more!
        
       | [deleted]
        
       | offtop5 wrote:
       | Good work, looks like it's built primarily for prototyping so you
       | don't need to spin up a separate mongodb.
       | 
       | Any migration tools for when you need to switch the production
        
       | dubcanada wrote:
       | @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.
        
         | rakibtg wrote:
         | Thank you so much! Will fix it soon :)
        
       | solarteken2001 wrote:
       | 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)?
        
         | rakibtg wrote:
         | 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.
        
       ___________________________________________________________________
       (page generated 2021-01-29 23:01 UTC)