Any penalty to using one big cluster in a state machine?

I've been working on a lot of small/medium sized state machines lately, and I've gotten into a habit of putting most of my data (single values, arrays, strings, even LVOOP objects) in one cluster that I pass from state to state with a shift register.  I just unbundle the data I need in each state, work on it, and bundle it back in for the next state.  Part of me says that this is a bad idea - that I should separate the big cluster into a set of smaller clusters that group the data by logical categories.  Another part of me says that if I do it that way, I'm just creating needless clutter on my diagram.
So my question is simply this - is there any significant performance penalty for using a single cluster rather than multiple clusters in this fashion?  I never run the whole cluster into subVIs, and I never split the main cluster wire, so it doesn't seem like there should be... but I've been wrong before!
Thanks,
Jason

As Norbert mentioned, the answer to your Q is dependant on your data structure. Provided you can do all of your data manipulation "in-place" there should not be any issues. The more complex structures can still be handled "in-place" but you may have to use the in-place operations to achieve this effect. Depending how comfortable you are with those operators, they can complicate the appearence of our code.
If you can'y do everything "in-plcae" and you have a Super-Cluster, then its time for me to Quote Rolf again when he wrote "Once all of you physical memory is filled up with a single cluster, your application is probably going to suck."
So lest say you have cleared all of the above hurdles and still want to use a single SR that has all data for all states. I ask you to carefull examine where the app may go in the future and what type of animal it could turn into. if there is even a small chance that app may turn into something that non-computer users will use (requires robust app to prtect itself from dumb users) the single cluster approach is going to get in your way when the app gets big.
1) If you have to add another field to the cluster, every function that uses that cluster should be re-tested. WE have an app in-house that was developed by our customer and we support. There is an 800+ step proceedure required to re-verify the app!
2) AS more functionality is added you will add more states to your state machine. Personally, I cringe when I see the support developer have to choose from a list of 300 states when working with the Stae machine.
3) You will have a hard time re-using code aside from cutting-n-pasting
4) When you unbundle manipulate and replace, you are in danger of creating duplicate data which will impact performance.
I never went through the formal IS training but my wife did and she has given me the short version to learn how to normalize a DB. There is actually a science to the process that results in only related items being grouped together and if you take to the full exdtreme of "fully Normalized DB", there absolutely no duplicates of data. For LV apps a Fully Normalized DB adds some overhead so I don't go that far.
THe following will ignore using an Object Oriented approach and stick with old-school ideas.
So after I analyze my data structures and group related items together and review who touches what when, THEN I try to wrap-up the data in Action Engines. More often than not, the action will replace some or most of the work done in some states. From your Q it sounds like your "read-mod-replace" constructs can be moved into AEs with little effort.
Now for OOP
I'm still learning OO system design but I have found myself "turning my apps inside out" with LVOOP. By this I mean rather than think that the data AND the function are inside the AE, the data is outside and acted on by what is inside the LVOOP methods. I have been amazed at the degree to which LVOOP can operate in-place, but I digress. There is some arguement/design pattern that says that if you have a function like a test that uses other classes, then you can create a class for the test and slam all of the required object into you need.
Done rambling for now. As usual, if there is anyone out there that want to correct me any of the above, please do so!
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Can I use One Hard Drive for 2x Time Machine Back Ups and another partition for all my data?

    Hi Forum,
    I am planning to but a RAID disc set up, but if i get a 2 disc set up, on one disc, can i have:
    Time Machine back up for one Mac
    Time Machine back up for 2nd Mac
    Anothe partition for all my data.
    then have that RAID'd to second disc?

    no one?
    and if this set up was on one disc, and one partition for one TM was for the Mini that has this drive attached, would TM back up this whole drive 2x TM Partitions and 1x partitions with data on, ok? it wouldn't get confused by trying to back itself up

  • How to use a event structure with a state machine

    First, I would like to inform you that I only work on LabView part time, and have much to learn.  Anything I do learn, I usually forget until I need it again, because I only work on it part time.
    Using your StopWhileLoopMOD[1].vi, I am trying to put a state machine inside the event structure.  
    Related link: http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/td-p/465564/page/2
    Here is my application:  on the front panel, the user can select any combination of 7 different tests.  I have created cases to perform each step of each test in the correct order, but if the user presses stop, the tests won't stop because some of the cases have a while loop inside the event structure (like you mentioned is a bad idea).  The user should be able to stop the test, reselect tests to perform, and re-start the tests. 
    When the start button is pressed for the event structure, I need all the cases to run in the proper order, unless stop is pressed.
    In the past I have indexed an array and used that to run the state machine, but it won't stop immediately.  
    I have sub VIs that are built in while loops because the outputs of the product needs time to stabilize.  The state machine stops and waits up to a certain number of iterations.  If it passes the test, the while loop stops and the next state starts.  If it takes too long, it exits and reports an error.  Maybe I need to just use the state machine and not an event structure?
    Is there a good example of an event structure?
    metzler CLAD
    Solved!
    Go to Solution.

    I'm not sure exactly what you are asking, but it sounds like you want to script a bunch of tests and if the user says stop, to immediately stop the current test and abandon the others?  I'm going to assume that you know how to clear the array so that it will abandon the others, so I'm guessing that you are having trouble abandoning the current test?  If this is indeed the case, then the problem is that you are not able to propagate the message from the main VI FP which is the GUI to the sub vi which is the test, where the test may or may not have a GUI (FP visible) of it's own.  Threading was the first thing to come to mind, but this may not be necessary using events.
    You can do this by passing a refnum of the stop button to the subVI, where you can then add that wait to the event case structure.
    I've attached 2 VIs, mainvi.vi which is just a loop displays the count*2 (number of seconds passed since running) that will call subvi.vi and then check to see if the stop button is pressed.  mainvi.vi is by no means a state engine, it is just a simple loop for demonstration purposes.  subvi.vi just waits 2 seconds and leaves, it is a better structured state engine with an init state to start a poll case to wait for events and an exit state to clean up.  You can modify this any way you wish to get it to do what you want.  You will note that even if subvi.vi is being executed, it will terminate immediately when the stop button is pressed.
    Hope this helps.
    A
    Attachments:
    mainvi.vi ‏17 KB
    subvi.vi ‏33 KB

  • Using "don't care" in digital state machine?

    Hi:
    I am trying to use the digital state machine component and received some advice from tech support about how to properly make a state.txt file.  However, the simulation of the state machine freezes when a "don't care" condition is encountered for any of the inputs.  Here is what my state.txt looks like: 
    I'm assuming that an "x" represents a "don't care".
    Any advice, comments, etc.  Would be greatly appreciated.
    Attachments:
    state-x.txt ‏1 KB

    The digital state machine is a XSPICE model and the 'don't care' condition is not supported by the XSPICE model engine.
    Tien P.
    National Instruments

  • Using one object in multiple threads

    Are there any drawbacks in using one instance of an object in several threads simultaneously, if this object has no instance variables?
    I need to implement DAO in my project and I just wonder why DAOFactory every time creates a new DAO object, when DAO object doesn't have any instance variables?

    Are there any drawbacks in using one instance of an
    object in several threads simultaneously, if this
    object has no instance variables?
    I need to implement DAO in my project and I just
    wonder why DAOFactory every time creates a new DAO
    object, when DAO object doesn't have any instance
    variables?I don't think there are any problems with this. Since you have no instance variables there isn't really any overlap between the two threads.

  • Finite state machine using jsf ?

    I am building an online payment module and would like to implement it using a finite state machine. I am hoping that someone may give us advice on how to build it with jsf.
    Firstly, I am just beginning with jsf.
    Here is the example: Let's say that in the module there are 7 possible states that the user may be in, each represented by a jsp. I cannot decide where to manage state transitions. One option is to change states in the backer bean of every state, but that is dispersing transition logic across all my backer beans. The other option I can see is to have one single actionListener and have all action events pass through the 'processAction' method, keeping all the state management logic in one place.
    Please comment on either of these two approaches...or any alternatives :)
    Thanks in advance !
    Mark

    Sounds like a state machine in combination with a decorator on the ViewHandler might do the trick.
    Off the top of my head I'd suggest creating a managed bean in session scope that keeps track of the state in the user's session (the state machine). Check the bean from the ViewHandler decorator when a page is requested and direct the user to the correct page if they are trying to navigate to a page that conflicts with what is allowed for their current state.
    Your actionlisteners or action methods could change the user's state in the session as they process their actions.
    http://forum.java.sun.com/thread.jsp?forum=427&thread=502322
    The above thread discusses the use of a decorator to control navigation for authentication purposes, but it should be adaptable to this use.
    Is that plausable or am I smoking crack? :-)
    -jeff howard

  • Can I use one transport adapter on the nodes of the cluster?

    Hi
    I am new to sun cluster, in the cluster documentation they mentioned that each node should have 2 network cards one for public connections and one for private connection. what if I do not want the nodes to have public connections except for one node. In other words, I want to use one network card on each node except for the first node in the cluster, users can access the rest of the nodes through the fist node . Is that possible? If yes, what should be the name of the second transport adapter while installing the cluster software on the nodes.
    Thank You for the help

    Dear
    We are using cluster for HA on failover condition, If you have only one network adapter so how you work in failover, and you can't assign one adaptor to two node as same, you have min 2 network adapter for 2 node cluster..
    :)GooDLucK
    Mohammed Tanvir

  • Since installing an icon-editing add-on, I can't open tabs any more / I can only use one tab at a time.

    Ever since I installed the add-on Favicon Picker 2 that lets you change the bookmark icons, I can't open tabs any more. The second tab will open, but if you try to go to a site, the FIRST tab redirects to that site. Basically, I can only use one tab at a time. Is there any way I can keep this add-on and use tabs?

    Oh, wow - look at that, you're right :) I didn't want to uninstall the add-on as I like the feature, but simply by disabling it you can keep the new icons AND use tabs. Thanks dude!
    (The add-on is Favicon Picker 2 0.6.2.15 by the way - some of the user reviews report the same problem.)

  • I just downloaded Maverick last week, and ALL of my contact groups have duplicated.  When I use one to send a group e-mail, everything is doubled in the address bar.  Any suggestions?  Very frustrating.

    I just downloaded Maverick last week, and ALL of my contact groups have duplicated.  When I use one to send a group e-mail, everything is doubled in the address bar.  Any suggestions?  Very frustrating.

    Hello Joannah,
    Thank you for details of the issue you are experiencing with duplicates in Contacts after upgrading to OS X Mavericks.  I would be frustrated by this too.
    If you have enabled iCloud Contacts, I recommend following the steps in the article below:
    iCloud: Resolving duplicate Contacts after setting up iCloud Contacts
    http://support.apple.com/kb/TS4147
    If you’re not using iCloud, I recommend this article instead:
    Contacts (Mavericks): Combine duplicate contacts
    http://support.apple.com/kb/PH15079
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Can any person tell me in very very very simplitic way how to use one of the downloaded tunes as a ring tone? The one I wanted to use does not come as a ring tone but I want to use it as a person ringing tune.

    Please can any one tell me how to use a downloaded tune as a ring tone as, I want to use one that is not available as a ring tone. I would like to use it as a person ringing ID tone. Please can you tell me in very very simplitic way with an idiots guide for a two year old as I am not good with difficult intructions. Thanks for any help .

    Google will find several free ways to create ringtones.
    I am sure you can find instructions that you can understand.

  • I want to check the main diffrence in Pop up block enabled and disabled.But,i don't get any difference.Would u please help me to understand the difference using one practical example of website

    I want to check the main diffrence in Pop up block enabled and disabled.But,i don't get any difference.Would u please help me to understand the difference using one practical example of website

    Here's two popup test sites.
    http://www.kephyr.com/popupkillertest/test/index.html
    http://www.popuptest.com/

  • When I set up my iMac I used one of two iTunes accounts I have, I now need to change it to the other one......any ideas?! Thanks in advance

    When I set up my iMac I used one of two iTunes accounts I have, I now need to change it to the other one......any ideas?! Thanks in advance

    Hi Pompey Woody,
    Thanks for visiting Apple Support Communities.
    If you need to use a different Apple ID (iTunes Store account) with iTunes on your Mac, you can sign out and then back in with the other account:
    Open iTunes. ...select Store > Sign Out, then select Store > Sign In and enter your current Apple ID.
    These steps are found in this article:
    Apple ID: What to do after you change your Apple ID
    http://support.apple.com/kb/HT5796
    You may also find the information in this article helpful:
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Best,
    Jeremy

  • Is there any way to use Internet Explorer on a Mac? I have one insurance company that I do business with that you must use internet explorer

    Is  there any way to use Internet Explorer on a Mac Book Pro? I have one company that I do business with that only uses Internet Explorer

    Internet Explorer is not available for Mac.
    But you can make Safari pretend to be Internet Explorer in some cases.
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        "Develop" menu will appear in the Safari menu bar.
        Click Develop, move mouse down to "User Agent".
        Select Internet Explorer from popup on the rightside.
        After using Internet Explorer, revert back to Safari, doing the same routine.

  • Our service provider add one digit to all nos. After I update all contacts using one of available programs, contacts are updated but messages received appear with pure phone nos not contact name??any fix

    Our service provider add one digit to all nos. After I update all contacts using one of available programs, contacts are updated but messages received appear with pure phone nos not contact name??any fix

    http://discussions.apple.com/thread.jspa?threadID=2280669&tstart=0

  • TLS cipher suites: Is there any Windows application that is using one of the two NULL cipher suites?

    My question is about these two standard cipher suites from Windows 7/8 (and Windows Servers):
    TLS_RSA_WITH_NULL_SHA256
    TLS_RSA_WITH_NULL_SHA
    Question: Is there any native Windows 7 application/process that must use one of these two ciphers?
    If not, I would simply kick them out to make sure that they are never used.
    Bonus question: Is there any reason to keep these on any Windows Server?

    Thank you for your response. I kicked out the NULL ciphers and everything weaker than 3DES. Consequently I also deactivated SSLv3 on five windows clients (computers and not servers, no server admin here). Rearranged the order of preference according to
    my needs. So far I don't experience any issues. Did the same with JRE many years ago (just kicked it out), now I lean back and enjoy the show.

Maybe you are looking for

  • While moving the cursor on my laptop the page view got smaller and i cannot change it back to normal

    screen view has reduced in size it occurs for no apparent reason when i am navigating the cursor around the screen

  • Archiving stops with no reason

    Hi, I'm trying to enable archiving on a XE database: 1. Change from 2 redo log groups to 3 adding one and change the size to 100M each file. 2. Enable archiving. Shutdown Mount alter database archivelog Open Shutdown Startup Until this point all went

  • Acrobat X Multi-Threaded?

    If I scan a document that has 100 pages and Adobe has to perform OCR and all of its other processing tasks, where can I tell it to do more than one page at a time??? I have 12 cores and Adobe barely uses 5% while doing this task which takes forever.

  • Phone Interference Recording Audio

    Hello Everyone: I've been recording music with my current setup over a year now and had no problems. Suddenly I now can hear voices (sounds like phone conversation) during my vocal recordings. I thought it might be the mic so I tried it in on an amp

  • Problem in application server

    Hi, while staring my weblogic application server , I starts but giving the following error, Please let me know how to avoid these error as it is creating problem in my BPEL process HT. <Nov 19, 2009 8:25:09 PM IST> <Notice> <WebLogicServer> <BEA-0003