Some Notes about WebFlow

Module Development with GUI

  1. If the module you are developing needs a user input, then you need to define an applet for this GUI. This definition should be included in the initialize() method of Module and put it 'html' attribute of MetaModule object so that when this module is created by MM this information being sent to the user side and it can execute the necessary stuff there.

  2. On the front end, when you realize that module has a GUI, you use the viewerID of this module and ask SM this viewer object it will return you the necessary html page to fire the applet in the bottom frame of the netscape window.

  3. Why did we do that?
    Because it is not possible through java to display an HTML page without going through JavaScript. I did not know the current stuation.

  4. We can get rid of the viewerID approach by defining an Echo Servlet on the server side.

  5. Since all the GUI's directed to the bottom frame, each GUI should sit in the frame object so that it can pop up a different window. If your application needs a seperate netscape window(such as you need to use VRML browser) then while you are defining the module in initialize() you need ti provide window name information. This information and the id of the module will be used to open all the stuff in a seperate netscape window. Window name is concatented with the module Id to get the unique window id for each invokation of the same module.

  6. How does GUI of the module communicates with the module on the server?
    ServerSocket. When you are defining a module also you open a server Socket and give this address as an applet parameter to the GUI. Whenever GUI pops up, it tries to make connection with this given server socket and then it can send the necessary inputs through serialization. On the server side, the best approach is to define an object which runs it seperate thread and knows the handle of the module object. So that you can seperate the module's body from the GUI control. You have to becareful here especially you are dealing with some control parameters of the module. You have to use 'synchronize' write to the attributes of the module. Give sampling value example for time based sampling filter.

How can I check that CM and MM is working?

How can I see the running modules on MM?

How does a module with GUI started under WebFlow?

  1. showViewer(viewerURL, WinName) of WebFlowEditor
    This method lets us access to the session servlet and receives the HTML page from the session servlet and put it given WindowName if there is a window name otherwise it will put this HTML page into bottom frame(might be Viewer?).

  2. Who invokes showViewer()?
    newViewer() of WebEditor. In this methow, front-end builds viewerURL by concatenating SMURL+"?cmd=get_viewer&viewerID="+key+"&clientID="clientID. Note that we know the viewerID from MetaModule and clientID from the first connection.

  3. Who invokes newViewer()?
    postPlacement() of WebNode. In this method front-end does the followings:

    1. Initialize the module. (invoke initializeModule() of WebEditor)

    2. Receives the reply and from this reply wecan decide whethet the module has GUI. If it has, front-end looks at its window name and viewerID. Then front-end invokes the newViewer() with the viewerID and window name(it sends null if it is not provided).

Who provides the SMURL to the WebEditor?

How does WebEditor know moduleListURL?

In the InitializeSocket() of WebEditor.

How does WebEditor send messages to the SM?

requestFromServer() of WebEditor.

  1. Opens a URL connection with SM and reads the status and portNumber information. If the operation do not need further information, it wont get portNumber. Otherwise it will get portNumber to read the additional information such as SMreply/MMreply/CMreply.

  2. If the current request needs further info, it will open the necessary I/O streams through portnumber and receives the reply.
connect(), runModules(), destroy(), destroyModule(), endSession() of WebEditor uses this.

How Connection works?

WebArc is the class.

  1. connect() of WebArc applies the necessary checks and then invokes the connect() of WebEditor with necessary information.

How can we define the Visual Representation of a Module ?

WebNode1, WebNode2, WebNode3, WebNodeImgF, WebNodeImgV,..etc all extended from WebNode so that all can use postPlacement() of WebNode.

Improvements

  1. Documents and WebFlow pages. It is not clear how you end up with webflow 0.0.3 or webflow 0.0.4.

  2. Documentation should be reviewed ( except the Set Up-Download explanations). Module Development help sucks. It does not have at least walks through the developer on one real module.

  3. Dimple's improvement did not tested(Tom said something). This might change the Module Development information page. This should be done very quickly and should be tested. This improvement provides

    1. cancellation of port definition done by users

    2. requires user to write its own data in case he/she uses an object which is not serializable.

    3. validity checks on the front-end ( connect output->input, type checks)

  4. try GEF V0.5 with JDK 1.1 version

  5. Visual Representation of each module can be generalized. Problem: we do not know without initializing the module how many ports does it have? (MetaModule wont work)

  6. A general solution for GUI of Module.

  7. A Vector of Inputs and Outputs. And run the module whenever its input changes.

  8. Combining modules.txt with hierarchical representation.

  9. Client support. Password. ACL definition for the modules.

  10. Mesh of WebFlow Servers.