• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MVC Web - Architecture

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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?

Thanks.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We'll move this topic to General Computing for now.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Andr�!

It won't solve your problem since I doubt it will scale well to 100 clients, but check this out:

http://www.javaworld.com/javaworld/jw-03-2000/jw-03-pushlet.html

This might give you a few hints for a more scalable web-solution:

http://java.sun.com/developer/technicalArticles/J2EE/AJAX/

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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Thanks again.
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

Thomas.
 
Thomas Taeger
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thomas,

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

I'm gonna ask the other questions in more appropriate foruns.

Thanks for your answer.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic