Just a progress note: example of output:

--------------------
http://zguide.zeromq.org/page:all#Handling-Multiple-Sockets
[mspoller] Process Monitoring pthread for test/zmq/mspoller start at 1328944214
[mspoller] Process 15247 created for program test/zmq/mspoller
[msreader] Process Monitoring pthread for test/zmq/msreader start at 1328944214
[msreader] Process 15248 created for program test/zmq/msreader
Exit due to ZMQ error 35: Resource temporarily unavailable
[msreader] Exit 35: Resource temporarily unavailable
[msreader] Monitoring pthread for test/zmq/msreader done finish at 1328944216
[msreader] Signalled DEAD for test/zmq/msreader
Funeral of process msreader
[mspoller] KILL: Process 15247 for test/zmq/mspoller exceeded time limit 20
[mspoller] SIGNAL 9: SIGKILL
[mspoller] Monitoring pthread for test/zmq/mspoller done finish at 1328944236
[mspoller] Signalled DEAD for test/zmq/mspoller
Funeral of process mspoller
Finished with group http://zguide.zeromq.org/page:all#Handling-Multiple-Sockets
--------------------
http://zguide.zeromq.org/page:all#Handling-Errors-and-ETERM
[taskvent] Process Monitoring pthread for test/zmq/taskvent start at 1328944236
[taskvent] Process 15249 created for program test/zmq/taskvent
[taskwork21] Process Monitoring pthread for test/zmq/taskwork2 start at 
1328944236
[taskwork21] Process 15250 created for program test/zmq/taskwork2
[taskwork22] Process Monitoring pthread for test/zmq/taskwork2 start at 
1328944236
[taskwork22] Process 15251 created for program test/zmq/taskwork2
[taskwork23] Process Monitoring pthread for test/zmq/taskwork2 start at 
1328944236
[taskwork23] Process 15252 created for program test/zmq/taskwork2
[tasksink3] Process Monitoring pthread for test/zmq/tasksink2 start at 
1328944236
[tasksink3] Process 15253 created for program test/zmq/tasksink2
Total expected cost: 0 msec
.:...................:...................:...................:...................:...................:...................:...................:...................:...................:..................Total
 elapsed time: 1000 msec
[taskvent] Exit 0: OK
[taskvent] Monitoring pthread for test/zmq/taskvent done finish at 1328944240
[taskvent] Signalled DEAD for test/zmq/taskvent
[taskwork21] Exit 0: OK
[taskwork21] Monitoring pthread for test/zmq/taskwork2 done finish at 1328944240
[taskwork21] Signalled DEAD for test/zmq/taskwork2
Funeral of process taskvent
Funeral of process taskwork21
[taskwork22] Exit 0: OK
[taskwork22] Monitoring pthread for test/zmq/taskwork2 done finish at 1328944240
[taskwork22] Signalled DEAD for test/zmq/taskwork2
Funeral of process taskwork22
[taskwork23] Exit 0: OK
[taskwork23] Monitoring pthread for test/zmq/taskwork2 done finish at 1328944240
[taskwork23] Signalled DEAD for test/zmq/taskwork2
Funeral of process taskwork23
[tasksink3] Exit 0: OK
[tasksink3] Monitoring pthread for test/zmq/tasksink2 done finish at 1328944240
[tasksink3] Signalled DEAD for test/zmq/tasksink2
Funeral of process tasksink3
Finished with group http://zguide.zeromq.org/page:all#Handling-Errors-and-ETERM
--------------------

Specification (in Felix code):

// filenames of executables
mspoller := list$ exec_prefix+"mspoller";
msreader := list$ exec_prefix+"msreader";

tasksink := list$ exec_prefix+"tasksink";
taskvent := list$ exec_prefix+"taskvent";
taskwork := list$ exec_prefix+"taskwork";

// test groups
group5 :=
  "http://zguide.zeromq.org/page:all#Handling-Multiple-Sockets";,
  list (("mspoller",mspoller), ("msreader",msreader))
;

group6 :=
  "http://zguide.zeromq.org/page:all#Handling-Errors-and-ETERM";,
  list (
    ("taskvent",taskvent), 
    ("taskwork21",taskwork2), ("taskwork22",taskwork2), 
("taskwork23",taskwork2), 
    ("tasksink3",tasksink2)
  )
;

PLAN: at present the process manager just runs the examples with a timeout.
Each process is monitored by a pthread, and the mainline just reads
death reports, then continues. There is no logging of the outcome,
and no capturing of the output at this point.

It's a bit hard to see how to do this until we have a sane use case.
So the plan is to implement

Zork: the client
norK: the server

2 points to anyone that can figure out why the server is called norK :)

In a test environment, norK daemons are started up on various machines.
These daemons open up 0MQ sockets for instructions. We use ssh to start
the daemons.

On the users machine, we start up the client Zork, and tell it what servers 
there are.
Zork then accepts various command such as 

* Check server status
* send a processing request and get the results

The processing request might be "run all the examples from
the guide".

At present, it seems like the communication protocol encoding
could be JSON. Zork can hang about and wait for various results,
possibly in the background, and log them somehow. Zork can also
tell the norK daemons to suicide.

One important request is to ask one daemon to relay a request
to another.

Writing the code for all this is not so hard. Harder, to figure out
how the guide examples should report if they worked correctly.
Using "expect" files won't work because of randomness in both
the data and asynchronous behaviour of processes and threads.

--
john skaller
skal...@users.sourceforge.net




_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to