Decreasing the no. of server calls
We have a applicaiton that get the details of various locations from a EOS server. The EOS server can take only one location at a time.
So if a user wants to get details about say 10 locations, each time the request is sent to the server and it responds. So the wait time is equivalent to 10 requests and responds.
This is taking a lot of time. Threads is also not supported so I am thinking about using message driven beans for each call.
Is there any other better option that I'm missing out ?
Pls give me ur suggestions
Thanks in advance
[580 byte] By [
New_Kida] at [2007-11-27 11:30:32]

> We have a applicaiton that get the details of various
> locations from a EOS server. The EOS server can take
> only one location at a time.
>
> So if a user wants to get details about say 10
> locations, each time the request is sent to the
> server and it responds. So the wait time is
> equivalent to 10 requests and responds.
> This is taking a lot of time. Threads is also not
> supported so I am thinking about using message driven
> beans for each call.
>
> Is there any other better option that I'm missing out
> ?
> Pls give me ur suggestions
>
How will message driven beans help? You said that the server was single threaded.
> Thanks in advance
kajbja at 2007-7-29 16:34:30 >

> Threads is also not supported
Why not? Sorry, but it sounds to me like you should get a better server then.
>
> How will message driven beans help? You said that the
> server was single threaded.
THe message driven beans was my PL s idea. I have to learn and then implement it. I was skeptical about it thats why I'm askin the gurus of java here.
Is there any other way to asynchronously access the server in the absence of multi threading to decrease the overall response time.
> Why not? Sorry, but it sounds to me like you should
> get a better server then.
Exactly!!! Coded in the 80s this piece of **** needs to be recoded.. but no one wants to straighten this tower of Pisa.. So much is built on top of it could be a possible reason
I don't fully understand what you expect. If you get 10 requests, you'll have to process 10 requests. If you can't bundle those 10 requests in one request, you won't be able to do anything.
And even if you bundle them, processing will still not be faster. Just the communication overhead drops.
> I don't fully understand what you expect. If you get
> 10 requests, you'll have to process 10 requests. If
> you can't bundle those 10 requests in one request,
> you won't be able to do anything.
>
> And even if you bundle them, processing will still
> not be faster. Just the communication overhead drops.
consider if there are 3 locations and each call takes 5 sec
So i send make a call get a response - then make the 2nd call get response and so on - the total time is 15 sec
Requirement is that I send all the 3 locations asynchronously (No threads permitted) and get the response. this should take less than 15 secs.
My 1st question should be - Is it possible? - if so how?
With my limited Googling skills I end up with AJAX related pages all the time.
Pls help
> consider if there are 3 locations and each call takes
> 5 sec
> So i send make a call get a response - then make the
> 2nd call get response and so on - the total time is
> 15 sec
>
> Requirement is that I send all the 3 locations
> asynchronously (No threads permitted) and get the
> response.
Can the server handle 3 executions at the same time, or will it just queue them?
> this should take less than 15 secs.
> My 1st question should be - Is it possible? - if so
> how?
It's not possible if the server that receives the requests is single threaded. The only thing you can do in that case is implement caching.
The server that handles the location requests should be multithreaded. Another option is to buy better hardware :)
Kaj
kajbja at 2007-7-29 16:34:30 >

> asynchronously (No threads permitted)
This is a contradiction in terms.
I'm finding it hard to believe that your server doesn't handle > 1 request at a time, possibly by forking, or that the requests really take 5 seconds each.
You might get somewhere by reusing the same connection for all three requests sent sequentially, and by sending them all before you read any of the responses.
ejpa at 2007-7-29 16:34:30 >

> > consider if there are 3 locations and each call
> takes
> > 5 sec
> > So i send make a call get a response - then make
> the
> > 2nd call get response and so on - the total time
> is
> > 15 sec
> >
> > Requirement is that I send all the 3 locations
> > asynchronously (No threads permitted) and get the
> > response.
>
> Can the server handle 3 executions at the same time,
> or will it just queue them?
It can handle just one request at a time - so the requests will be queued.
But the suggested improvement in performance is like this.
Say at any time there are a 1000 requests handled by the server. SO When I send my 1st request its the 1001st... 2nd request is again 1001st.. n so on.. so for each request I'm waiting for other 1000 requests to get over.. But if I can send the requests in a que it will be 1001, 1002, 1003 requests.. so instead of waiting for 3000 requests to get over the wait time is just 1000 requests..
Hope I'm making sense.
> > this should take less than 15 secs.
> > My 1st question should be - Is it possible? - if
> so
> > how?
>
> It's not possible if the server that receives the
> requests is single threaded. The only thing you can
> do in that case is implement caching.
>
> The server that handles the location requests should
> be multithreaded. Another option is to buy better
> hardware :)
>
> Kaj
If there is any other reason it is not possible please give your comments as I'm totally out of league when the architects talk. I just don know wat to say n I nod and cm here begging for help
> > asynchronously (No threads permitted)
>
> This is a contradiction in terms.
>
> I'm finding it hard to believe that your server
> doesn't handle > 1 request at a time, possibly by
> forking, or that the requests really take 5 seconds
> each.
Ripleys stuff mate this code is.. An AWT application.. recoded into websphere RCP.. A engine coded by the founders of computers.. That handles just one request at a time.. No way they are going to allow anyone to touch it. Maybe its got a HERITAGE value that they are trying to preserve.
> You might get somewhere by reusing the same
> connection for all three requests sent sequentially,
> and by sending them all before you read any of the
> responses.
Need to check this out .. thanks for the suggestion
> Can the server handle 3 executions at the same
> time,
> or will it just queue them?
>
> It can handle just one request at a time - so the
> requests will be queued.
> But the suggested improvement in performance is like
> this.
> Say at any time there are a 1000 requests handled by
> the server. SO When I send my 1st request its the
> 1001st... 2nd request is again 1001st.. n so on.. so
> for each request I'm waiting for other 1000 requests
> to get over.. But if I can send the requests in a que
> it will be 1001, 1002, 1003 requests.. so instead of
> waiting for 3000 requests to get over the wait time
> is just 1000 requests..
>
> Hope I'm making sense.
Do what ejp said. Send all requests on the connection before you read.
>
> > > this should take less than 15 secs.
> > > My 1st question should be - Is it possible? - if
> > so
> > > how?
> >
> > It's not possible if the server that receives the
> > requests is single threaded. The only thing you
> can
> > do in that case is implement caching.
> >
> > The server that handles the location requests
> should
> > be multithreaded. Another option is to buy better
> > hardware :)
> >
> > Kaj
>
> If there is any other reason it is not possible
> please give your comments as I'm totally out of
> league when the architects talk. I just don know wat
> to say n I nod and cm here begging for help
Sorry, but I would say that your best option is to upgrade the server software or buy better hardware.
Kaj
kajbja at 2007-7-29 16:34:30 >

> I'm finding it hard to believe that your server
> doesn't handle > 1 request at a time, possibly by
> forking
I've seen many single threaded servers within financial trading systems where absolute ordering and processing is very important. (But I find it strange that this type of server is implemented in that way)
kajbja at 2007-7-29 16:34:30 >

> I've seen many single threaded servers within
> financial trading systems where absolute ordering and
> processing is very important. (But I find it strange
> that this type of server is implemented in that way)
:-) You have gotten quite close.. The last time a guy posted client code in forum and got caught he was royally escorted to the gate by 2 HRs and 5 security personnel. now v don want that happening to us rite :)