Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

The Integration Cookbook: Java SDKs and Patterns Across OSI Layers

Coming from a Java background, I’ve often found myself diving into SDKs for common application-layer protocols—writing connectors and glue code to meet bespoke integration needs. Over time, I realised that while most developers focus on the immediate task—APIs, messaging systems, or file transfers—few pause to step back and see how these pieces fit within the broader landscape of the OSI model.

This draft aims to provide a holistic view of OSI Layer 7 protocols, the Java SDKs that support them, and the integration patterns that can be built upon.

I like to think of it as a “secret recipe” guide:

  • Ingredients → Protocols (HTTP, SMTP, FTP, JMS, etc.)

  • Tools → Java SDKs that make these accessible

  • Seasoning → Glue code patterns (resilience, orchestration, idempotency) that turn raw protocols into reliable integrations

The goal is to demystify the bigger picture and help developers see beyond isolated connectors—towards building integration architectures that are robust, reusable, and future-ready.

Common Java SDKs

Category
Protocol / Standard
Java SDK (Maven Central)
Use Cases
Sample Init Code

File Transfer

SFTP (SSH)

JSch

File upload/download

Session session = new JSch().getSession("user","host",22);

FTP

Apache Commons Net

Batch jobs

FTPClient ftp = new FTPClient(); ftp.connect("server");

Web Communication

HTTP

OkHttp

REST APIs

OkHttpClient client = new OkHttpClient();

WebSocket

Java-WebSocket

Realtime

WebSocketClient ws = new WebSocketClient(uri){}

gRPC

gRPC Java

RPC

ManagedChannel ch = ManagedChannelBuilder.forTarget("host:50051").usePlaintext().build();

Messaging

AMQP (RabbitMQ)

RabbitMQ Client

Async messaging

ConnectionFactory f = new ConnectionFactory(); f.setHost("localhost");

Kafka

Kafka Clients

Event streaming

KafkaProducer<String, String> p = new KafkaProducer<>(props);

Database

JDBC

HikariCP

DB CRUD

DataSource ds = new HikariDataSource(config);

Scheduling

Quartz

Quartz

Job scheduling

Scheduler s = StdSchedulerFactory.getDefaultScheduler();

Directory

LDAP

UnboundID LDAP SDK

Auth

LDAPConnection c = new LDAPConnection("host",389);

Email

SMTP / IMAP

Jakarta Mail

Notifications

Session mailSession = Session.getInstance(props);

Remote Execution

SSH

JSch

Remote commands

ChannelExec ch = (ChannelExec)session.openChannel("exec");

Service Discovery

Eureka

Spring Cloud Netflix

Service registry

@EnableEurekaClient

Tracing / Obs.

OpenTelemetry

opentelemetry-java

Tracing

Tracer tracer = openTelemetry.getTracer("example");

Serialization

JSON

Jackson

API payloads

ObjectMapper m = new ObjectMapper();

Protobuf

protobuf-java

Compact serialization

MyMsg msg = MyMsg.parseFrom(bytes);

Security

OAuth2

Spring Security OAuth2

Auth flows

@EnableOAuth2Sso

JWT

Java JWT

Token auth

String token = JWT.create().withSubject("user").sign(alg);

Common Integration Patterns

Purpose
Types
Java SDKs / Tools

Resilience

Retry, Circuit Breaker

Resilience4j

Transaction Safety

XA, 2PC, Local TX

Spring Transactions

Workflow Orchestration

BPMN, Choreography

Camunda, Zeebe

Distributed Transactions

SAGA pattern

Axon Framework

Idempotency

Request Replay Guards

Custom persistence (DB/Redis) + Spring Retry

Observability Hooks

Tracing, Metrics

OpenTelemetry, Micrometer

Final Thoughts

Think of this guide as a developer’s cookbook for building integration solutions:

  • Protocols are your ingredients

  • SDKs are your tools

  • Integration patterns are your techniques

Together, they let you cook up integrations that are reliable, scalable, and future-ready—whether you’re building APIs, messaging systems, or full-blown integration products.

Last updated

Was this helpful?