fdb icon indicating copy to clipboard operation
fdb copied to clipboard

Introduce separate layer to handle serialization and deserialization

Open Ozaq opened this issue 11 months ago • 1 comments

With the introduction of remote FDB we have a few places where we serialize and deserialize in the same code that is doing some higher level logic.

We need to reevaluate the current implementation and explore if we should introduce an abstraction over the serialization/deserialization code with the goal to hide future protocol changes from the calling code.

See RemoteFDB::RemoteFDB for an example, we construct the bytebuffer and build the message byte by byte directly. IMO the code here operates on very different levels of abstraction and should be separated.

Ozaq avatar Dec 11 '24 15:12 Ozaq

I think it would be good to abstract out the Remote protocol. In particular, for the different message types, it would be good to have the same class implement the encode and decode functionality, and then be used by both the client and server code.

This also facilitates changes to this implementation at some point.

simondsmart avatar Apr 14 '25 10:04 simondsmart