• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is HTTP "connection-less" or "connection-based"?
Different exams give different answers!
But what is the CORRECT answer for the SCEA Exam?
Thank you.
 
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 313
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 313
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the purpose of the exam :
HTTP is Connectionless and Stateless.
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic