News for hackers. Stuff that matters.
Re:Telefunc: Remote Functions instead of API by xg15 on Sunday October 02, 2022 @03:09AM (#33053667)
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.

Re:Telefunc: Remote Functions instead of API by CipherThrowaway on Sunday October 02, 2022 @04:10AM (#33053963)
The 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.
Re:Telefunc: Remote Functions instead of API by pragmatic on Sunday October 02, 2022 @09:46AM (#33055822)
It'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.