[zeromq-dev] protocol design question
MinRK
benjaminrk at gmail.com
Tue Nov 15 21:36:52 CET 2011
On Tue, Nov 15, 2011 at 12:30, Alexander Altshuler <alt at kaluga.ru> wrote:
> Why not if you proper handle endianness?
>
> Alexander
>
> -----Original Message-----
> From: zeromq-dev-bounces at lists.zeromq.org
> [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Chuck Remes
> Sent: Tuesday, November 15, 2011 10:59 PM
> To: ZeroMQ development list
> Subject: [zeromq-dev] protocol design question
>
> I am working on a protocol for submission to the rfc.zeromq.com site.
> For one of the fields (message frames) I need to define a unique
> sequence number. I decided upon a combination of a 64-bit integer and a
> 16-byte UUID.
>
> The UUID would uniquely identify each client. The sequence number would
> uniquely identify each message from that client. When used together,
> each message from N clients can be uniquely identified.
>
> So, I thought I should define the frame as follows:
>
> frame 2
> 24 bytes total
> 8 bytes - 64-bit integer (network byte order)
> 16 bytes - UUID
>
> Is it portable to pack them both into the same frame like this? I assume
> a C user could define a struct to map that frame directly.
>
> e.g.
>
> struct sequence_id {
> uint64 number;
> uchar uuid[16];
> };
>
> Is this all right? Or is there a better way to accomplish this framing?
>
> cr
>
I have a general question related to this - what is the relative cost in
zeromq of these being separate very-small messages versus one packed
message? Has someone done perf tests for this kind of thing?
-MinRK
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111115/5a3b1743/attachment.htm>
More information about the zeromq-dev
mailing list