[
https://issues.apache.org/jira/browse/HTRACE-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14531087#comment-14531087
]
Colin Patrick McCabe commented on HTRACE-164:
---------------------------------------------
bq. Elliot wrote: Lines 189 through 259 \[are hard-coded\]
It seems like we are using a different definition of what "hard-coded" means.
I would refer to serialization as "hard-coded" if it was done by hand, i.e. by
writing raw bytes. It seems that you are referring to it as hard-coded because
we need to call a library function for each field. I don't want to argue about
whose definition is better... that is seldom productive.
But I do want to make an observation. If we were using GRPC or thrift, we
would have to copy each field from {{htrace_span}} into the protobuf-generated
structure, one by one. This would be a pretty similar amount of code.
Certainly the maintenance issues are similar (if you forget to copy one field,
it doesn't get sent, etc. etc.)
You commented that msgpack would be "writables deja vu" because it's not
protobuf. But msgpack is a very tightly defined format, similar to protobuf.
This is the opposite of something like Hadoop's Writable where the format is up
to you.
> htrace hrpc: use msgpack for serialization
> ------------------------------------------
>
> Key: HTRACE-164
> URL: https://issues.apache.org/jira/browse/HTRACE-164
> Project: HTrace
> Issue Type: Bug
> Affects Versions: 3.2.0
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-164.002.patch
>
>
> htrace HRPC should use msgpack for serialization. Messages serialized using
> msgpack use less space on the wire and use less CPU time to encode. The CMP
> library allows us to include msgpack support easily in the htrace C client.
> There is also good Java and Golang support available.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)