Thanks, Steve!

I had not considered RMI.  We are a CORBA shop here, however, and I'm sure the 
Architecture Gestapo would nix any attempt at establishing an RMI presence.  I like 
your ideas, though, and it's given me more design considerations.

-mark

>>> "Steven J. Owens" <[EMAIL PROTECTED]> 7/12/99 12:05:29 PM >>>
Mark writes:

> I should have stated the design parameters more clearly: the reason
> for revisiting this app is two-fold - (1) eliminate multiple processes
> spawned by CGI and (2) eliminate a socket call for the the quote data
> for every HTTP request of the homepage.

     There are still too many blind spots;  what's the source of the
information, and what tools do you have available to get it from the
internal box to the web server?

> Can a servlet make a call to a CGI script on a remote server and
> accept the result?

     Should be feasible.  But if you have access to the internal box,
why not think about having an RMI server on the inside box feed data
to an RMI client on the outside box?  Instantiate the RMI client
inside a servlet, and have the servlet build the pages and serve them.
The RMI client could loop around and call the RMI server periodically
to update the values and rebuild the page, storing both in instance
variables, then each request would just return the stored page.

     You could even "push" the data from the RMI server out to the RMI
client.  Here I'm on shaky ground; I haven't tried this yet, so
hopefully the RMI veterans will comment.  But if I understand this
properly, once your RMI client has requested an object from the RMI
server, the RMI server can hang onto a reference to that object, and
subsequently can invoke a method on the object to update the values
(and rebuild the page).

     I'm not sure about the exact design here - maybe it'd be better
to have the servlet run an RMI server that binds on the webserver box,
and then have the internal firewall run an RMI client that talks to
the webserver's RMI server.

     But either way, you'd have an object on the webserver, call it
the MarketPage, that contains both an array of market quotes (or maybe
a vector, hashtable or some other collection, I'm not sure what format
the data is in) and a string.  When the data changes on the internal
server, it invokes MarketPage.updateQuotes(Qoutes[]), which stores the
new values, regenerates the page and stores it in the string.

     If RMI's not an option, then have the servlet invoke a CGI query
on the internal box periodically, compare the return string against the
return string from the previous request, and if different, re-parse the
string and rebuild the page.

Steven J. Owens
[EMAIL PROTECTED]
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to