wood burning stoves 2.0*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes is HTTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "is HTTP "connection-less" or "connection-based" for SCEA Exam??" Watch "is HTTP "connection-less" or "connection-based" for SCEA Exam??" New topic
Author

is HTTP "connection-less" or "connection-based" for SCEA Exam??

Seid Myadiyev
Ranch Hand

Joined: Jul 02, 2002
Posts: 196
is HTTP "connection-less" or "connection-based"?
Different exams give different answers!
But what is the CORRECT answer for the SCEA Exam?
Thank you.


Seid Myadiyev<br />SCJP, SCWCD, SCBCD, SCEA-Part 1
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Connection based.
Converstational state between request/responses is not maintained, but a socket connection is established between the client and the server for communication.
Therefore it is connection based, but conversationally stateless.
Regards,


Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
I believe Estes is right and wrong.
I believe that since the connection between the server and the client is not maintained, HTTP ( particularly 1.0 ) is connection-less.
Alex Pisarev
Ranch Hand

Joined: Apr 10, 2002
Posts: 49
Originally posted by Byron Estes:
Connection based.
Converstational state between request/responses is not maintained, but a socket connection is established between the client and the server for communication.
Therefore it is connection based, but conversationally stateless.
Regards,

Confirming. All TCP protocols are connection based. All UDP ones are connectionless. HTTP is stateless connection based protocol.
Alex
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
Rufus,
I hate to disagree with you but...
Please, consider the following:
- HTTP usually runs on port 80, right?
-What is the purpose of a port?
Answer: A port is an arbitrary number representing a TCP/IP service. Full Internet service address = numeric TCP/IP address + port.
It is used for socket based connections.

The version of HTTP and how it handles a connection may differ. Some may make only one trasfer, then close the connection. Others may make multiple transfers before they close the connection, but all use sockets to acheive the connection and transfer data using HTTP which is a TCP/IP protocol.
So...
HTTP is a connection based protocol, that is conversationally stateless.
Connection based because it must use sockets to connect to and xmit data.
Conversationally stateless because each request/response is ignorant of all other request/response exchanges.
Cheers,
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
This is in John Wetherbie's Notes, which I could not pull up from the links page - but I found the notes anyway
Wetherbie's Notes
The HTTP protocol is connectionless and stateless After the server has responded to the client's request, the connection between client and server is dropped and forgotten. There is no "memory" between client connections. The pure HTTP server implementation treats every request as if it was brand-new, i.e. without context.

Now I'm not claiming Wetherbie is the ultimate source, but I'm not the only one saying it's connectionless.
[ September 10, 2002: Message edited by: Rufus Bugleweed ]
SPAD
Greenhorn

Joined: Jul 09, 2002
Posts: 16
I think its the terminology that is confusing yall
If you go by the definitions as per TCP/IP theory you will find that a connection oriented means something like a telephone connection wherein there is a handshake involved (such as saying hello) before the conversation starts. This is what a stream socket is - the other or connectionless is like a letter you fire and forget i.e., datagram socket.
At application level protocol a connection oriented means a protocol that maintains a conversational state where as a connectionless means no conversational state is maintained irrespective of whether a stream/datagram socket was used.
HTTP is application level protocol - now you decide
Sanjay Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 148
I believe that Byron and Alex are correct.
Rufus, your point with HTTP1.1 is well taken but it only pertains with the durability of the connection.
As Byron and Alex mention, TCP/IP is inherently a connection based protocol. While IP represents the data packets itself, it is TCP's responsibility to ensure that the packets are delivered. This cannot be done in a 'send and forget' mode. As TCP/IP is Connection based, any application protocol running on top of it also has to be connection based.
My answer - Connection Based and Stateless.
HTH.


Sanjay Raghavan<br />SCJP2, SCEA-J2EE<br />Moderator - <a href="http://groups.yahoo.com/group/scea_prep" target="_blank" rel="nofollow">SCEA PREP</a><br />Co-Author - <a href="http://www.whizlabs.com/scea/scea.html" target="_blank" rel="nofollow">SCEA@Whiz</a><br /><i>Where did you sip your Java Today?</i>
Rob Derrick
Greenhorn

Joined: Sep 18, 2002
Posts: 1
Here's my opinion.
HTTP is connectionless.
Quoting from RFC2068 for HTTP/1.1 "
"HTTP communication usually takes place over TCP/IP connections. The default port is TCP 80, but other ports can be used. This does not
preclude HTTP from being implemented on top of any other protocol on the Internet, or on other networks. HTTP only presumes a reliable transport; any protocol that provides such guarantees can be used;

In HTTP/1.0, most implementations used a new connection for each request/response exchange. In HTTP/1.1, a connection may be used for one or more request/response exchanges, although connections may be closed for a variety of reasons "
TCP/IP has two parts :
TCP is connection-based and IP is connection-less
In summary then :
HTTP is a connectionless protocol that transmits a request, receives a response and then terminates the connection. HTTP 1.1 allows for maintaining the connection for performance reasons...but there is nothing that stops the server from timing out or alloting your connection to service another request.
Byron Estes
Ranch Hand

Joined: Feb 21, 2002
Posts: 313
My last post on the subject...
I promise
The following is from here.

Describe connection-oriented network service and connectionless network service, and identify the key differences between them

There are two basic types of Transport layer methods: Connection-oriented and Connection-less. Connection-oriented network services are reliable, guarantee delivery of data while connectionless network services are unreliable, and provide only best effort delivery.

With TCP/IP there are two different categories of services.

- TCP (Transmission Control Protocol) is used for connection-based reliable delivery of data (example: HTTP, FTP, Telnet services).
- UDP (User Datagram Protocol) is used for connection-less transmission with unreliable best effort delivery (example: RealAudio, QuickTime streaming, and TFTP).


