How does BOARD handle concurrent execution of procedures?

Options

Hello, 

We have a procedure which clears some cubes and then runs some data flows to reload the cubes. The procedure may be triggered by user activity. If two users cause the procedure to run at about the same time what happens? Does one run and complete before the other is executed? If not is there a way to single thread this kind of thing? 

Thank you

Tagged:

Answers

  • Unknown
    Unknown Active Partner
    Options

    Good question Peter DeGregorio,

       If I can add a followup... is there any way to confirm if these processes run sequentially or in parallel by viewing one of the logs? ...which one?

  • Peter DeGregorio
    Options

    Thank you Daniel Zillmann for your thorough explanation; without my getting into the boring details I'll just say it was helpful beyond the question at hand. 

  • Gerrit Kohrs
    Gerrit Kohrs Active Partner
    First Anniversary First Comment 5 Up Votes 5 Likes
    Options

    Hi Daniel Zillmann,

     

    excellent explanation! This is also what we do, when we want to make sure that only one user at a time can execute a certain procedure. Maybe you even got this inspiration from one of my colleagues during your last project with SDG?

     

    One additional hint, though: Instead of directly showing a message that someone else is currently executing the procedure and forcing the user to click again, I usually use the "Wait"-Action together with a second cube (by User) as a counter. I then set an IF-Statement to try 20 or 30 times if the procedure is still in use: 

     

    • User A starts the procedure. -> The procedure is "locked"
    • User B tries to start the procedure. -> IF-Statement finds the locking cube populated and redirects to another IF-Statement which checks how often User B has already tried to execute.
    • User B's procedure waits 1 second, adds a 1 to the counter cube and tries again as long as my limit is not reached
    • Only if the pre-defined limit has been reached by User B, he or she will get a message asking to try again later.

     

    btw: You can clear the locking cube during your regular update routine to make sure that the procedure isn't locked forever, if something goes wrong.

     

    Kind regards,

    Gerrit

     

    procedures looping locking workflow

  • Daniel Zillmann
    Daniel Zillmann Active Partner
    First Anniversary Level 200: Leveraging Board for Business Insights Level 100: Foundations of Building in Board Photogenic
    Options

    Hi Gerrit Kohrs  @SDG Group,

     

    I sure did, it was Maximilian Hallerstede @SDG Group who taught me that.

     

    I have actually seen your enhancement as well and I have used it a few times now. The counter prevents that the user is stuck in the procedure forever if the cubes do not get cleared. Definitely a good idea to do that.

     

    Cheers,
    Daniel