]> git.ipfire.org Git - thirdparty/asterisk.git/commit
stasis cache: Enhance to keep track of an item from different entities.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 7 Mar 2014 20:28:12 +0000 (20:28 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 7 Mar 2014 20:28:12 +0000 (20:28 +0000)
commit42ecadbf49456ddc2841057ebeeafba6cffe55a1
treea5016e3c43aeb373dc77ce0effa81173dc011c14
parent995d27b8887b3dac050e62df545b50d7f9b0dde0
stasis cache: Enhance to keep track of an item from different entities.

A stasis cache entry now contains more than a single message/snapshot.  It
contains messages/snapshots for the local entity as well as any remote
entities that post to the cached item.  In addition callbacks can be
supplied when the cache is created to compute and post the aggregate
message/snapshot representing all entities stored in the cache entry.

* All stasis messages now have an eid to indicate what entity posted it.

* The stasis cache enhancements allow device state to cache and aggregate
the device states from local and remote entities in a single operation.
The cached aggregate device state is available immediately after it is
posted to the stasis bus.  This improves performance by eliminating a
cache dump and associated ao2 container traversals to calculate the
aggregate state.

(closes issue ASTERISK-23204)
Reported by: Mark Michelson

Review: https://reviewboard.asterisk.org/r/3281/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@410184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/devicestate.h
include/asterisk/stasis.h
main/app.c
main/devicestate.c
main/stasis_cache.c
main/stasis_message.c
tests/test_devicestate.c
tests/test_stasis.c