I would like to setup a small program that retrieves info from a database and then distributes that information to another program when requested. For instance, a program called 'Master' would retrieve data from the database and create a collection of objects (list, array, etc. whatever works best) and then a program called 'Slave' (running from multiple desktops) could call a method (i.e., GetNextRecord) from 'Master' to retrieve the next record in the collection.
I would like to be able to only allow one 'Slave' to be able to call the GetNextRecord method at a time to avoid giving multiple slaves the same record. 'Master' would run on the server with the database while 'Slave' would be running on multiple desktop machines.
Does anyone have an example of this or a tutorial on how this is done?
TIA, Brian Enderle
What you are describing is generally known as three-tier or multi-tier design.
There are some Delphi libraries out there to make it easier:
Related question:
Advice on moving to a multi tier Delphi architecture
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With