serai-dex / serai

Other
242 stars 45 forks source link

Consider inlining the Message Queue #541

Closed kayabaNerve closed 1 month ago

kayabaNerve commented 3 months ago

While documenting the Message Queue, I realized I'm not entirely sure why it exists, however ridiculous that may sound.

All of the design goals are sane. It's just, instead of using a remote server as the message buffer, we could use an async task on each side. The processor saves messages to be sent to its local database, and defines an async task to forward them along to the coordinator/receive messages from the coordinator. The coordinator would have a complimentary task.

This would actually be even-more robust, as technically, as of right now, the message queue can go offline and halt the processor/coordinator (though this is unexpected).

kayabaNerve commented 1 month ago

The direction I want to go in for #565 supersedes this, even if this is currently valid.