Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > middleware, so to speak

Reply
Thread Tools

middleware, so to speak

 
 
Tiger Hillside
Guest
Posts: n/a
 
      01-23-2004
I have hit a wall. I have some server side perl scripts. One of those
scripts has to send off to another server (hence the middleware
comment) and wait for a response. Then I need to get back to the
client. I don't know how to do this. I can send off the post to the
external server. And I know how to get the response back in another of
my perl scripts. But how does that script know how to get back to the
client?

Le me diagram and name things.

This is the logic flow

Client -> Me -> XS (external sever)->Me -> Client

Program wise it would be

Client ->Me Script1 -> XS

XS -> Script2 -> Client

I can't see how to get XS to come back to the same instance of
Script1, nor can I see how Script2 would know which client to send to.
I am sure this is easy, something like having a connection handle, but
I don't know what that is called or how to get it. If I had it I can
save it with Script1 and get it back with Script2, I can identify the
transaction from my perspective, but not from the servers. (This is an
Apache server if that matters.)

(I know this is not really a language issue, but I figured this would
be a good place to ask.)

Thanks much in advance.
 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      01-24-2004
Tiger Hillside wrote:

> I have hit a wall. I have some server side perl scripts. One of those
> scripts has to send off to another server (hence the middleware
> comment) and wait for a response. Then I need to get back to the
> client. I don't know how to do this. I can send off the post to the
> external server. And I know how to get the response back in another of
> my perl scripts. But how does that script know how to get back to the
> client?
>
> Le me diagram and name things.
>
> This is the logic flow
>
> Client -> Me -> XS (external sever)->Me -> Client


Thinking of the problem that way will cause problems.
Try this diagram instead.

t=0 Client Middle Backend Server
t=1 ---->
t=2 parse request
t=3 ----->
t=4 perform action
t=5 <-----
t=6 reformat results
t=7 <------
t=8 display

The connection between the client and the middle is kept open while
the middle talks to the backend. When the middle gets the results
back from the backend server, it translates them to html and
presents the results to the client, who has been waiting patiently
all this time.

In some cases, the client can be redirected to a URL that points
to a temporary file on the backend server.

t=9 redirect ------------------------>
t=10 <------------------------ temporary file

-Joe
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] 1337 Speak For Ruby and an ActiveRecord 1337 Speak Extension- 0.0.1 zdennis Ruby 1 08-11-2006 02:54 AM
I am now tearing my hair out as we speak... =?Utf-8?B?QnVnZ3ltYW4=?= ASP .Net 7 06-30-2005 12:51 AM
MCSEs Speak Out O.A. MCSE 7 08-30-2004 06:17 PM
Imagine a text editor that can speak? skyhigh XML 0 04-13-2004 03:49 AM
Speak the contents of the selected JList item(s) danielliuhh@hotmail.com Java 3 01-07-2004 09:24 PM



Advertisments