|
|
|
|
|
by ObnoxiousJul
5135 days ago
|
|
Most developers with no background in electroncis do not understand asynchronuous paradigm : Transitions = factorial(state).
In best case if they don't confuse states and transitions (wich is common) you'll end up with a spaghetti code where goto are replaced with callbacks on events. In common case they will make intricated state models without making the docs (state transition diagrams are a MUST have (like RFCs on network protocol)).
In the multi-threading context, most devs don’t fully grasp the concurrency problem (which is still an asynchronous problem).
So if you want to stay safe, use multithreading with disjoint data. Map Reduce is actually a pretty idiot proof paradigm for multi-threading. It only requires your data to be smartly shardable. Executive note :
- if event model : have all state transition models DOCUMENTED ;
- if multi-threading : once you have shared a context (config), uncouple all the data passed to your thread (and handle a SIGHUP to reload the conf safely). Event model done wrong will cry havoc on your code maintability the same as multitreading done wrong. |
|
Hey could you expand on this? I don't understand what you mean by transitions = factorial(state) and why this leads to spaghetti code when you confuse state and transitions.