Application Protocols · Study deck

Realtime Protocols: Messaging Foundations

Realtime protocols matter when "check again later" is not good enough.

Broker Bex is your guide for this deck.

realtimeprotocoldebate
Broker Bex, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain what realtime means for application protocols in IoT media and control paths.
  • Distinguish media transport, session signaling, stream control, browser transport, and event updates.
  • Compare RTP, RTCP, SIP, SRTP, RTSP, WebRTC, and WebSocket by role.
  • Decide when messaging protocols should remain separate from media-session protocols.
iotclass.org

Major section

In 60 Seconds

Realtime application protocols are used when the timing of a message matters as much as the message itself.

  • RTP carries media frames and uses sequence numbers and timestamps so receivers can handle loss, reordering, and jitter.
  • RTCP reports stream quality.
  • SIP sets up and ends sessions.
  • SRTP protects media.
iotclass.org

Major section

Key Concepts

A late media frame can be less useful than the next fresh frame.

  • Session Control Is Separate.
  • Signaling protocols set up who talks, which media is used, and when a session starts or ends.
  • Media Transport Is Continuous.
  • Media transport carries timed audio, video, or sensor streams with sequence and timestamp context.
iotclass.org

Major section

What Realtime Means Here

Realtime does not mean every message is instant or guaranteed.

  • In application-protocol design, realtime means the system has a timing target and must keep media, interaction, or live state useful while the network changes.
Realtime protocol decision surface
Realtime protocol decision surface
iotclass.org

Major section

Realtime Protocol Roles

The protocol names are easier to use when their roles are separated.

  • One IoT product may use several of them in the same workflow.
  • SIP or WebRTC signaling establishes the session; RTP carries timed media; RTCP reports how that delivery is behaving; and SRTP protects the media packets.
  • This role split becomes the vocabulary for the hybrid workflow below.
Realtime protocol roles for IoT
Realtime protocol roles for IoT
iotclass.org

Major section

Messaging and Realtime Together

MQTT, CoAP, HTTP, AMQP, RTP, SIP, and WebRTC should not be forced into one role.

  • A door station, operations panel, or camera can use message protocols for events and realtime protocols for live interaction.
  • That separation prevents a convenience protocol from silently inheriting responsibilities it was not chosen to meet.
  • INVITE starts a media session.

Why it matters

An open-source softphone such as Linphone is useful because the repository exposes the objects that own account setup, signaling, media negotiation, calls, video, and messaging instead of hiding them behind a finished app.

Messaging and realtime protocols in one IoT workflow
Messaging and realtime protocols in one IoT workflow
iotclass.org

Major section

Messaging and Realtime Together (continued)

MQTT, AMQP, or HTTP can announce the event without carrying the call; SIP or WebRTC coordinates participants and route; SRTP carries the time-sensitive audio or video.

  • The PSTN is the traditional circuit-switched phone network.
  • Implementation examples make the same split easier to inspect.
  • Mobile SDK examples should still be read through that same split.
iotclass.org

Major section

Messaging and Realtime Together (continued)

A hands-on softphone exercise should make those responsibilities visible in settings, not only in source code.

  • VoIP carries voice over IP networks instead, usually with SIP or another signaling path to set up the session and RTP or SRTP to carry media.
  • The method names are a useful checklist during troubleshooting.
  • CANCEL stops a pending request.
iotclass.org

Major section

Messaging and Realtime Together (continued)

An analog telephone adapter, or ATA, is the bridge box that lets an analog handset or fax device join that IP workflow.

  • Peer-to-peer calling systems can also route media or discovery through other clients, so the design record should say when traffic is direct, relayed, or service-mediated.
  • A code walkthrough is complete only when it records both ends of the call, the server or peer used for registration, and the fallback behavior when Wi-Fi, NAT traversal, or credentials fail.
  • A typical SIP URI looks like sip:user:password@host:port, though production records should avoid storing cleartext secrets.
iotclass.org

Major section

Messaging and Realtime Together (continued)

SIP can run over UDP, TCP, or SCTP; common deployments use port 5060 for unencrypted signaling and port 5061 for signaling protected with TLS.

  • The voice or video stream still belongs on RTP or SRTP after the session has been negotiated.
  • A user agent is the endpoint that sends requests and returns responses; in practice it may be an IP phone, a softphone, or a device gateway.
  • A proxy server forwards requests on behalf of clients and can enforce routing, policy, and permissions while moving the request closer to the target user.
iotclass.org

Major section

Messaging and Realtime Together (continued)

A registrar accepts REGISTER requests and updates the location service that maps a user's SIP identity to the current reachable address.

  • A session border controller sits at the boundary to control VoIP signaling during setup, teardown, and inter-domain traversal.
  • The exchange authenticates and records where the user agent can be reached; it does not carry call audio or start a media session.
  • An open-source softphone such as Linphone is useful because the repository exposes the objects that own account setup, signaling, media negotiation, calls, video, and messaging instead of hiding them behind a finished app.
iotclass.org

Deck summary

Key takeaways

Realtime application protocols are used when the timing of a message matters as much as the message itself.

  • A late media frame can be less useful than the next fresh frame.
  • Realtime does not mean every message is instant or guaranteed.
  • The protocol names are easier to use when their roles are separated.
  • MQTT, CoAP, HTTP, AMQP, RTP, SIP, and WebRTC should not be forced into one role.
iotclass.org

Retrieval practice

Recall check

Broker Bex says: answer from memory, then check your reasoning.

Q1A door intercom team calls its dashboard realtime because it updates frequently. What should it define before selecting protocols?

ATiming targets and failure responses for each flow
BA shared update frequency for the product
CA common protocol name for each endpoint
DA storage destination for recorded clips
Show answer

Answer: A Media, control, and live state tolerate delay and loss differently and need explicit constraints.

Q2A camera team needs reports about media reception quality. Which protocol role fits that task?

ASIP session signaling
BSRTP media protection
CWebSocket event delivery
DRTCP quality reporting
Show answer

Answer: D RTCP reports reception quality and stream health.

iotclass.org

Print reference

Answers

Answer key.

  1. A · Media, control, and live state tolerate delay and loss differently and need explicit constraints.
  2. D · RTCP reports reception quality and stream health.
iotclass.org