Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2007

Tip: Looking for answers? Try searching our database.

Question about http pipelining

Thread view: 
panatha - 17 Aug 2007 03:32 GMT
I am trying to implement a consumer-producer scenario communicating
via HTTP pipelining.
Can anyone talk me through some questions that i have regarding my
problem?

I have the consumer side the socketsend class that when a message-
request is ready it sends it through the socket ,that the the
socketserver class that manages the sockets, starts.
Now i have the HttpServer and the HTTPSend classes as well. The first
class manages the opening and closing of the connection and the second
class sends or receives.

Now my questions are:
1) do i have to produce multiple messages at the same time and just
call the outputstream for example to send them? or do i have to do
something else?
2) i am not sure if i understood correctly the classes that java.sun
provide us cause i think that the socket classes will implement the
http pipelining and not the http classes.
3) would it be a solution to open multiple sockets at the same time
and send and receive via those or i will have a problem opening many
sockets with the same port cause the port is predefined by the
consumer and the producer in order to communicate and exchange
messages, so it can not be changed.

Please if there is anyone that has previous experience with such
problems please help me.
thank you in advance
GArlington - 17 Aug 2007 10:49 GMT
> I am trying to implement a consumer-producer scenario communicating
> via HTTP pipelining.
[quoted text clipped - 24 lines]
> problems please help me.
> thank you in advance

You have a server that runs on predefined port (this is a must -
otherwise you have no way of starting the conversation). When your
server receives first request (see handshake) it should open NEW
connection over some available port (this is not the same predefined
port you send you initial request to). If you try to look at tcp-ip
conversation between your browser and any web server you can see what
happens. Then any further message exchange happens over this new pair
(one on server, one on client) of ports until you close your
connection. You can find a lot more info and examples if you search
google for 'java socket programming'.
stavrinio@gmail.com - 17 Aug 2007 21:13 GMT
> > I am trying to implement a consumer-producer scenario communicating
> > via HTTP pipelining.
[quoted text clipped - 35 lines]
> connection. You can find a lot more info and examples if you search
> google for 'java socket programming'.

Question to all that you said how can I succesfully implement
pipelining from what you wrote before I am not sure if
it will work at all if i try to open many sockets and send single
message from different socket that is not pipelining at
least of what i know:)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.