Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] PTP RM commands and proxy events

Some comments below. Craig/Randy, please correct me if I've got anything wrong.

Greg

On Dec 20, 2006, at 9:42 AM, Dave Wootton wrote:

Craig
I have a question and a couple suggestions
When the resource manager sends commands to the proxy, it expects
asynchronous responses. Does this allow for multiple commands to be in
progress with responses pending?

The design allows for this by providing a transaction ID, so commands and events are matched.

[What I'm not sure about are unsolicited events. I'm thinking here about the SEND_EVENTS command. Presumably the response to this will be an acknowledgment event. After this however, there will be an arbitrary number of STATUS_CHANGE events. Should these have the same transaction ID as the SEND_EVENTS command, or a special transaction ID indicating there is no corresponding command?]

Does the design allow for commands where
you must get a reponse before proceding because you need some information
from the proxy, such as a list of available nodes, or is it up to the
implementor to deal with that?

The document doesn't describe the Java side, but the intention is to provide a listener on the command object that will be called when an event with the corresponding transaction ID is received. A typical example is job submission, which will work something like:

.
.
js = RM.createJobSubmission(jobconfig);
js.addListener(this);
RM.submitJob(js);
.
.


The listener will be called with the newly created job when the JOB_SUBMISSION_EVENT is received. This will be handled transparently by the AbstractProxyResourceManager.



For resource manager commands, additional commands that might be useful include commands to query node availability, query resource pools, query job classes, query job queues, query what's running on the machine, what's running on nodes, change job priority, cancel pending jobs (vs killing a
running job), disconnect from and reconnect to proxy. If the proxy is
expected to inform the resource manager of the complete state of the
machine, queues, etc, at startup, some of these queries might not be
required.

We originally had commands for all these things (at least the query commands anyway), but they were never needed with the event model. We eventually removed them, but they could be added again if there was a pressing need.


There's probably some additional commands required to initiate an
application under debugger control since the proxy may need to do extra
work in that case.

Yes. At the moment all that is passed is a flag indicating that the debugger is to be started, and some debugger options, such as the location of the executable, etc. If you can think of other information/commands that might be needed, please let us know.


For events the proxy sends to the resource manager, again, I don't see
anything missing, but additions would be needed as responses to the
additional resource manager commands I suggested.

Dave




Back to the top