metabench/nextleveldb-client

Deprecation: observe_send_binary_message

metabench opened this issue · 1 comments

This is a big and complicated function that handles a variety of code paths, and does quite a lot of encoding and decoding.

Will move to send_command which makes use of Command_Message and Command_Response_Message. Those classes are isomorphic (usable in browser, node client or server), and will do much of the encoding/decoding heavy lifting behind the scenes in a way which is standardised over different uses. Those classes will handle the construction, serialisation and deserialisation of commands and their responses. When those two classes (with their other associated classes such as BB_Record) are the only encoding/decoding gateway that's used for communication, changes to the communication protocol will become easier.

More functionality is being encapsulated into other specialised parts of the system. Previous options such as decoding and removal of KPs are no longer important / worth having here because that functionality is easy to carry out elsewhere. As a standard, records will keep their KPs rather than save some memory or bandwidth by removing them. The buffer-backed classes help to enable IO of data in a convenient way, without lower level code cluttering the the codebase with operations that can be standardised, encapsulated, and used in different parts of the system with reliable results.

Will make an observable version of send_command, or make that function handle observables.