On Mon, 9 Nov 2015, Aradeonas wrote:

I think like you but I doubted that is a good idea but now you have the
same idea so it should be good.
So I want to ask some question:
What is the best approach to make a connection between cgi and service?

It can be as simple as files in a directory.
It can be as difficult as records in a database.

Do you have any idea for users in the queue?
for example user1 and 100 request and user2 add 100 and so on.

If you use files :
One directory per user, one file per task in the directory. loop over user directories, and always process only 1 file per user dir in the loop.

in sql that would be

select userid,min(task) from tasks where tasks.done=0 group by userid

for a table, for example
create table tasks(
  userid varchchar(100),
  task int,
  done int,
  taskdata mydatatype
);

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to