On Tue, Nov 15, 2011 at 12:30, Alexander Altshuler <a...@kaluga.ru> wrote:
> Why not if you proper handle endianness? > > Alexander > > -----Original Message----- > From: zeromq-dev-boun...@lists.zeromq.org > [mailto:zeromq-dev-boun...@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@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev