---
title: "Remote Services and distributed OSGi"
chapter: "16"
---

# Remote Services and distributed OSGi

OSGi Remote Services lets a local service be exported and represented by a
proxy in another framework. Remote Service Admin (RSA) handles endpoints,
topology, discovery, import, export, and intents.

## Local illusion, remote reality

A remote proxy may implement the same Java interface, but calls cross a network.
Latency, partial failure, serialization, authentication, compatibility, and
retries now matter. Never design a chatty local interface and export it
unchanged.

## Endpoint model

Export properties describe which service to export, supported configurations,
and intents such as security. Discovery distributes endpoint descriptions.
Import creates a local service proxy whose availability follows the endpoint.

## Providers

Eclipse Communication Framework (ECF) and Apache CXF Distributed OSGi are common
implementations. Choose from protocols, discovery, security, interoperability,
maintenance, and operational tooling—not only annotation convenience.

## Contract design

- coarse operations with explicit deadlines;
- versioned, portable DTOs;
- idempotency for retried commands;
- bounded payloads;
- authentication and authorization on both sides;
- telemetry with endpoint identity;
- circuit breaking or admission control outside the framework contract.

## Topology

Decide whether exports are automatic or centrally controlled. Prevent a test
service from being exported because it happens to match a broad property.

## Feynman check

Remote Services can make a remote endpoint look like a service in the registry.
It cannot make the network behave like a method call.
