[zeromq-dev] Associating messages to authenticated clients

Pieter Hintjens ph at imatix.com
Mon Jan 27 14:54:24 CET 2014


On Mon, Jan 27, 2014 at 5:33 AM, Goswin von Brederlow <goswin-v-b at web.de> wrote:

> I added the mechanism pointer to the message itself increasing its
> size and breaking ABI. That is a big problem.

> a) only messages with contents need the pointer so the pointer could
> be moved into the union next to the content pointer.

Currently small messages would use the VSM structure. You could force
all messages into contents, if there is metadata. Or, if you used a
separate method for receiving such messages.

> 2) memory management> I think the mechanism structure must be extended to have a reference
> count.

Sounds right.

> 3) API to access metadata, properties, ...
> I'm not sure how metadata and properties are suposed to be set and
> used. Should each have their own retrieval function? Or is one generic
> function similar to getsockopt enough? Maybe user_id and metadata
> should even just be another property?
>
> I just added zmq_msg_get_user_id() as a proof-of-concept. Seemed to be
> the simplest thing to test the idea.

There are a set of fixed properties that are easiest to access via
individual methods. And there is generic metadata that we'd access
using a single "get" method.

> 4) write access to the metadata

Unless you have a specific problem where modifying metadata in the
application is the simplest solution, I'd stay away from this. It
sounds like a bad idea anyhow.

-Pieter



More information about the zeromq-dev mailing list