clio icon indicating copy to clipboard operation
clio copied to clipboard

refactor forwardToRippled()

Open natenichols opened this issue 3 years ago • 2 comments

Currently, we just connect a new socket every time. We should refactor how this works to maintain a websocket connection.

We should maintain a pool of sockets, and acquire one per request. Or we can maintain a list of IDs and only maintain one connection to each p2p node.

natenichols avatar Jan 05 '22 20:01 natenichols

Do we need to make this change given your async changes?

cjcobb23 avatar Feb 01 '22 15:02 cjcobb23

This is a potential improvement that might come with some side-effects however. Rippled might close the websocket if it's open for long and unused. We need to measure if this even helps at all with performance. Also this is depending on the ETLSource being used, which means that the websocket need to be alive for each and every ETLSource that is configured. Plus all the problems described in #51

godexsoft avatar Jan 12 '23 14:01 godexsoft

In boost asio websocket connection should work on a strand so it will be quite complicated to implement this. We decided that optimisation we would gain from this doesn't worth it. Instead we could switch http requests #1180.

kuznetsss avatar Jun 25 '24 13:06 kuznetsss