MVC Web - Architecture

I'd like to develop a system for an industrial plant using MVC pattern and Web resources, but I noticed that it's difficult (maybe impossible!!!) to make notifications from Model tier to View tier because i can't just send responses, without requests. The goal is to provide dumb terminals with the state of the plant. There are about 100 terminals and I think it's almost impossible to provide a good response-time by putting this clients on a loop to get modifications in Model tier. It could overload the server.

1 - Is it possible, to send Responses without requests?

2 - Would Swing be a more appropriate resource in this case? Or Applets?

3 - I'm looking for articles, examples or books with tips about this kind of solution. Where i can find?

Finally, applets and, of course, swing-clients are much better suited for server-side notifications by using the good old MVC-pattern. You can find info about this on virtually any page describing MVC-implementations.

Good luck!

Andr� Salvati
Greenhorn

Joined: Mar 21, 2005
Posts: 24

posted Sep 16, 2005 08:17:00

0

Hi Tom...

Thanks a lot for your tips.

I'm also looking for literature about Domain Modelling for this kind of solution: industrial automation. For example: I want to know what kind of Entities, layers and patterns are the best approach to this solution. Any tips?

Originally posted by Andr� Salvati: I'd like to develop a system for ... Web resources, ... The goal is to provide dumb terminals

Dumb terminals are not Web resources.

Originally posted by Andr� Salvati: I think it's almost impossible to provide a good response-time by putting this clients on a loop to get modifications in Model tier.

The server needs not loop for that. Each time "the server" changes the model data this (hopefully centralized) method must notify all [registered] clients. But that would assume the server could send reports without requests.

On the other hand if you assume each client can periodically poll ("loop") the server for plant-state-changes than for the logical part you are done. Laying out the plant-state-report let's say once each second and on each poll sending back the prepared/cached plant-state-report to the polling terminal can not be too costly.

Originally posted by Andr� Salvati: I'd like to develop a system for an industrial plant using MVC pattern and Web resources, but I noticed that it's difficult (maybe impossible!!!) to make notifications from Model tier to View tier because i can't just send responses, without requests. The goal is to provide dumb terminals with the state of the plant. There are about 100 terminals...-

There is a technical impossibility to notify dumb clients, but this is the goal of the intended technical [and budget driven?] infrastructure.

Somehow adding an implicite plant-state-polling to any "send block" command received in the server could be a chance of solution _if_ it is sufficient to notify _actively online_ working people only, not people just being in the room where the dumb terminal resides. The plant-state-response would have to be appended to the original reply or even be sent back alone.

If it is necessary to notify people just being in the room: Is there a chance to add a timer in all or some critical terminals (or even a parallely connected pseudo-terminal) that causes the [pseudo-]terminal to poll plant-state-warnings each 10 seconds ...

That sounds technical but screen-scratching is on the same level.

Originally posted by Andr� Salvati:

1 - Is it possible, to send Responses without requests?

No, not with pure dumb terminals.

Originally posted by Andr� Salvati:

2 - Would Swing be a more appropriate resource in this case? Or Applets?

Surely, but not with pure dumb terminals.

Originally posted by Andr� Salvati:

2 - Would Swing ... Or Applets?

Again: not with pure dumb terminals. With workstations / PCs: Applets may use Swing. The contradiction is "Java client application" versus "Applet". Since there is the Java Web Start technology (see java.sun.com) you probabely will use apps. Today you need to use Applets only if they must be startet by and within a browser. Within a plant a Java client application via Java Web Start might be your choice.

Originally posted by Andr� Salvati: I'm also looking for literature about Domain Modelling for this kind of solution: industrial automation.

That is quite another topic. You will need at least data modelling!, and maybe some businss process modelling and optimization.

Originally posted by Andr� Salvati: I want to know what kind of Entities, layers and patterns are the best approach to this solution. Any tips?

Entities are the ones you added in the data model.

Layers are technical like for transportation, ... not my topic.

Patterns are best discussed in the forum "OO, Patterns, UML and Refactoring". Just some hints for your start: Concentrate on SessionFacade, BusinessDelegate with ServiceLocator and ValueObject first. Additionally you will need some persistence mechanism like EJB.

But please discuss that in the appropriate forum.

Thomas.

Andr� Salvati
Greenhorn

Joined: Mar 21, 2005
Posts: 24

posted Sep 17, 2005 10:18:00

0

Thomas,

With "dumb terminals" I meant terminals that just receive data, but surely I'd have compelled to address some actions in clients.