%eyre
~dachus-tiprel
- 2.22.23
This is a followup post to my WebSockets proposal. While I still intend to implement WS in the future, that is a large project that will take months; we need something that will work now. This plan is a robust, simple, and easy way to get great performance out of %eyre
without much effort. The idea is to build a separate system within eyre that doesn't use subscriptions or SSE - just pokes and scries. Here is a rough outline of the interactions:
%eyre
<> Client Interaction%gall
app (this must be implemented by the %gall
app)%eyre
that it wants to establish a realtime connection with that app%eyre
acknowledges that the connection has been made%eyre
every 1s for new updates on that connection.%eyre
being responsible for sending them down.%eyre
Vane Logic%eyre
to establish a connection%eyre
creates an outbox
of new messages for that connectionoutbox
will get filled by the gall app with new updatesGET
the latest contents of the outbox
%behn
timer once we have confirmation that certain messages have been received.%eyre
<> %gall
CommunicationWhen writing a gall app using this new system, there are no subscriptions involved. Intead of %fact
s, we will add a new $task
to %eyre
called %push
. %push
ing fills all outbox
es that need this data from your app. The card will look something like [%pass /my-wire %arvo %e %push %my-mark !>(data)]
. This is really similar to a %fact
, except we are manually pushing everything to %eyre
, rather than relying on the subscription system to do it for us.
This should solve the big problem with SSE; reconnection is extremely simple and cannot be terminated accidentally by forces outside of our control. Furthermore, I can build this quickly (~1mo), and will keep backwards compatibility.
~dachus-tiprel
Credit to ~timluc-miptev
and ~rovnys-ricfer
for this idea
powered by %blog, download at ~hanrut-sillet-dachus-tiprel