<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page &quot;Event-driven architecture, state machines et al.&quot;</title>
		<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al</link>
		<description>Posts in the discussion thread &quot;Event-driven architecture, state machines et al.&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Sat, 01 Aug 2015 21:47:24 +0000</lastBuildDate>
		
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-2303374</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-2303374</link>
				<description></description>
				<pubDate>Mon, 25 May 2015 17:23:55 +0000</pubDate>
				<wikidot:authorName>jerry</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Sorry for the repost&#8230;</p> <p>Seams I posted on the wrong chapter&#8230;</p> <p>I've used my own State-Transition Paradigm for 15yrs now. I've been successful in keeping complexity down in my versions of financial telecommunication software (mostly stock exchanges), and Change management software</p> <p>What I did was to extend the STD to do more. I did this by including incoming events, transitions, and outgoing events. This allows a lot more expression in the story. In fact it nearly tells the whole story. The transitions can be compiled into routines (or &quot;Events&quot; in your definition).</p> <p>In my definition of STD an 'event' is something happening on the underlying socket (like a msg received), a user API routine call, or an 'internal event' being signalled.</p> <p>Internal events are usually part of the of a transition on Object A, issuing an event on Object B.</p> <p>The transitions are the hand coded routines. In some cases I partially generated them, and in other case I fully generated them.</p> <p>I know this sounds weird, but think about how much code you could remove from nanomsg if your state diagrams looked like: <a href="http://westrick.com/Jerry/CubixSystem.pdf">http://westrick.com/Jerry/CubixSystem.pdf</a> .</p> <p>This is the method I invented to get a handle on the inherent complexity of async systems.</p> <p>Be interested in what you think…</p> <p>Oh, and yes, in this method, a socket can be assigned an STD per protocol, instead of one STD for all… Which seams to be the core of your problem.</p> <p>When you use this system you need to loosen your hold on the name of the states.<br /> The first draft of the STD you place the states you think will be there and start adding events and transitions. But a state is defined but what events it is waiting for, and usually the original name turns out to be misleading, and needs to be changed.</p> <p>In the diagram present the API call cLogout() must be called to get to LogoffRequested.<br /> (not shown in the diagram is the FIX UserLogoff msg sent out in cLogout(). Then a FIX response from the logout is required.</p> <p>This defines the state, not the name (LogoffRequested) in the bubble!</p> <p>I think something similar might be the way to get a handle on the complexity of nanomsg&#8230;</p> <p>You will note that FIX msg events are in Blue and that the event is conditional to certain field values. The green represents function/subroutine calls those starting with lower case &quot;c&quot; are API calls from client, etc, etc</p> <p>If you are going to tell a story, tell it well&#8230;</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-2294811</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-2294811</link>
				<description></description>
				<pubDate>Thu, 14 May 2015 15:08:38 +0000</pubDate>
				<wikidot:authorName>Kiril</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>You have such a wonderful ability to explain complex subjects in simple terms and show the gist of the matter! Excellent!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-2282785</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-2282785</link>
				<description></description>
				<pubDate>Thu, 30 Apr 2015 13:26:07 +0000</pubDate>
				<wikidot:authorName>nomos</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Maybe this paper can complement the above description of state machines?</p> <p><a href="http://research.microsoft.com/en-us/um/people/lamport/pubs/deroever-festschrift.pdf">The pdf</a><br /> <a href="http://research.microsoft.com/en-us/um/people/lamport/pubs/pubs.html#state-machine">The list of Lamport papers</a></p> <p>The diagram seems to be essentially triples, ex: &lt;FIN_WAIT_1, ACK, CLOSING&gt;, more generally: &lt;STATE, EVENT, STATE&gt;.</p> <p>(from the papres mentionned)<br /></p> <div style="text-align: justify;"> <p>- A,B : Set, ⊢ relation on A and B :≡ subset of A x B</p> <p>- A variable :≡ (name, range) where range represents all possible values<br /> associated to this name.</p> <p>- An instanciated variable is (name, value ∈ variable.range).</p> <p>- A state is a set of instanciated variables.</p> <p>- A computation is an ordered sequence of states.</p> <p>- An events state machine is:</p> <p>- A set of states S<br /> - A set of initial states I, I ⊆ S<br /> - A set of actions A ∪ {⊥} where ⊥ denotes the initial action.<br /> - A relation N on S x A x S<br /> - S, I, N ⊢ { computations :≡ s1, a2-s2, &#8230;, an-sn, s1 ∈ I, 1 ≤ ∀ i ≤ n-1, (si, ai, si+1) ∈ N }</p> <p>- Example:</p> <p>- P, C ∈ atomic operations<br /> - var pc ∈ {0, 1}<br /> - Init :≡ (pc = 0)<br /> - Next :≡ (pc = 0) ∧ P ∧ (pc' = 1) ∨ (pc = 1) ∧ C ∧ (pc' = 0)</p> <p>- State machine :≡ Init ∧ Next*<br /> - Execution: (pc = 0, P), (pc = 1, C), (pc = 0, P), (pc = 1, C) &#8230;</p> </div> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-2129426</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-2129426</link>
				<description></description>
				<pubDate>Sat, 11 Oct 2014 13:31:16 +0000</pubDate>
				<wikidot:authorName>Dennis</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Fantastic article. I have used event driven state machines extensively in the past and found it to be a fantastically easy system for creating logical flows through the system. You call them narratives and think that that is entirely accurate. You can understand the story of what happened by the events that arrive and knowledge of the states of the machines when that event arrived.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1972737</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1972737</link>
				<description></description>
				<pubDate>Thu, 20 Feb 2014 10:10:05 +0000</pubDate>
				<wikidot:authorName>Fabrice</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Excellent article.<br /> That is exactly what we used (EDA and finite state machines) to manage the behavior of a robot.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1885289</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1885289</link>
				<description></description>
				<pubDate>Mon, 04 Nov 2013 23:51:16 +0000</pubDate>
				<wikidot:authorName>Wayne</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>This is a pretty fantastic read. I've actually stumbled in this direction completely by accident when doing WinForms programming in .NET. I simply have sought out the simplest thing that could possibly work, and it ends out almost identical to your tree structure, where there is a main controller object that communicates via function call to its subordinates, who in turn raise events when something &quot;interesting&quot; happens.</p> <p>All of the code that I see that fails to follow this pattern ends out a tangled mess of uh&#8230; &quot;logic&quot;. It's never really clear who is doing what or responsible for this or that.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1876518</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1876518</link>
				<description></description>
				<pubDate>Wed, 23 Oct 2013 09:08:21 +0000</pubDate>
				<wikidot:authorName>martin_sustrik</wikidot:authorName>				<wikidot:authorUserId>939</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I am kind of busy recently, so no promises&#8230;</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1876516</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1876516</link>
				<description></description>
				<pubDate>Wed, 23 Oct 2013 09:06:36 +0000</pubDate>
				<wikidot:authorName>Marc</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Any ETA for the follow-up article? Can't wait for it :-)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1837898</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1837898</link>
				<description></description>
				<pubDate>Thu, 22 Aug 2013 09:06:16 +0000</pubDate>
				<wikidot:authorName>Martin Sustrik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I all all for finite state automata. However, I wanted to make it clear it's not the same thing. Formal FSMs have, by definition, finite state (bacically a single enum) whereas the entities called &quot;state machines&quot; in engineering practice often have complex and varied state.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1837896</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1837896</link>
				<description></description>
				<pubDate>Thu, 22 Aug 2013 09:02:57 +0000</pubDate>
				<wikidot:authorName>Levi</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Event driven architectures and state machines are great to have in your toolbox, and this is a pretty good introduction to them, but I think your explanation of state machines does them a disservice.</p> <p>Although the typical implementation is a bit less formal, these kinds of state machines *are* related to the finite state machines of automata theory, and that's a *good* thing. Formalizing things, at least to some degree, helps you think about them in a structured and well-understood way. That's because they're based on simple theoretical constructs, not in spite of it.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1837874</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1837874</link>
				<description></description>
				<pubDate>Thu, 22 Aug 2013 08:37:28 +0000</pubDate>
				<wikidot:authorName>Martin Sustrik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Thanks!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1837872</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1837872</link>
				<description></description>
				<pubDate>Thu, 22 Aug 2013 08:36:09 +0000</pubDate>
				<wikidot:authorName>Simone</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Excellent reading, kudos! :-)</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1837767</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1837767</link>
				<description></description>
				<pubDate>Thu, 22 Aug 2013 05:06:26 +0000</pubDate>
				<wikidot:authorName>Brad Harder</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>John Ousterhout of Tcl (among other things) fame:<br /> <a href="http://www.cc.gatech.edu/classes/AY2009/cs4210_fall/papers/ousterhout-threads.pdf">http://www.cc.gatech.edu/classes/AY2009/cs4210_fall/papers/ousterhout-threads.pdf</a></p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1837401</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1837401</link>
				<description></description>
				<pubDate>Wed, 21 Aug 2013 16:34:45 +0000</pubDate>
				<wikidot:authorName>DavidM</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Good article.</p> <p>I think events are superior for several reasons:<br /> 1. They can be pretty easily logged. In your event dispatch simply log each event with its receiver.<br /> 2. They can have aspect-like rules attached. For instance: Any event which starts with 'set' should check the user who created it for authorization.<br /> 3. They can handle delegation by forwarding events to other objects. This is great for avoiding unnecessary inheritance.<br /> 4. Composition of events. Chain multiple events to fire in sequence.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1835787</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1835787</link>
				<description></description>
				<pubDate>Mon, 19 Aug 2013 08:19:58 +0000</pubDate>
				<wikidot:authorName>Martin Sustrik</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>One thing that comes to mind when looking at the example is that the body of the state machine should be organised by states first, by events second, not the other way round.</p> <p>Anyway, I am planning to write down my take on state machine implementation details in the next blog post once I have some time free. We can discuss it then.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1834726</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1834726</link>
				<description></description>
				<pubDate>Sat, 17 Aug 2013 18:16:53 +0000</pubDate>
				<wikidot:authorName>Ondrej Kupka</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>An excellent article. I am definitely gonna use those ideas for my projects.</p> <p>Anyway, I was fed up with doing the same stuff all the time, so I wrote <a href="https://github.com/tchap/go-statemachine">go-statemachine</a>. I am going to use it for implementing objects that are supposed to act as small synchronous event loops, and that is basically what those state machines are, right? Feel free to comment on the library, it's not like written according to this article or super optimized, it is for my purposes. But I still think that it might be useful for someone. I wrote it like today, so it can and will change, but you know, it's there ;-)</p> <p>Regards,<br /> Ondra Kupka</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1826199</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1826199</link>
				<description></description>
				<pubDate>Sat, 03 Aug 2013 16:10:44 +0000</pubDate>
				<wikidot:authorName>martin_sustrik</wikidot:authorName>				<wikidot:authorUserId>939</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1826181</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1826181</link>
				<description></description>
				<pubDate>Sat, 03 Aug 2013 15:05:51 +0000</pubDate>
				<wikidot:authorName>Mike</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>Excellent article!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1825408</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1825408</link>
				<description></description>
				<pubDate>Fri, 02 Aug 2013 03:48:42 +0000</pubDate>
				<wikidot:authorName>martin_sustrik</wikidot:authorName>				<wikidot:authorUserId>939</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>As for events, Joe Armstrong's doctoral thesis comes to mind. As for state machines, I don't really know. Let me know if you find something.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://250bpm.com/forum/t-677619#post-1825213</guid>
				<title>(no title)</title>
				<link>http://250bpm.com/forum/t-677619/event-driven-architecture-state-machines-et-al#post-1825213</link>
				<description></description>
				<pubDate>Thu, 01 Aug 2013 18:23:41 +0000</pubDate>
				<wikidot:authorName>nomosyn</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I can't wait for the next post :-) ! Are their any studies that confirm: &quot;events + state machines &gt; others&quot; ? Thx again !</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>