As an extension to what Dave said. Basically any time you need to do
atomic math in a distributed environment, the Named Counter service is
vary valuable. If you were to store your counter in a STAF variable, then
you would have to protect it with a STAF Mutex Sempahore so that two
updates wouldn't step on top of each other. The NamedCounter service
takes care of that for you. So, as an example, let's say you were running
the same test case on a set of machines and you wanted to keep an active
central count of how many times it had been run across all machines.
NamedCounter makes this easy by simply placing one INC call in your test
case. While there are certainly other ways to achieve this goal, using
NamedCounter is one quick way to do so.
Charles Rankin
From:
David Bender/Austin/[EMAIL PROTECTED]
To:
staf-users@lists.sourceforge.net
Date:
10/22/2008 09:36 AM
Subject:
Re: [staf-users] Named counter service
The NamedCounter service allows you to do synchronization based on a
numeric count. For example, the STAF Semaphore service provides named
Event semaphores, but these semaphores only have 2 states (post / reset).
The NamedCounter service allows you to essentially create a semaphore with
any number of states.
As an example, if part of your test automation included initialization of
a pool of 20-30 servers, and after 10 of the servers have completed their
initialization, you wanted to kick off your testcases against the server
pool, you could use a NamedCounter, where each server would increment the
named counter when it completes its initialization, and the test
automation would only kick off the server pool testcases when the named
counter has reached a value of 10.
David Bender
STAF/STAX Development
8-1268 (512-838-1268)
IBM Austin Bldg. 903-5B002
Internet: [EMAIL PROTECTED]
Vijita <[EMAIL PROTECTED]>
10/22/2008 05:59 AM
To
staf-users@lists.sourceforge.net
cc
Subject
[staf-users] Named counter service
Hi all,
Can anybody please explain in detail that how actually named counter
service works? what are th advantages of this service?
Thanks,
Vijita.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users