[Asterisk-code-review] app confbridge: Add a regcontext option for confbridge bridg... (asterisk[11])

Jaco Kroon asteriskteam at digium.com
Wed Apr 27 08:03:30 CDT 2016


Jaco Kroon has posted comments on this change.

Change subject: app_confbridge: Add a regcontext option for confbridge bridge profiles.
......................................................................


Patch Set 2:

Hi Joshua,

 > How would this be used in that scenario, and would it suffer from a
 > race condition where two check at the same time, find the
 > ConfBridge isn't there, and both create the ConfBridge locally?

Yes, I've been thinking about that quite a bit and I can't think of an easy way to eliminate that completely.  That risk most definitely exists.  But what's the probability of multiple *first* callers both calling in within a few milliseconds (or even seconds) of each other?

One way around it is to only create the bridge if the caller is organizer, everybody else gets put into a waiting loop until the bridge does exist.  Play them some MOH until the conference organizer dialed in to create the bridge for example.  So there are some ideas.

One could also have some out-of-band mechanism to get a cluster-wide lock if the bridge does not exist yet such that only one of the callers will create the bridge.  I'm not sure how such a thing would look (often wondered) but I know we do some things with the MySQL LOCK() function where MySQL itself is setup in an active-standby configuration.  Perhaps asterisk itself has some mechanism or one could get cman involved, or even an flock() or some clustered distributed filesystem like glusterfs somehow.

Or one could take the ostrich approach and ignore the problem completely and hope that the (hopefully very) unlikely race does not occur.

Either way, personally I think the creation problem whilst relevant is outside of the scope of tracking down existing conferences that's capable of being joined.

-- 
To view, visit https://gerrit.asterisk.org/2708
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Icacf94d9f2b5dfd31ef36f6cb702392619a7902f
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list