473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

middleware, sort of (same question, different posting software)

I forgot I had a "real" newsreader available. So here is the
question you will see "soon" when google decides to post my other
question.
I have a server side script that takes a user's input in a form,
packages it, and sends it on to an external server. The external
server will then send back the response via http to my server
script. But not the same script. And there is the rub, I don't
know how the second script can get to my user.

Let me diagram this for clarity.

The logic is this:

Client -> me -> XS (external server) -> me -> client

Simple enough.

But as I see it, programmatically it goes like this:

browser -> me script1 -> XS

XS -> script2 -> browser

I can't open a pipe to the external server, I only have http
access. So I can't get the response back in the same script
AFAICT. My script1 and script2 know enough to know it is the same
transaction, but script2 can't find the browser/script1
conversation.

I suppose I could have script1 wait around until script2 writes a
token of some sort saying it got the results. That seems like a
hack, but if that is how it is done I can do that. Wait something
like 30 seconds, checking every second for the token. Is that how
it is done or is there a better way? Something like a named pipe
or something that script2 can get its hands on?

I know this is not, strictly speaking, a perl language question,
but it is on topic.
Thanks very much in advance.
Jul 19 '05 #1
1 1681
In comp.lang.perl, Tigerhillside
<Ti*****************@removenetscape.net>, I read and responded
I forgot I had a "real" newsreader available. So here is the
question you will see "soon" when google decides to post my other
question.
I have a server side script that takes a user's input in a form,
packages it, and sends it on to an external server. The external
server will then send back the response via http to my server
script. But not the same script. And there is the rub, I don't
know how the second script can get to my user.

Let me diagram this for clarity.

The logic is this:

Client -> me -> XS (external server) -> me -> client

Simple enough.

But as I see it, programmatically it goes like this:

browser -> me script1 -> XS

XS -> script2 -> browser

I can't open a pipe to the external server, I only have http
access. So I can't get the response back in the same script
AFAICT. My script1 and script2 know enough to know it is the same
transaction, but script2 can't find the browser/script1
conversation.

I suppose I could have script1 wait around until script2 writes a
token of some sort saying it got the results. That seems like a
hack, but if that is how it is done I can do that. Wait something
like 30 seconds, checking every second for the token. Is that how
it is done or is there a better way? Something like a named pipe
or something that script2 can get its hands on?

I know this is not, strictly speaking, a perl language question,
but it is on topic.
Thanks very much in advance.


Ok, I won't say I'm an idiot. After all, there are few bette ways
to solve a problem on your own than to ask someone for help. My
problem was that I misunderstood some documentation. (So much for
RTFM as a silver bullet.) There are two ways to do what I needed
from the external server. I could send my user to their web page,
in which case the response came back to one of my server pages.
Or I could just send the information, in which case I get a
response. But I thought that the only way I got my response was
via the other web page. Since I can get the response from the
calling script I can just use the LWP module and everything will
be fine. Thanks for being there anyway.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ken R. | last post by:
Hello all, I am relatively new to python but I am having an issue with custom sort functions.. I am trying to sort a list of lists or tuples with arbitrary ascending or descending sorts. For...
40
by: Elijah Bailey | last post by:
I want to sort a set of records using STL's sort() function, but dont see an easy way to do it. I have a char *data; which has size mn bytes where m is size of the record and n is the...
13
by: David Eng | last post by:
Finally, the C++ standard committee realizes the importance of middleware and distributed computing. The committee now focus on C++ extensions for ISO CLI, the Microsoft middleware platform. ...
1
by: hico74 | last post by:
Hi all. I'm looking for a tool which should act like some kind of middleware/ logical layer bewtween the SQL server and the webbased user interface. - It should be possible to easily create...
5
by: Calimero | last post by:
I have to write a middleware that could be see as a very specialized Web server (based on threads and sockets) I hesitate between C++ (speed) and C# (more elegant) What is the performance penalty...
21
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each...
2
by: Ale | last post by:
Hi all! I need to build a middleware for XQuery: I mean a software receiving a std xquery and outputting the xquery result on "database.xml". This middleware must use 7 or 8 different choosable...
17
by: IanIpp | last post by:
We have a 3 month old quad processor/dual core server running SQL Server 2005 and already it is getting close to hitting the CPU wall. An 8 way CPU box is prohibitively expensive and out of the...
48
by: Alex Chudnovsky | last post by:
I have come across with what appears to be a significant performance bug in ..NET 2.0 ArrayList.Sort method when compared with Array.Sort on the same data. Same data on the same CPU gets sorted a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.