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,
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
Joined: Feb 21, 2002
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,
Joined: Feb 22, 2002
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 ]
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
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>
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.
Joined: Feb 21, 2002
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).
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 ?
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 ]
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
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
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.
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.
Joined: Apr 25, 2003
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??