• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

posting parallely on multiple servers

 
aneesh veetile
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a requirement. i have to post a request parallely on two servers. The first thing that came to my mind was multithreading. since it is a clustered environment, they say multithreading would create problems. I am not sure what exactly the problem. Is there any way that we can implement parallel processing with out using multithreading. Also not using any queues. if it is possible kindly share the same, if possible with some samples. I am using webspere 7. Thanks in advance.

Regards,
Aneesh
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't really a servlet question, since the "posting" part is on the client. There's no special code required for servlets to handle multiple concurrent requests because it's build into the architecture.

So it would have been better to ask in one of the more advanced General Java forums.

Off the top of my head, posting parallel is not a problem, but I'd have to RTFM to see how to keep from hanging once you were ready to receive the responses. In the normal course of events, responses would all come back to a single port and you could just listen for incoming response traffic on it, but HTTP assigns a different, randomly-selected reply port to each outgoing request.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to General Java.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement. i have to post a request parallely on two servers. The first thing that came to my mind was multithreading. since it is a clustered environment, they say multithreading would create problems.


What exactly is the client here? Unless the client is on one of the servers, I don't see how the server side environment makes any difference.

A separate Thread for each request is certainly the approach I would take.

Bill
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
I have a requirement. i have to post a request parallely on two servers. The first thing that came to my mind was multithreading. since it is a clustered environment, they say multithreading would create problems.


What exactly is the client here? Unless the client is on one of the servers, I don't see how the server side environment makes any difference.


Even then the only real difference it makes is that any threading would have to be done outside of a servlet/jsp process.


A separate Thread for each request is certainly the approach I would take.

Bill


Me too, if it's just 2 servers being posted. If it's 200, I'd go for something non-threaded.
 
aneesh veetile
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I apologize for the delayed response. i was away and were not able to access net.

Thanks for all your responses.

The scenaria is as follows.

From the application i have to post request (in xml format) parallely to two different servers. Since we are going to implement this in a clustered environment, they were saying that multithreading would create some issue.(not sure exactly what the issue is). If that is the case how do we post the requests parallely to two different servers.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
aneesh, please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/advanced-java/63150-parallel-processing-java.html
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
aneesh veetile wrote:Hi all, I apologize for the delayed response. i was away and were not able to access net.

Thanks for all your responses.

The scenaria is as follows.

From the application i have to post request (in xml format) parallely to two different servers. Since we are going to implement this in a clustered environment, they were saying that multithreading would create some issue.(not sure exactly what the issue is). If that is the case how do we post the requests parallely to two different servers.


Unfortunately, without knowing what this "multithreading issue" is, it's hard to make suggestions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic