2007-02-19 Agent Queue (Q) Draft notes

Rest of Queue description is out of date and sould be rewritten,

THis notes are out of date

Aim

To provide communication between agents.

działanie

OPIS CO ROBI że pobiera obiekty i zwraca w tej samej kolejnosci pod kontem okreslonego typu jak w fifo - zresta opisz jak uwazasz jeśli mozesz bo nie wiem jak to ujaca w slowa po angielsku czy po poslku (słowa pisane)

API

A moze by tak zmienic nazwę z qeueuelement na queuetask ? :P
A jaki prefix dać na nazwy funkcji ?
"qa" jak queue agent
a może
"scs_qa_"
albo
"scs_queue_" ?
P.S. czy w nowym "C99" są przestrzenie nazw :P
.
Czy nazwywamy w końcu to co wkłada się do kolejki : task, czy object ?
W zależności od tego będzie albo
qaputtask, qagettask
albo
qaputobj qagetobj
A może element ?
scs_queue_agent_element qaputel qagetel ?


struct scs_queue_object_type
this structure defines type
struct scs_queue_object_id
this is an unique identifier of object in queue
struct scs_queue_object{scs_queue_object_ type; scs_queue_object_id, …. }
this structure provides
int qaputobj(scs_queue_object*)
puts object into queue . Returns "0" on success
scs_queue_object * qagetobj(scs_queue_object_type)
get a copy of object from queue. Original one is locked for time of processing. If processing is done package must be cleared from queue(see below). In other case return "NULL" on fail.
long qaamount(scs_queue_object_type)
An amount of objects of concrete type.
int cleartask(scs_queue_object_id)
clears concrete object from queue.

Command line

It's only a draft


putobj [-f format] - object at stdin
getobj [-f format] - type at stdin. object at stdout
getobj -t type [-f format] - object at stdout
amount - type at stdin. amount at stdout
amount -t type - amount at stdout
list - lists headers of all objects in queue in kuman readable format.
list [what] - types on stdin. [What] contains information what columns should be.
list [-t type1 [-t type2...]] [what] - [What] contains information what columns should be.
cleartask taskid - taskid can be also equal "*" .
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.