Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions object/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ service ObjectService {
// - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
// the container to which the replicated object is associated was not found.
rpc Replicate(ReplicateRequest) returns (ReplicateResponse);

// TODO: docs.
rpc ReplicateV2(stream ReplicateRequest) returns (ReplicateResponse);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my initial thought how to make new op as close to Replicate as possible is to stream its requests. Require additional messages to have object.payload (i.e. chunk) field only

having this, for new client to go back to old API, the only things to be done are

  1. change method name to Replicate
  2. place full object into the single message

2 will be needed anyway to implement a size-dependent logic transmitting small objects in one message

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object size is known before the request is made, so I'd opt for simpler v2 protocol (two specific request-level fields for header and payload). Magic payload/non-payload handling is harder to implement to me. ReplicateRequest can be extended with payload field as well leaving object for complete object or header only depending on version. Needs to be checked against real code anyway.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as in #333, the main thing to decide is whether 1st message carries payload prefix (full payload in particular) or not

if no, we'll have PutRequest-like stream w/o meta/verification headers. Otherwise, prefix and extra chunk fields can be transmitted in the same field (currently proposed) or in the diff ones (PUT)

i'll make diff commits for all opts to make it clear

}

// GET object request.
Expand Down
Loading