-
Notifications
You must be signed in to change notification settings - Fork 78
Extend Payload to include references to externally stored objects #671
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
base: master
Are you sure you want to change the base?
Conversation
temporal/api/common/v1/message.proto
Outdated
| } | ||
|
|
||
| // Metadata describing an externally stored object that can be referenced by Payload | ||
| message ExternalPayload { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really an external payload, rather it's information about one. I think we should consider adding ExternalInfo (or ExternalPayload if we must) as a sub-message of Payload, the only place it's used, instead of top-level common as if commonly used in many places. But if it must remain top-level, I think it should be clear this proto message is not a form of Payload as its name implies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to ExternalReference and made it a sub-message of Payload
| message Payload { | ||
| map<string,bytes> metadata = 1; | ||
| bytes data = 2; | ||
| // References to data stored externally rather than embedded in the payload. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it is currently accurate to say these are references, it's just some info about them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plural external_infos is quite awkward, so I decided against it. I also considered ExternalDescriptor, but I like it slightly less than ExternalReference. Any other suggestions, which would also work for plural?
4030023 to
fe9e752
Compare
cretz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me. I originally was afraid of marking approved until we had done more code on server and SDK side to prove out what we want here, but I think this change is small enough that whatever we're doing with it on the server may not be necessary up front.
READ BEFORE MERGING: All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted.
Extend Payload to include references to externally stored data. Currently the only information we would store is the size of the externally stored object, but it will be extended in the future once more features are added.
Payloads are limited in size, and as such require external references to pass large amounts of data. This PR extends Payload protobuf to include information (currently only size) about externally stored objects associated with the Payload. One Payload will be able to reference multiple externally stored objects in the future.
No breaking changes
This change is additive, and so won't break the server