1 Asynchronous Programming.docx - Asynchronous Programming...

  • No School
  • AA 1
  • 6

This preview shows page 1 - 2 out of 6 pages.

Asynchronous Programming: |-Purpose of Asynchronous Programming |-Differences between the Asynchronous Communication and Asynchronous Programming |-Synchronous Vs Asynchronous Communication |-Asynchronous Programming |-JEE-3 Container/Servlet Container Architecture |-Problem with JEE-3 Servlet Container Architecture |-JEE-5 Container/Servlet Container Architecture |-Advantage |-When we need to go for Asynchronous Servlets Purpose of Asynchronous Programming: Asynchronous Programming JEE-5 and Servlet API has been designed with Asynchronous programming to address the scalability issues of the applications. By looking at the Asynchronous Programming in JEE the JAX-RS also provided API to work with Asynchronous Programming in RESTful services. The main purpose of Asynchronous JAX-RS Resources is to address or to solve the scalability issues and performance issues which results an improved scalability of the REST Resources. Differences between the Synchronous/Asynchronous Communication and Asynchronous Programming: Synchronous and Asynchronous Communication: Synchronous Communication means if the Consumer sends the req to a Provider then Provider will sends the response immediately and Consumer will waits to get the response. If the Provider takes more time to process then unless until the Provider sends the response the consumer will not close the network connection that means Consumer will waits to get the response. That means the Consumer and Provider will be blocked to build and to get the response. Asynchronous Communication means if the Consumer sends the req to a Provider then Provider will may/may not send the response immediately bcz of more processing time, So the consumer will not waits to get the response from the provider rather once he sends the req he will closes the connection and it is the responsibility of the Provider to open the network connection with which port the req has came (with the help of req header details) and gives the response back. That means the provider will holds the req port number and etc details that has been sent in the req to open the connection with Consumer to send the response. That means here the consumer and Provider will not be blocked to build the response and to get the response from the Provider. Basically by HTTP protocol is Synchronous Commination protocol only but not supports for the Synchronous Commination. HTTP protocol is Synchronous Commination protocol only but if we use HTTP for the SOAP-Based (Web services) then also we can achieve the Asynchronous Communication using HTTP. But HTTP will always sends the response that means we may think that we cannot achieve the Asynchronous if we use HTTP but it is wrong
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes