Skip to content

Latest commit

 

History

History
98 lines (39 loc) · 1.88 KB

README.md

File metadata and controls

98 lines (39 loc) · 1.88 KB

Asynchronous Programming.

Contents at a Glance.

About.

Documentation.

  • Asynchronous programming allows you to multiplex multiple networked connections on a single thread.
  • The event loop and the reactor pattern simplify asynchronous event processing.

Promise and Future.

A promise is used to write an asynchronous result, whereas a future is used to view an asynchronous result.

Las bases mas solidas sobre las que se sustenta la programacion asincrona son:

  • Execucion "no ordenada".
  • Programacion sin bloqueos.
  • Programacion dirigida por eventos.

Asynchronous programming approaches:

  • Threading
  • Callbacks
  • Promises/future
  • Events
  • Coroutines

Protocols of Asynchronous Communication

  • MQTT — Message Queue Telemetry Transport (MQTT) is an ISO standard pub-sub based lightweight messaging protocol used widely in the Internet Of Things.
  • AMQP — Advanced Message Queuing Protocol (AMQP) is an open standard application layer protocol for message-oriented middleware.
  • STOMP — Simple Text Oriented Messaging Protocol, (STOMP), is a text-based protocol modeled on HTTP for interchanging data between services.

  • From a technical point of view, an asynchronous programming means a group of design techniques, which decompose code into blocks of execution (events), that can be computed with derived result (we use subscribing in order to be notified about results).
  • To sum up, when we talk about an asynchronous application, we mean that it is an application, that is composed from a number of events, that run in some event loop, and has handlers, that subscribe for the result of event computation. It is basically, a way to avoid blocking operations.

Pros.

Cons.

Help.