[asterisk-dev] [Code Review] 2754: ARI: WebSocket event cleanup
opticron
reviewboard at asterisk.org
Thu Aug 15 15:14:25 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2754/#review9413
-----------------------------------------------------------
/team/dlee/ari-async-bridge/res/stasis/app.h
<https://reviewboard.asterisk.org/r/2754/#comment18474>
This doesn't appear to be correct.
/team/dlee/ari-async-bridge/res/stasis/app.c
<https://reviewboard.asterisk.org/r/2754/#comment18475>
s/!id/ast_strlen_zero(id)/
/team/dlee/ari-async-bridge/res/stasis/app.c
<https://reviewboard.asterisk.org/r/2754/#comment18476>
This should assert NULL on the router, merge subscription, and the container if their destruction is handled elsewhere (I don't see it). Otherwise, they need to be handled here.
- opticron
On Aug. 8, 2013, 4:40 p.m., David Lee wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2754/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2013, 4:40 p.m.)
>
>
> Review request for Asterisk Developers and Matt Jordan.
>
>
> Bugs: ASTERISK-21969
> https://issues.asterisk.org/jira/browse/ASTERISK-21969
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Stasis events (which get distributed over the ARI WebSocket) are created
> by subscribing to the channel_all_cached and bridge_all_cached topics,
> filtering out events for channels/bridges currently subscribed to.
>
> There are two issues with that. First was a race condition, where
> messages in-flight to the master subscribe-to-all-things topic would get
> sent out, even though the events happened before the channel was put
> into Stasis. Secondly, as the number of channels and bridges grow in the
> system, the work spent filtering messages becomes excessive.
>
> Since r395954, individual channels and bridges have caching topics, and
> can be subscribed to individually. This patch takes advantage, so that
> channels and bridges are subscribed to on demand, instead of filtering
> the global topics.
>
> The one case where filtering is still required is handling BridgeMerge
> messages, which are published directly to the bridge_all topic.
>
> Other than the change to how subscriptions work, this patch mostly just
> moves code around. Most of the work generating JSON objects from
> messages was moved to .to_json handlers on the message types. The
> callback functions handling app subscriptions were moved from res_stasis
> (b/c they were global to the model) to stasis/app.c (b/c they are local
> to the app now).
>
>
> Diffs
> -----
>
> /team/dlee/ari-async-bridge/main/stasis_bridges.c 396473
> /team/dlee/ari-async-bridge/res/res_stasis.c 396473
> /team/dlee/ari-async-bridge/res/stasis/app.h 396473
> /team/dlee/ari-async-bridge/res/stasis/app.c 396473
>
> Diff: https://reviewboard.asterisk.org/r/2754/diff/
>
>
> Testing
> -------
>
> Put channels in/out of Stasis, and in/out of bridges, watching events on the
> WebSocket.
>
>
> Thanks,
>
> David Lee
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130815/9245606f/attachment-0001.htm>
More information about the asterisk-dev
mailing list