[bind10-dev] Resend: Re: proposed system design and inter-process protocol for shared memory

Michal 'vorner' Vaner michal.vaner at nic.cz
Wed Mar 13 07:35:55 UTC 2013


Hello

On Tue, Mar 12, 2013 at 10:37:57AM -0700, JINMEI Tatuya / 神明達哉 wrote:
> 1. memmgr subscribes to the MemMgr group (as we currently do)
> 2. others subscribes to the MemMgrConsumer or whatever group (as we
>    currently do)
> 3. memmgr requests msgq to notify it of any updates on the membership
>    of the MemMgrConsumer group
> 4. others request msgq to notify them of any updates on the membership
>    of the MemMgr group (in this case the only possible change is
>    actually a departure (and startup?) of memmgr)

Yes, some variation of this. Of course, the others would subscribe to their
respective „main“ groups too (like to Auth). Maybe it would be slightly better
to do 3. and 4. before 1. and 2. (to avoid races), but it may be unneeded,
because we would do the initialization afterwards anyway.

> If so, does step 3 work if step 2 isn't completed (at least by one
> "consumer") at that time?  Likewise, does step 4 work if step 1 isn't
> completed at that time?  Is msgq expected to remember any outstanding
> requests in case there's no subscriber of the group (so the msgq
> wouldn't even know the existence of the group) at the time of the
> request?

It would have to work even if the group is still empty, otherwise there would be
too much space for race conditions.

What I imagined it would work internally is that for each subscription group
called xyz, every change would be sent as an notification to group
Notifications/Subscriptions/xyz by msgq. If the group would be empty (nobody
interested in the subscription changes there), then it would turn out to be NOP.

And requesting information about subscriptions would be just subscribing to that
special-named group.

This way, you could subscribe for notifications of subscriptions for a group
that is yet empty. And, when we have notifications working, it would be only
little additional work to implement this.

With regards

-- 
Work with computer has 2 phases. First, computer waits for the user to tell it what 
to do, then the user waits for the computer to do it. Therefore, computer work 
consists mostly of waiting.

Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20130313/5bfceab1/attachment.bin>


More information about the bind10-dev mailing list