mitd has asked for the wisdom of the Perl Monks concerning the following question:
After several months of cleaning up a J2EE mess (hey 7 kids and folks in trouble (as long as you are not the cause) always pay well and up front) I am delighted to be back solving interesting problems with Perl.
We are presently doing some clever Perly to get two legacy financial services systems to talk to each other and exchange data, ideas and wives.
As is quite common with these pass the transactions thingies I find myself preparing to write a persistent sequential counter ('Holy Spider Pucks' did I just describe a Web counter NOT!) for the purpose of supplying unique request ids to be included in XML formatted requests.
Stop! I am not about to ask for code! Carry-on
There are some constraints: an RDBMS cannot be used. (MySql auto-increment would be lovely but not an option). There is a need to group some ids Ala one side of transaction generates ONE REQUEST but the when it reaches the other side it has has broken into 3 sub requests that each require there own id eg ReqID 100 becomes subReq 100A, 100B, 100C.
So there it is simple really I know. So flat file it with locking, maybe use Storable, tieScalar to persistent store or how 'bout storing right in script Ala Damian's Inline::Files?
Just curious about some 'best thought' from the community collective or just ignore me and I'll go back to using my fingers and toes.
mitd-Made in the Dark
'My favourite colour appears to be grey.'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Persisten sequential transaction id generator
by mattr (Curate) on Aug 02, 2001 at 12:34 UTC | |
|
Re: Persistent sequential transaction id generator
by trantor (Chaplain) on Aug 02, 2001 at 16:53 UTC | |
|
Re: Persisten sequential transaction id generator
by merlyn (Sage) on Aug 03, 2001 at 02:41 UTC |