7 ms·
Does this mean that you can hack some database storage (w/ sqlite) together on frontend only hosting platforms like Github or Netlify? I think not, but I wonde
by mettamage 7y ago
Does this mean that you can hack some database storage (w/ sqlite) together on frontend only hosting platforms like Github or Netlify?
I think not, but I wonder if some hack is available by virtue of it simply being a file that you can read (and somehow) write to.
The best I came up with: let's say you have a toy project, and you call the Github API and replace the file upon every write. Implementing a read is easier as you know where the file is located. This hack shows that you somehow need write access to get any form of performance out of it, because this hack is super slow.
- aikah 7y ago> Does this mean that you can hack some database storage (w/ sqlite) together on frontend only hosting platforms like Github or Netlify? You can run SQLlite in the client via webassembly therefore open a SQLite file in the browser to query it yes, you just can't write anything in it and expect it to persist somehow on the static hosting service itself. > The best I came up with: let's say you have a toy project, and you call the Github API and replace the file upon every write. Implementing a read is easier as you know where the file is located. This hack shows that you somehow need write access to get any form of performance out of it, because this hack is super slow. No you'll need a server for that, you can't make random HTTP requests to any server in the browser, because of CORS/SAME ORIGIN policies. "SQLite is serverless" is meaningless buzzword. It just means that SQLite is equivalent a flat file where you'd shove some data, just that you can use SQL to query that file instead of having to index data in it yourself.
- giancarlostoro 7y agoYou could make it persist if you have it uploaded somewhere. But then I guess thats not serverless.
- Frost1x 7y ago"Serverless" is a garbage marketing term in general. It sounds sexy to nontechnical management folks who are used to hearing a bunch of expensive costs and the word "server" associated with them in some fashion. From that view, anything that gets rid of those pesky "servers" sounds like a win.
- giancarlostoro 7y agoIt is, I did Azure Functions which is their "serverless" solution. It's either a type of CGI 'trigger' which is not as impressive however, another 'function' can be triggered based on Database actions or file uploads in their Blob Storage. So it's just handy if you're all in on Azure, and probably other clouds because you can have code run immediately when events happen for certain services. Outside of that, I find it wasteful. The other buzzword is microservices. I was working a gig that involved running like 10 on a MBP with 16GB of RAM and it froze up the laptop. Java is not a language for micro anything, at least not in regards to memory. Was fun but dreadful to work with more than 3 local services at once. The creators of the framework suggested to mock services, but it was just messy to do that too.
- pm90 7y ago> The other buzzword is microservices. I was working a gig that involved running like 10 on a MBP with 16GB of RAM and it froze up the laptop. Java is not a language for micro anything, at least not in regards to memory. Was fun but dreadful to work with more than 3 local services at once. The creators of the framework suggested to mock services, but it was just messy to do that too. This seems like a strange criticism. It appears that you want a full deployment of the platform on your local machine. But Microservices aren’t optimized to run on your local machine; they’re meant to be deployed to kubernetes/docker swarm/mesosphere. I’m also no fan of Java but I don’t think it’s the language that is preventing you here? All speculation since I don’t know the details but it sounds suspiciously like the JVM is getting stuck trying to allocate heap during startup (this is just a guess).
- tracker1 7y agoAnd when you need to interact with other services in a disconnected way? You have to run them somewhere... and local should generally be an option, even if that's to a local single-node (mini)kube cluster. There's nothing wrong with needing to run more than one thing while developing/testing and interacting. There are other options, but it's not a clearly bad approach. That said, I would definitely lean towards Go or Rust myself if given the option (even though I have limited exposure to either) over Java. C#/.Net Core is in the middle imho. Even node works pretty well, but the tons of files thing bugs me sometimes. We're leveraging more node and C# where I work and I definitely prefer node... but for more services I do think that Go and Rust are probably better options.
- ComputerGuru 7y agoI’ve done that, by persisting to an S3 backend.. but there’s no concurrent access and it is all one big race condition.
- filleduchaos 7y ago"SQLite is serverless" is by no means a meaningless buzzword. The term had a clear meaning before it was coopted by the current web dev fad. SQLite does not operate on a client-server architecture the way e.g. MySQL or PostgreSQL do.
- mrmekon 7y agoJust to back that up, it had a clear meaning because -less is a valid suffix to append to English words. When grandma runs out of cookies she is cookieless (when a website doesn't use cookies it is also cookieless). It doesn't have to be "in the dictionary" to make sense in conversation. A quick search of usenet shows "serverless" being used in 1994. It wasn't a term or a buzzword, it wasn't common, it was just English: https://groups.google.com/d/msg/comp.os.linux.misc/r76oNl98C1k/CkuR8EEuYV0J https://groups.google.com/d/msg/comp.os.linux.misc/r76oNl98C...
- filleduchaos 7y agoYes, this is what I was trying to say. It wasn't a thing people would throw around like a buzzword but if someone used it in conversation and especially in context (like the SQLite page, which was written over a decade ago, does) people would understand what you meant.
- qes 7y ago> does not operate on a client-server architecture That was never a common usage of the term serverless.
- filleduchaos 7y agoThe linked article was written in 2007, for your information. Software development didn't begin or end with web dev and the cloud.
- pcr910303 7y ago> Does this mean that you can hack some database storage (w/ sqlite) together on frontend only hosting platforms like Github or Netlify? The meaning of that 'serverless' and this 'serverless' is incompatible, since the web inherently needs servers. I think the best you can do is uploading the SQLite file to a static hosting platform & decoding it in the browser. You can then use it as a file storage with DB capabilities. (Which is what basically really SQLite is.)
- siscia 7y agoI will shamelessly plug myself again. I am the main author of RediSQL [1] and I am about to launch a managed service for it. It will allow to write SQL (SQLite dialect) against an HTTP or Redis protocol, to make thing clearer: https://simplesql.carrd.co/ https://simplesql.carrd.co/ Eventually it will upload your database to an S3 bucket for backup. [1]: https://redisql.com/ https://redisql.com/
- erezsh 7y agoLooks pretty cool! I can imagine it would be useful for data-science projects, if the pricing is right.
- siscia 7y agoWhat pricing would feel right to you?
- erezsh 7y agoI'm far from an expert on such things, but I like the adjustable fixed-price model (like digital ocean). Whenever I see a price like 0.0002$ per hour, I feel like they're trying to mess with my intuition. That's especially applicable to data-science, because you're not worried so much about automatic scaling, you just don't want to be surprised at the end of the month. I don't know if you can match digital ocean's prices (they offer managed postgres, for a fair comparison), but if you can get close then you have a chance.