Rainer Gerhards wrote:
> Hi WG,
>
> this is again a request for some assistance/clarification.
>
> I have a situation where an application can act as both a relay as well
> as a device in parallel. For example, it accepts incoming syslog
> messages and can relay them, but it also generates messages itself, e.g.
> by pulling them from the Windows event logs.
>
> My question is now about the role in the <iam> element.
>
> I assume I can handle this situation in two ways:
>
> #1 Two BEEP channels
> I open two channels to the remote peer. With one, I say <iam
> type='device>. With the other one, I say <iam type='relay'>. Depending
> on what is to be forwarded I use either the device or relay channel.

That would work.

> #2 One BEEP channel, multiple <iam>s
> I open just one channel. Whenever I need to send something as a device,
> I issue a <iam type='device'> before sending the <entry> (if not already
> in "device mode"). Whenever I need to relay something, I issue an <iam
> type='relay'> before the entry (if not already in "relay mode").
>
> I think both approaches are valid, but obviously #1 will be
> less-bandwidth-intense.

That would work too.

There's a third possibility, which is to use the pathID to determine
where the message originated from. That is, you *are* a relay, you just
happen to generate some messages yourself, as well. This approach has
the advantage of having only one <iam> to match up with the SASL login.
(I.e., if your SASL login included the type information, neither of your
above approaches would work.)

I think the choice is in part dependant on what you "mean" in some
sense. Are you simply relaying messages locally, or are you actually
generating them yourself? That is, I could see someone using *both* #1
and #2, with one channel for messages like "the relay syslog process
just had a configuration change", and another channel for messages like
"the machine on which the relay syslog process is running just lost a
disk drive".

-- 
Darren New, San Diego CA USA (PST)
Don't take home left-over tripe.
   It'll just digest itself before
     you get around to eating it.



Reply via email to