Monday, November 12, 2007

Design alternatives

Zhenhua Guo

Where should the control logic be located, at service side or client side?

(1) Client side

There will be lots of javascript work.

To use JavaCOG, there two choices:

(a) Support task/taskgraph submission:

In javascript, mirror related classes (Task, Specification, Taskgraph … ) of JavaCoG. Those classes in javascript just send encoded instructions/commands to agent server.

Like this:

In a work submission, a client needs to contact server many times besides status checking.


(b) Support Karajan workflow submission:

The client javascript must support the Karajan workflow language, including parsing it, generating corresponding control logic... This functionality has been implemented at JavaCoG. So, I don't think it is reasonable to reimplement it in Javascript.

One issue:

  • How to submit task to the agent?

  1. Client splits the original workflow description into separate smaller ones.

Client javascript maintains relationship (parallel or sequential …) among these small pieces. When needed, it submits a certain workflow piece to agent.

If so, maybe submitting the whole Karajan workflow is better.

  1. Convert the workflow description to detailed instructions and then send these instructions in the way described above in (a).

(2) Server side

Client side composes the Karajan workflow document based on the users' requirement and then sends it to server.


Summary:

Method (2) is preferred.

Notification:

(1) Pull

Client side javascript program periodically sends messages to server to check the status of submitted task. The interval of polling is difficult to choose.

One solution is that the pull action is driven by users. We can put a button on the webpage. If the user wants to update the status report, just click the button. Obviously, this is not user-friendly.

(2) Push

In javascript, a client program can not listen to a specified port like regular socket programming. However, we can make use of the request-reply communication style to indirectly simulate that functionality. Every time the client sends a job status checking request to the server, server does not return immediately the response message until some conditions(job is completed, job fails or time out) are satisfied.



Complex workflow support

I am not very clear about support provided by Karajan for complex workflow. Can a workflow be part of another larger workflow?

If so, we don’t bother to do it.

If not, we need to complete simple control logic in client side javascript. Support sequential execution, parallel execution...

UI consideration

Do we need to provide client side UI components to help users build workflow more quickly? Are the UI components workflow language specific?


Server side components:

  1. User management

    1. write our own management system

    2. use existing system

How to integrate it into our system?

Where to store user related data, including users’ identity information, submitted tasks...? In database, or just regular files?

  1. Job management

queue...


How to check status of submitted jobs by using CogKit?

No comments: