Implemented websocket /feed on HTTP (REST) API#237
Conversation
|
I'm going to "rebrand" this as *if ever implemented, as its more complex than |
d315e0d to
3f60388
Compare
|
Renamed just about everything from "/push" to "/feed". The former is basically reserved for w3c "push" messages to clients (which may or may not be implemented). This also simplified pushing/writing such that a separate write "loop" is easier. This was made possible by leveraging builtin |
|
Forgot to mention that I added suppression of some block scan messages, primarily when the backend is actively scanning old blocks of an account. |
3f60388 to
8e79400
Compare
|
Force pushed some tweaks to the protocol after implementing the lwsf (frontend) portion. These changes reduce the fields to the bare minimum, and mostly appear working. A separate issue for "null" tx-hashes was discovered and will be patched separately. |
8e79400 to
b772b27
Compare
|
Mostly renames with a few bug fixes. This matches what the client is now doing. |
b772b27 to
fdd1e5c
Compare
|
Rebased and added docs with schemas for /feed |
fdd1e5c to
1fe9edd
Compare
|
A critical fix for stability, caught with ASAN. |
1fe9edd to
dfd4fd1
Compare
|
Tweaked the /feed schema. The |
This is marked as a draft until the client implementation is done. I want to make sure the protocol works before even merging this code.
This design adds a
/feedendpoint that is not REST, instead the endpoint is a web socket push/stream protocol. The user logs in via address + viewkey, then automatically gets the entire state of transactions from the server. The schema differs from the existing REST api in that the minimum amount of data to support thewallet_api.his sent (the existing REST API had lots of data redundancy).After that initial sync, the
/feedinterface sends "raw" scanner information to the frontend, via ZMQ internally, including mempool matches and all newly scanned blocks. Reorgs and monerod disconnects are also reported to the clients. If the/feedthreads are overloaded and miss internal ZMQ messages, this is detected and the stream errors out.The design supports both JSON and msgpack, the latter being ~10% faster in prior tests.
There are some basic tests, but more would be useful. At this stage I'd rather get a real client so that I can test viability of the design. There will also be a markdown explanation of the final protocol.