nerdexam
Cisco

300-435 · Question #22

What are two characteristics of synchronous calls to APIs? (Choose two.)

The correct answer is C. They can add perceived latency to your application if data is not received. D. They block until a response is returned from the servers. Synchronous API calls block the execution of the calling program until a response is received, which can introduce perceived latency.

Network Automation Foundation

Question

What are two characteristics of synchronous calls to APIs? (Choose two.)

Options

  • AThey can be used only with certain programming languages.
  • BThey make your application less portable, as asynchronous calls are preferred.
  • CThey can add perceived latency to your application if data is not received.
  • DThey block until a response is returned from the servers.
  • EThey do not block while waiting for the API to be processed.

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    9% (2)
  • C
    87% (20)

Why each option

Synchronous API calls block the execution of the calling program until a response is received, which can introduce perceived latency.

AThey can be used only with certain programming languages.

Synchronous API calls are a fundamental programming paradigm available in virtually all programming languages, not restricted to certain ones.

BThey make your application less portable, as asynchronous calls are preferred.

The choice between synchronous and asynchronous calls is a design decision based on application needs, not a factor that inherently affects application portability.

CThey can add perceived latency to your application if data is not received.Correct

When an application makes a synchronous API call, it pauses and waits for the API response. If the API is slow or data is delayed, the application remains unresponsive during this waiting period, leading to increased perceived latency for the user.

DThey block until a response is returned from the servers.Correct

A synchronous API call is a blocking operation, meaning the program execution will halt at the point of the call and wait for the API server to process the request and return a response before proceeding to the next line of code.

EThey do not block while waiting for the API to be processed.

This describes asynchronous calls; synchronous calls explicitly block the execution of the calling thread or process until a response is received.

Concept tested: Synchronous vs. Asynchronous API calls

Source: https://www.geeksforgeeks.org/synchronous-vs-asynchronous-communication/

Topics

#API Calls#Synchronous Communication#Blocking Operations#Application Latency

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice