-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make RaftNetwork::send_append_entries()
compatible with rkyv app
#479
Comments
👋 Thanks for opening this issue! Get help or engage by:
|
RaftNetwork::send_append_entries()
compatible with rkyv app
I believe the common case would be a stream of rkyv Archived Entry. Which are really just a custom |
Then what do you expect the |
Just want to preface that I'm still relatively new to this code base, so I could be entirely wrong. But as I look through the code, I keep coming back to that the current API looks just fine for the common case. It's just more on the user to leverage the serialized byte format at the top level when defining the In terms of updating I'm familiar with some of the other Issue's mentioned in relation to finding a better way to hand Snapshot trait requirements. Since I, like many users, am using RocksDb as the main store, it gets interesting trying to send its data over as a snapshot. I personally planned on using one approach mentioned in a comment where the Snapshot is just a small set of meta data and the actual data transfer happens in |
There is another issue discussing about updating snapshot-API: You're right, all these 3 API are in a metadata followed by a stream of data manner(except It looks like now there are 2 preferences on the network API:
These 2 are somehow conflicting with each other. |
The storage api would also have to allow for this when getting the entries. It doesn't look to crazy to do looking at the code. Using a top level trait for |
Can you exhibit a piece of code of this trait definition? |
After going down that rabbit hole for a bit, it would end up with a lot of duplicate code and I don't see a very straight forward way to approach it. I also checked on what it would be like to add another |
@zach-schoenberger |
Sounds good. I'm down to help out with changes. Just not sure what the approach is that you want to take for the update. Especially with how intrusive it is with the inner workings. |
Some other people have also suggested improving the storage-to-network interface.
The general idea is to let storage send serialized data directly to the network API.
The first modified append-entries API that comes into my mind is to pass in a reader so that a network implementation could drain data directly from storage layer:
I am not quite whether a
byte
stream is compatible with arkyv
based application.Or does the reader have to be a stream of a
rkyv
ArchivedEntry
?Make sense.
Looks like it's a common requirement to send an entries stream(and snapshot) directly to the network layer for an application that cares about performance.
@schreter suggestions or opinions? :D
Originally posted by @zach-schoenberger in #474 (comment)
The text was updated successfully, but these errors were encountered: