3 ms·
To JS developers' credit, writing modern JS in many ways already is like writing a distributed system. Even if you stay fully client-side, you have bits of cod
by xg15 4y ago
To JS developers' credit, writing modern JS in many ways already is like writing a distributed system.
Even if you stay fully client-side, you have bits of code that are running in different parts of the browser and you have to marshal data back and forth between them. Many web API functions are really RPC calls into a different browser process.
JS has has primitives like channels, promises or async/await to deal with those.
At least there might be some ways how you could use those as as building blocks for an RPC system which lets you handle the three problems better.
- CipherThrowaway 4y agoThe client-server relationship is distributed but the intra-browser stuff is just async IPC. Writing robust clients against remote APIs requires considerations around retries, failover, idempotency and read/write consistency. It seems to me that distributed patterns in pure client code are thin on the ground and limited to things like CQRS and Sagas.
- pragmatic 4y agoIt's not like, it is a distributed system. With PWAs web apps can and do work offline or work limited network. There's a whole series of problems this is useful for.