[yerpc] support "fetch" as transport


Thanks for building yerpc. Would adding a “fetch” transport be sth you’d consider? I could try to provide an implementation for that.
Also, i was wondering whether “subscriptions” are something that could be supported?


what do you mean by “fetch” transport?
simply one http request per call that would return when the call is finished?

Please elaborate what you mean with “subscriptions”.

What is your use case?

Fetch-transport: exactly, just plain http-requests instead of tunneling everything through a websocket

Subscriptions: basically a request with multiple responses, could be used to subscribe to values changing over time

you can already do that, you can make an pr with an example if you want, I’ll review it.

For deltachat desktop we have also implemented different transports, one over electron-IPC and another one over CFFI/NAPI. We also have a transport over stdio, its experimental for dc desktop, but already works in production for python bots (with handwritten python client, we want to generate this in the future too)

you can write your server to inject “notification” updates without an id, we used that for our events in deltachat, but we switched to a get_next_event api. you could also do a get next event api and keep a connection context that stores subscriptions and copies the subscribed events into a queue.

Not sure how this could/should be integrated into yerpc, I have a hard time to imagine how the api could look. Maybe there is a way to make it as some kind of optional addon feature, like some kind of event broker system that you could add.

Anyways I would like to know more about your use case, maybe yerpc is not suited for it and there are other technologies that might fit better?