"When protocol buffers are used for the payload, this must refer to a non-repeated string field."Datastore needs support for a 'bytes' field for the transaction identifier.
for the user example, you would almost want to split on the @ and keep the second segment (the domain name).
On Mon, Jan 30, 2017 at 3:28 PM Alfred Fuller <arfu...@google.com> wrote:Thanks!On Mon, Jan 30, 2017 at 2:14 PM Mark D. Roth <ro...@google.com> wrote:I've created a gRFC for the header extraction mechanism we're working on:https://github.com/grpc/proposal/pull/9As per the gRFC process, please keep all design discussion on this thread. All comments welcome.Carl, can you please provide content for the Java implementation? Thanks!Please let me know if you have any questions or comments.
On Mon, Jan 30, 2017 at 9:05 PM, Alfred Fuller <arfu...@google.com> wrote:"When protocol buffers are used for the payload, this must refer to a non-repeated string field."Datastore needs support for a 'bytes' field for the transaction identifier.What character encoding do they use for that field, UTF-8? How can we tell what character encoding is in use? I think we'd need some way to figure this out in order to support it.
for the user example, you would almost want to split on the @ and keep the second segment (the domain name).That would require adding yet another field to the header extraction spec for the number of leading fields to skip. Do we actually have a use-case for that? If not, I don't want to add unnecessary complexity.The example in the doc was just meant to illustrate that the delimiter character can be anything; it wasn't meant to be a realistic example.
On Tue, Jan 31, 2017 at 8:32 AM Mark D. Roth <ro...@google.com> wrote:On Mon, Jan 30, 2017 at 9:05 PM, Alfred Fuller <arfu...@google.com> wrote:"When protocol buffers are used for the payload, this must refer to a non-repeated string field."Datastore needs support for a 'bytes' field for the transaction identifier.What character encoding do they use for that field, UTF-8? How can we tell what character encoding is in use? I think we'd need some way to figure this out in order to support it.it is raw bytes, so no encoding (it is a serialized internal protobuf)It does not require splitting (in fact any modification would be harmful)Maybe make the delimiter optional? (and when it is set, the field must be a string).
for the user example, you would almost want to split on the @ and keep the second segment (the domain name).That would require adding yet another field to the header extraction spec for the number of leading fields to skip. Do we actually have a use-case for that? If not, I don't want to add unnecessary complexity.The example in the doc was just meant to illustrate that the delimiter character can be anything; it wasn't meant to be a realistic example.If it is not a real example no point in complicating the API at this moment (I could see it being a real use case to someone), though maybe the field names should use slicing nomenclature incase this ever changes.
On Mon, Jan 30, 2017 at 3:28 PM Alfred Fuller <arfu...@google.com> wrote:Thanks!On Mon, Jan 30, 2017 at 2:14 PM Mark D. Roth <ro...@google.com> wrote:I've created a gRFC for the header extraction mechanism we're working on:https://github.com/grpc/proposal/pull/9As per the gRFC process, please keep all design discussion on this thread. All comments welcome.Carl, can you please provide content for the Java implementation? Thanks!Please let me know if you have any questions or comments.
Note that for streaming RPCs, we extract headers only from the first request message on the stream.
What character encoding do they use for that field, UTF-8? How can we tell what character encoding is in use? I think we'd need some way to figure this out in order to support it.it is raw bytes, so no encoding (it is a serialized internal protobuf)It does not require splitting (in fact any modification would be harmful)Maybe make the delimiter optional? (and when it is set, the field must be a string).Actually, I think there's a more fundamental problem here. HTTP2 headers are limited to ASCII characters (see https://tools.ietf.org/html/rfc7540#section-10.3). Given that, the only way we could support this would be to encode it somehow in the header value.
I'd feel better if there was an example that did not use delimiterCharacter (the value of the field referenced by payloadFieldName is not mutated).
Note that for streaming RPCs, we extract headers only from the first request message on the stream.This seems to imply a change in the semantics for streaming RPCs, since streaming RPCs may not have any messages. Today, we have to send the headers immediately, without waiting for the first message. In the past we've disallowed such things instead of changing the semantics (like with safe).
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/368277cc-6a5b-4a56-95e0-3c191ae5743a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/1403c8d6-4535-46ee-9174-c0c0ed4addc7%40googlegroups.com.
Right off the cuff, I can think of a few possible options here:1. Always base64-encode the extracted values.2. Do base64 encoding only when non-ASCII characters are actually present.3. Simply strip out non-ASCII characters.
I'm very wary about the delimiter character: it seems like it opens the door to adding a whole host of renormalization filters to this spec, and such will eventually lead to mutually inconsistent implementations. I'd strongly prefer that we drop any massaging of the fields client side and instead leave it as a problem for the server.
I think this type of config is very service centric, not interface centric. For example, look at the LRO API. Different services use the same protobuf, but have different resource name formats. If the requirement was copy a field verbatim it 'might' work to define the same extraction for all services that implement LRO, but the requirement here is that the client is able to uniquely identify an 'affinity key', so the protocol must be able to extract the exact substring needed.
Alternative proposal:- this mechanism only allows single field extraction, with no string processing