<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">
<blockquote style="border: 0px none;"
cite="mid:529F723C.5030708@digium.com" type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="jcolp@digium.com" photoname="Joshua Colp"
src="cid:part1.09080203.01000804@digium.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:jcolp@digium.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Joshua Colp</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Wednesday,
December 04, 2013 12:19 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><br>
<br>What worries me about persisting this information is keeping it in
sync
with the outside world. If a mailbox goes away externally and the
Asterisk instance is not running now the application has to do one of
the following:
<br>
<br>1. Keep a log of this fact and then ensure it is removed from
Asterisk
when it starts up
<br>
<br>2. Destroy with hate any mailboxes it doesn't know about when
Asterisk
starts up (what about other applications?)
<br>
<br>That seems like a lot of work, and potentially issue prone which
brings
me to...
<br>
<br>Why are we persisting at all? Since this is completely externally
driven
there's going to be a chance no matter what that the information is
stale. I would argue that not persisting and letting the external
application feed it back in is better. This gives you a guarantee that
the state is the same.
<br>
<br>Thoughts?
<br><hr style="border: none 0; border-top: 1px dotted #B5B5B5; height:
1px;margin:15px 0 0 0" class="__pbConvHr"> </div>
</blockquote>
The basic scenario where persistence is desirable is when Asterisk has
accumulated a bunch of MWI state, then restarts, then a device requests
current MWI state for a mailbox. If mailbox state is not persisted, then
Asterisk has to respond with incorrect state. If the MWI state is
persisted, then Asterisk can respond with the latest known state.<br>
<br>
Regarding work required by the application, having state not be
persisted is, in my opinion, more of a hassle. If Asterisk restarts,
then the application needs to know that it happened and then retransmit
all MWI state to Asterisk in order to repopulate Asterisk's cache. If
state is persisted, then the only state that needs to be retransmitted
by the application is whatever couldn't previously have been delivered
during the downtime.<br>
<br>
Regarding the mailbox destruction scenario, the application is going to
have to create a backlog of updates to send at any point when Asterisk
is down, whether those updates are changes to MWI state or creation or
destruction of said state. I don't think that removing persistence will
have any effect on this.<br>
</body></html>