<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1930213017396645687</id><updated>2012-03-20T02:03:49.525-06:00</updated><category term='facebook'/><category term='google maps'/><category term='truism'/><category term='defaction'/><category term='errorstack'/><category term='statcounter'/><category term='YQL'/><category term='firebug'/><category term='brightkite'/><category term='events'/><category term='linkedin'/><category term='edoism'/><category term='seo'/><category term='crud'/><category term='webhooks'/><category term='jquery'/><category term='iphone'/><category term='kynetx'/><category term='annotation'/><category term='css'/><category term='geolocation'/><category term='push'/><category term='aculis'/><category term='XPath'/><category term='twilio'/><category term='online identity'/><category term='twitter'/><category term='bigohoo'/><category term='oauth'/><category term='social media'/><category term='blogger template'/><category term='webapp'/><category term='JSON'/><category term='widget'/><category term='foursquare'/><category term='safari'/><title type='text'>edoism</title><subtitle type='html'>truism of ed orcutt</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://edoism.orcutt.org/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1930213017396645687/posts/default/-/twilio'/><link rel='alternate' type='text/html' href='http://edoism.orcutt.org/search/label/twilio'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1930213017396645687.post-4534321124873222021</id><published>2010-11-08T17:46:00.000-07:00</published><updated>2010-11-08T17:46:37.572-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kynetx'/><category scheme='http://www.blogger.com/atom/ns#' term='twilio'/><title type='text'>Kynetx Flow of Control in CloudStatus</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNiZg_i29CI/AAAAAAAAAOs/NMukUqAiYv8/s1600/twilio-logo-no-tagline1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_tXU2PrpKxHU/TNiZg_i29CI/AAAAAAAAAOs/NMukUqAiYv8/s1600/twilio-logo-no-tagline1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;The development of solutions within an event based language like Kynetx requires you to remap your architecture skills. It's more common for us to apply object oriented or functional methodology, but not so common to apply an event architecture. To that end I wanted to share with you the architecture of the CloudStatus Kynetx application.&lt;br /&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;First a brief overview so that you have some context. The CloudStatus Kynetx application provides the status of 26 public APIs. If there are currently any performance issues or service disruptions one quick phone call or text message to (801) 988-9093 will provide the status. When you first call CloudStatus a summary of the services with issues is given, after a short greeting. Then you are presented with a menu of choices. After selecting one of the menu options, and hearing the results, the menu of choices are repeated. Now let's see what that looks like when implemented with Kynetx.&lt;br /&gt;&lt;br /&gt;Below is a skeleton of the CloudStatus application. So that we can focus on the flow of control in the application some of the details have been abbreviated or removed. The full source code for CloudStatus Kynetx application is available at &lt;a href="https://gist.github.com/667893"&gt;GitHub&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_tXU2PrpKxHU/TNiX_ewmyTI/AAAAAAAAAOo/tbyjIyKsiAQ/s1600/code_structure.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_tXU2PrpKxHU/TNiX_ewmyTI/AAAAAAAAAOo/tbyjIyKsiAQ/s1600/code_structure.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;The entry point into the application is an incoming call from &lt;a href="http://www.twilio.com/"&gt;Twilio&lt;/a&gt;, rule #1 &lt;i&gt;twilio inbound_call&lt;/i&gt;. After the gretting we raise an explicit event which gives the summary of under performing services. Then another explicit event is raised which takes you to rule #2 explicit &lt;i&gt;givemenu&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Rule #2 is at the top of the multi-select loop and is the center piece of the applications flow of control. One of the main features to note is the parameter passed into &lt;i&gt;gather_start(). &lt;/i&gt;It is the event name we have choosen, and it is used in many of the rules which follow. In addition you will notice that we have specified that only one digit will be accepted. So when the caller pressing a single digit we will be off and running.&lt;br /&gt;&lt;br /&gt;When the caller presses 1, 2, 3 or 0 rule #3, #4, #5 or #6 is fired respectively. Otherwise, Rule #8 is fired. This is the multi-select pattern! So if the caller presses number 1, rule #3 will fire because it matches the event name &lt;i&gt;statuschoice &lt;/i&gt;with the qualifier Digits "1". Recall from above that we choose the event name &lt;i&gt;statuschoice &lt;/i&gt;in the &lt;i&gt;gather_start() &lt;/i&gt;action. The next rule to fire will be #7 which matches event name &lt;i&gt;statuschoice &lt;/i&gt;and any one of the digits 1, 2 or 3. This rule provides the looping which takes us back to rule #2 by raising an explicit event. If the caller presses either the number 2 or 3 the pattern is similar.&lt;br /&gt;&lt;br /&gt;If on the other hand the caller presses number 0, then Rule #6 fires, which says goodbye and terminates the call. You will note that Rule #7 does not fire when the Digits is 0, so the caller is not taken back to Rule #2 to hear the menu. The application flow drops through to the end, no loop. there are done.&lt;br /&gt;&lt;br /&gt;Finally, if the caller presses any other number then Rule #8 fires, telling them of their poor choice and then taking them back to Rule #2 by raising an explicit event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1930213017396645687-4534321124873222021?l=edoism.orcutt.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edoism.orcutt.org/feeds/4534321124873222021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://edoism.orcutt.org/2010/11/kynetx-flow-of-control-in-cloudstatus.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1930213017396645687/posts/default/4534321124873222021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1930213017396645687/posts/default/4534321124873222021'/><link rel='alternate' type='text/html' href='http://edoism.orcutt.org/2010/11/kynetx-flow-of-control-in-cloudstatus.html' title='Kynetx Flow of Control in CloudStatus'/><author><name>Ed Orcutt</name><uri>http://www.blogger.com/profile/01072069799127687951</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_tXU2PrpKxHU/SuDD5YwomTI/AAAAAAAAAII/hCrRNUZWOto/S220/edo_transjpg.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_tXU2PrpKxHU/TNiZg_i29CI/AAAAAAAAAOs/NMukUqAiYv8/s72-c/twilio-logo-no-tagline1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry></feed>
