The resultant XML will return an indication of the PREVIOUS state of the
keyword being setup. Prior to this change you only got a single element in
the XML response - namely <KeywordID>. This tag is still there (which is
why it shouldn't break any existing REST clients.
However, if the keyword being established already exists in the MD routing
tables, another element will be added to the XML response. This element
will be identified as the <message> tag. The format of this response can be
learned from the documentation on Mobile Dialog - and has the same tag
values and attributes as specified in that document. I won't explain it
precisely, but here are a couple sample responses:
<KeywordID>2-1491477d840b59</KeywordID>
<message type="dynamic">
http://sifttool.com/channel/bcit/smsreceive?kw=2-1491477d840b59
</message>
<KeywordID>2-1491477d840b59</KeywordID>
<message type="sms">
Sorry, that command is not recognized.
</message>
This information can be used to glean the previous state of the routing
tables. In particular, if a tag with attribute 'dynamic' is returned, that
means you have stolen that keyword from some (presumably) other component.
You are free to parse the value of the tag to further glean if this is your
own callback or someone else's and perhaps do something with that
information.
Roland - you can use this information I presume to conclude whether you've
stolen a routing keyword from yourself.
Admittedly this is not a terribly great solution, but in terms of effort it
was the cheapest solution. In practice I could see the merit of MD
maintaining a stack of handlers and have components be able to push and pop,
multiplex, supplant and all sorts of good stuff. However, that is clearly
not going to happen in this iteration of MUSE.
Jim
-----Original Message-----
From: Roland Tanglao [mailto:rol...@raincitystudios.com]
Sent: Thursday, December 18, 2008 9:35 AM
To: Jim Udall
Cc: Stephen Makonin; Clay Howey
Subject: Re: Ready for SIFT demo on Friday morning or next week
Hi Jim:
I am going to interpret this as SIFT does NOT have to implement error
checking to fix Mike's problem. Please let me know if I have
misinterpreted! BTW, the way I would implement it, thinking out loud,
would be to issue a warning message, something like "keyword k1 is
already in use by channel 1, please delete it in channel 1 if you
would like to use it in this channel".
Please let me know when you would like to have the walkthrough / demo.
Cheers!
...Roland
On Thu, Dec 18, 2008 at 9:24 AM, Jim Udall <jim....@quickmobile.com>
wrote:
> Yes MD is not very intelligent about these sorts of things. If a
component
> asks to claim a keyword, if that keyword exists and has already been
claimed
> for another action, it doesn't object, stack or multiplex the request. It
> simply overwrites its routing tables.
>
> So it's perfectly feasible for one component (say a SIFT component) to
> quietly steal a keyword (and its existing routing rules) from another
> component.
>
> Mike's complaint reflects a more general problem in that two entirely
> unrelated components can steal routing rules from MD without each other
> being aware of what's going on.
>
> The only entity that has complete knowledge of all the interactions is by
> definition the cultural developer himself. That's another way of saying
> "Hey you mis-configured it. It's your problem".
>
> I suppose you can solve the specific case of one SIFT channel usurping a
> keyword from another SIFT channel. However, you can still get yourself
into
> trouble using other components that rely on MD and its routing rules.
>
> Of course a MD version 2 could apply all sorts of extended logic to manage
> these situations, but that's not going to happen in this release of MUSE.
>
> Jim
> -----Original Message-----
> From: Roland Tanglao [mailto:rol...@raincitystudios.com]
> Sent: Thursday, December 18, 2008 2:02 AM
> To: Stephen Makonin; Jim Udall; Clay Howey
> Subject: Ready for SIFT demo on Friday morning or next week
>
> Hi Jim:
>
> I believe through the hard work of our Chinese developers we have
> fixed all the outstanding SIFT issues (there may be a new one that
> Mike of SAT brought up about SIFT not deleting a keyword in its data
> structures for channel 1 if the same keyword is re-used in channel 2
> - please let us know ASAP if we need to fix this).
>
> So I'd like to schedule a walkthrough for Friday December 19th
> preferably in the morning.
>
> Let me know when is best for you!
> --
> ...Roland Tanglao rol...@raincitystudios.com
> +1 604 729 7924 The future is Bryght at Raincity
> http://www.raincitystudios.com/
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.9.19/1855 - Release Date:
12/18/2008
> 10:16 AM
>
>
--
...Roland Tanglao rol...@raincitystudios.com
+1 604 729 7924 The future is Bryght at Raincity
http://www.raincitystudios.com/
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.19/1855 - Release Date: 12/18/2008
10:16 AM