100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
UNDERSTANDING APIS QUESTIONS AND ANSWERS WITH SOLUTIONS 2024 $15.49   Add to cart

Exam (elaborations)

UNDERSTANDING APIS QUESTIONS AND ANSWERS WITH SOLUTIONS 2024

 10 views  0 purchase
  • Course
  • Api
  • Institution
  • Api

UNDERSTANDING APIS QUESTIONS AND ANSWERS WITH SOLUTIONS 2024

Preview 2 out of 10  pages

  • August 17, 2024
  • 10
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • Api
  • Api
avatar-seller
Performance
UNDERSTANDING APIS QUESTIONS
AND ANSWERS WITH SOLUTIONS 2024
Three Reasons to Use APIs - ANSWER Automation Tasks



Data Integration



Functionality



Two types of API Styles - ANSWER Synchronous APIs



Asynchronous APIs



When are APIs Synchronous - ANSWER APIs are usually designed to be synchronous when the data for
the request is readily available, such as when the data is stored in a database or in internal memory. The
server can instantly fetch this data and respond back immediately.



Benefits of Synchronous APIs - ANSWER Synchronous APIs enable the application to receive data
immediately. If the API is designed correctly, the application will have better performance because
everything happens quickly. However, if it is not designed correctly, the API request will be a bottleneck
because the application has to wait for the response.



What feature does synchronous programming use to handle requests - ANSWER Client side processing



what is a Synchronous API - ANSWER Synchronous APIs respond to a request directly, usually providing
data (or another appropriate response) immediately.



what is a Asynchronous API - ANSWER Asynchronous APIs provide a response to signify that the request
has been received, but the response won't have any actual data. The server processes the request, which
may take time, and sends a notification or triggers a callback with the data after the request has been
processed. The client can then act on that returned data

, When is a API Asynchrnous - ANSWER APIs are usually designed to be asynchronous when the request is
an action that takes some time for the server to process, or if the data isn't readily available. For
example, if the server has to make a request to a remote service to fetch the data, it can't guarantee that
it will receive the data immediately to send back to the client. Note that just because an API is
asynchronous doesn't necessarily mean that the client won't get the data immediately, just that
immediate data isn't guaranteed.



Benefits of Asynchronous APIs - ANSWER Benefits of an asynchronous API design

Asynchronous APIs enable the application to continue execution without being blocked for the amount
of time it takes for the server to process the request. As a result, the application may have better
performance because it can multi-task and make other requests soon after. Unnecessary or excessive use
of asynchronous calls can have the opposite effect, however.



what happens on the client side for Asynchronous APIs - ANSWER With asynchronous processing, the
design of the API on the server side defines what you want to do on the client side. Sometimes the client
can establish a listener or callback mechanism to receive these notifications and process them when
they are received. Also depending on the design of the application, your client may also need a queue to
store the requests to maintain the order for processing. Other API designs need the client to have a
polling mechanism to find out the status and progress of a given request.



Three most common API Architectures - ANSWER RPC- Remote Procedure Call



SOAP - Simple Object Access Protocol



REST - REpresentational State Transfer



What is RPC API - ANSWER Remote Procedure Call (RPC) is a request-response model that enables an
application (acting as a client) to make a procedure call to another application (acting as a server). The
"server" application is typically located on another system within the network.



How does RPC work? - ANSWER In the most common usage of RPC, the client makes a synchronous
request to the server and is blocked while the server processes the request. When the server is done
with the request, it sends a response back to the client, which unblocks its process. (This doesn't apply
for asynchronous requests, remember.)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Performance. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $15.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76710 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$15.49
  • (0)
  Add to cart