DEV Community

Surhid Amatya
Surhid Amatya

Posted on

Just other ways of communication

So far, we’ve talked about What is an API, types of API.
These cover most everyday use cases, but they’re not the only ways systems talk to each other.

Here are a few more you’ll often hear about and you can explore on your free time.

File-based communication

Sometimes, systems don’t talk live at all. Instead, one system creates a file and another system reads it later.

Examples:

A system exports a CSV file at midnight. Another system picks it up and processes it in the morning. Reports are shared as files between systems.

This approach is common when:

  1. Real-time communication is not required
  2. Different organizations own systems.
  3. Legacy systems are involved

It’s simple, but slow. Think of it as leaving a letter instead of having a conversation.

Webhooks (systems calling you back)

A webhook is like saying:
“Don’t ask me again and again. I’ll call you when something happens.”

Let's see an example of fishing hook. You don’t keep checking the hook every second to see if a fish is there. You wait.

When a fish bites the hook, the hook moves. That movement tells you something happened.

In the same way, with a webhook:

One system waits quietly When something important happens, a signal is sent. The other system reacts immediately.

Nothing is sent unless there is something to report.

So instead of asking again and again, the system is notified only when there’s actually an event, just like a fishing hook only moves when a fish is caught.

Examples:

  1. Payment completed
  2. User signed up
  3. Order shipped

Webhooks are widely used in:

  1. Payments
  2. Notifications
  3. Integrations between products

They reduce unnecessary communication and feel more real-time. Instead of one system constantly checking for updates, the other system sends a message automatically when an event occurs.

Messaging queues

In some systems, messages are placed into a queue and processed one by one. This is useful when:

  1. Systems need to handle high traffic
  2. Tasks should not block user actions
  3. Reliability via async communication matters

Examples:

  1. Sending emails
  2. Processing background jobs
  3. Updating analytics

Queues help systems stay stable even during traffic spikes.

Streaming communication

Streaming is used when data flows continuously instead of being requested.

Examples:

  1. Live chat (eg: whatsapp chat)
  2. Live comments (eg: youtube comments during live streaming of a game or event)
  3. Stock price updates
  4. Activity feeds ( eg: watch your fb feed it updates automatically for new data)

Instead of asking for updates, systems stay connected and receive data as it happens.

This approach is common in:

  1. Social media
  2. Financial platforms
  3. Real-time dashboards

Direct database access (rare and risky)

Sometimes, one system directly reads another system’s database.

This is generally avoided because:

  1. It tightly couples systems
  2. A small change can break everything
  3. Security risks are high

But in tightly controlled internal systems, it still exists.

Think of this as walking into someone’s house instead of knocking on the door (Would you allow this :) ).

One idea connects all of them. Whether systems communicate through:

  1. APIs
  2. Events
  3. Files
  4. Queues
  5. Streams

The goal is always the same:

One system shares information. Another system consumes it. Both agree on how that exchange works.

The better this agreement is defined and documented, the easier systems is to build, integrate, and scale systems.

Top comments (0)