Live data from Hacker News

What if serverless meant no backend servers?

subzero.cloud

121–130 of 138 posts

Re: What if serverless meant no backend servers?

#121
post #26

I'm always glad to see people experimenting with different approaches to building and deploying apps. That said, the general idea of this Serverfree approach doesn't appeal to me. On any given day, I'll use 4 different devices. I need my data to synchronize seamlessly. I wouldn't use a program (in-browser or traditionally installed application) unless I can synchronize that data either by storing files in a Dropbox-l…

Is there anything stopping you from also syncing an encrypted copy of your data to a central server to be synced down or your other devices? It doesn’t appear so.

A websocket between all your devices and a server (or even webrtc between devices) could achieve this in parallel.

Re: What if serverless meant no backend servers?

#122

Looking at this with an open mind, I'm curious what benefits running SQLite in WebAssembly with a proxied web worker API layer gives compared to using localStorage or something similar. * Using SQL has clear benefits for writing an application. You can use existing stable tools for performing migrations. * Using SQLite in a filesystem offers many advantages w.r.t performance and reliability. Do these advantages trans…

* localStorage is small, volatile, OPFS is big/durable

* main thread db vs main thread worker db:

  - firstly, sqlite with OPFS has to run in a webworker

  - even if it was possible to run in main thread, this approach allows for a code structure that is similar to a traditional architecture (frontend/backend split) and it's easy to route some request to the web worker while let over request fall through and reach backend server and not needing to worry about that in the "frontend code"

Re: What if serverless meant no backend servers?

#123
post #117

Earlier quoted context omitted.

> While a desirable state for users, isn't users all that matters in the long term?

if your development process is unsustainable, then your users get nothing in the end.

they just need new development methods

Re: What if serverless meant no backend servers?

#125
post #121
post #26

I'm always glad to see people experimenting with different approaches to building and deploying apps. That said, the general idea of this Serverfree approach doesn't appeal to me. On any given day, I'll use 4 different devices. I need my data to synchronize seamlessly. I wouldn't use a program (in-browser or traditionally installed application) unless I can synchronize that data either by storing files in a Dropbox-l…

Is there anything stopping you from also syncing an encrypted copy of your data to a central server to be synced down or your other devices? It doesn’t appear so. A websocket between all your devices and a server (or even webrtc between devices) could achieve this in parallel.

I was going to mention WebRTC! It seems designed for video calling, but there are lots of cool use cases - I recently ran across https://github.com/dmotz/trystero , a dead simple WebRTC library for peer-to-peer multiplayer browser games.

Re: What if serverless meant no backend servers?

#126

These ideas are some of the founding principles of "local-first software": https://www.inkandswitch.com/local-first/ As I like to put it - Local-first is the real serverless. Your user's device is the real edge. I think the future of the web needs to be that the server is optional, we need our data (albeit personal or our companies) to be on our own devices. We are all carrying around these massively powerful devices…

>let use that capability rather than offload everything to the cloud. That costs battery life. With more powerful chips more time can be spent sleeping consuming minimal energy.

What costs more power? Writing to local storage or running the data over the radio and back the next time the app is launched?

Re: What if serverless meant no backend servers?

#127
post #117

Earlier quoted context omitted.

if your development process is unsustainable, then your users get nothing in the end.

they just need new development methods

If you have an idea for a process that could deal with the potential significant extra load caused by many optional updates on the general case, feel free to share.

It can work well and easily when the features are relatively distinct, but as they start to interact it can become a huge burden.

Re: What if serverless meant no backend servers?

#130
post #21

I want this too, there isn’t a great FOSS way to currently do this besides supabase or roll your own unfortunately. For PWA local save/write, try network update, refresh local upon success is the gold standard for data integrity. And for network reading fallback to local cache upon offline is great for UX. I haven’t found good tooling for this yet and i’ve been looking.

I haven't worked too hard on this, but wouldn't SQLite work?

Yes but it’s a lot of code to maintain data integrity between your local store, app state, and networked store. Sqlite is ideal but indexeddb for the browser could work fine too.
Post reply on HN