If that's not sufficient check out the resource I got from the www.w3c.org site (...I can't think of a more definative source).
Hypertext Transfer Protocol -- HTTP/1.1
Have a great weekend!
[ September 20, 2002: Message edited by: Byron Estes ]
Raees Uzhunnan
Ranch Hand

Joined: Aug 15, 2002
Posts: 126
See HTTP is considered Connection less because it does not maintain a connection to a server between client requests. It creates a new connection and destroys it end of every call. The connection oriented App protocols maintains a connection or pool of connection to the server. These are called connection oriented service. Of course you cannot have a communication without a transport layer connection .
Any comments ?


Sun Certified Enterprise Architect
Java Technology Blog
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
The 'keep alive' header keeps the connection up (for efficiency reasons).
I'd say you need to know the difference between HTTP 1.0 and 1.1 for the exam.
Simon
Raees Uzhunnan
Ranch Hand

Joined: Aug 15, 2002
Posts: 126
That's an additional option provided by Http 1.1 , but basically HTTP is designed connection less.. And this new header entry clearly says that HTTP was designed to be connection-less
Raees
Tim Duncan
Ranch Hand

Joined: Aug 20, 2001
Posts: 150
To go back to the original question ...
Originally posted by Seid Myadiyev:
is HTTP "connection-less" or "connection-based"?
Different exams give different answers!
But what is the CORRECT answer for the SCEA Exam?
Thank you.

I don't know. Has anyone actually been asked this in the exam?
We don't seem to be able to agree here, although some good points have been made. It probably depends on what you understand by "connection-based" and "connection-less".
Obviously HTTP requires a connection in order to make a request and receive the response. (I suppose messaging is "connection-less" in the sense that the sender/receiver or publisher/subscriber are never directly connected). Does the connection have to be held open (and with what certainty) for the protocol to be considered "connection-based"?
All pretty academic really ... unless you get a question in the exam
[ September 27, 2002: Message edited by: Tim Duncan ]
Warren Geez
Greenhorn

Joined: Oct 07, 2002
Posts: 3
i was asked something similar to this on a weblogic developer exam ..
as it stands Http is Connection less. Requests cannot be remembered from one invocation to the next.
Http with SSL is connection-based or in other words maintains state
so without getting into a war of words - for the exam
HTTP is CONNECTION LESS
Barry Kushnir
Greenhorn

Joined: Oct 14, 2002
Posts: 14
HTTP is connectionless. A connection does not need to be maintained between requests from a client and the server.
FTP is connection based. A connection must be maintained between requests from the client and the server.
-BK


Barry Kushnir, SCJP, SCWCD, SCEA
Matt Read
Greenhorn

Joined: Jul 27, 2002
Posts: 4
Isn't this getting confused between Stateless and Connectionless?
That aside, if these definitions have any value then it seems to me that HTTP is connection-oriented.
http://www.computeruser.com/resources/dictionary/definition.html?lookup=178
http://www.computeruser.com/resources/dictionary/definition.html?lookup=186
I hope I don't get this question in the exam...
Matt.
James Ward
Ranch Hand

Joined: Apr 27, 2003
Posts: 263
For the purpose of the exam :
HTTP is Connectionless and Stateless.
Dave Cronin
Ranch Hand

Joined: Apr 25, 2003
Posts: 114
HTTP 1.1 has a "Keep-alive" option, which allows a web page to download text and all graphics using the same connection. Therefore it seems reasonable to say it is connection-based. The connection ends when all the page elements are downloaded.


Dave Cronin
SCJP, SCWCD, SCBCD
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
I am not sure if my understanding is correct because I only know a little about HTTP. This topic is very interesting.
The topic is whether the HTTP is connection-based or connection less.
We say TCP is connection-based because it can guarantee the quality of communicatino.
We say UDP is connection less because it dose not care if the message can be delivered to the destination.
HTTP is just a communication protocol. You can implement a HTTP server based on any network protocols as you wish. Wether the HTTP is connnection-based has no relationship with the network protocol. The HTTP protocol defined nothing for hand shake, acknowledge etc. The HTTP protocol itself cannot gurantee the message is devliered/received. It has to rely on the the lower network protocol. If the HTTP server is built on TCP , we can make sure the communication is fine. If the HTTP server is built on UDP, we do not know if the server can get the request from the client.
That is it. The HTTP is a connection less protocol.
Dave Cronin
Ranch Hand

Joined: Apr 25, 2003
Posts: 114
There are indications that the SCEA exam would say HTTP is connection-based. Looking at the names of Java networking classes and methods, many have the word "Connection" associated with "Http" or "URL". For instance, there are the classes
java.net.HttpURLConnection, java.net.URLConnection.
Also, you can instantiate an HTTP type of URL with java.net.URL. The URL class has the factory method "openConnection()", which returns an instance of java.net.HttpURLConnection for an HTTP instance of java.net.URL. Therefore it appears that the Java API designers regarded HTTP as a "connection-based" protocol.
Also, there is the HTTP response header "Connection". By default, this header value is assumed to be "Keep-Alive" in HTTP 1.1, and "close" in HTTP 1.0. But either way, both versions require a connection to download a web page. The Keep-Alive option keeps the connection open to download images files of the same page. There is significant resource overhead in obtaining an HTTP connection, so the Keep-Alive option significantly improves download times for web pages with multiple images.
 
 
subject: is HTTP "connection-less" or "connection-based" for SCEA Exam??
 
Similar Threads
SCEA
SCEA
Regarding SCEA Part-2 & 3
Cleared SCEA Part 1 with 93%
SCEA