Skip to content

Service Provider Interface

A service-provider interface lets interchangeable backend modules supply a shared service through a declared implementer contract and discovery or dispatch layer.

Version
v1 · 2026-10-04 · History
Domain-specific #
13770
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomain
Software Interfaces → Computer Science & Software Engineering
Aliases
Pluggable Provider Interface

Core Idea

An SPI defines how alternative backend providers supply a service through a shared implementer contract and framework dispatch. Consumers call a stable operation without directly binding every implementation. Linux-PAM is one instance of this provider pattern, alongside name-service and database-driver systems.[ref-e724551bf0ed][ref-cf291e4b26a7][ref-a3b523062917][ref-fe66a8df570f]

Scope of Application

Linux-PAM lets applications invoke authentication calls while configuration selects modules. glibc NSS maps library name lookups to configured services such as hosts: files dns. Java DriverManager can discover JDBC drivers through the service-provider mechanism. These are different architectures with a common consumer/provider/dispatcher relation.[ref-e724551bf0ed][ref-cf291e4b26a7][ref-a3b523062917-2][ref-a3b523062917][^ref-fe66a8df570f]

Clarity

An SPI is not merely a library interface or any loadable plugin: a provider must implement the framework's service contract and be selected or discovered. The consumer API and provider API can be distinct, but need not always be separate interfaces.

Manages Complexity

Provider boundaries localize backend variation, but do not make every capability portable. Missing modules, source order, unsupported functions and provider-specific features remain visible constraints.[ref-a3b523062917-2][ref-a3b523062917]

Abstract Reasoning

Under hosts: files dns, an NSS lookup can check local files before DNS while the application makes one lookup call. Changing source configuration affects dispatch, not the consumer's call. If a needed module or operation is absent, substitutability fails at the capability boundary.[ref-a3b523062917-2][ref-a3b523062917]

Knowledge Transfer

The pattern transfers across authentication, name lookup and database connections, but each framework has its own provider contract and selection rules. Software Interface is the strict parent; replacement and dispatch are this child's additional structure.

[^ref-e724551bf0ed]: Linux-PAM project, Application Developers' Guide, application API and authentication calls. [^ref-cf291e4b26a7]: V. Samar and R. Schemers, Open Software Foundation, RFC 86.0, Unified Login with Pluggable Authentication Modules (PAM), October 1995, §4, configured module loading. [^ref-a3b523062917-2]: GNU C Library 2.43, NSS Configuration File, §30.2, per-database sources and status actions. [^ref-a3b523062917]: GNU C Library 2.43, Adding another Service to NSS and Extending NSS, §§30.4–30.4.1, service coverage and module interfaces. [^ref-fe66a8df570f]: Oracle, DriverManager API.

Relationships to Other Abstractions

Local relationship map for Service Provider InterfaceParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Service ProviderInterfaceDOMAINDomain-specific abstraction: Software Interface — is a kind ofSoftwareInterfaceDOMAIN

Current abstraction Service Provider Interface Domain-specific

Parents (1) — more general patterns this builds on

  • Service Provider Interface is a kind of Software Interface Domain-specific

    A service-provider interface is a specialized software interface for replaceable providers.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Service Provider Interface sits in a sparse region of the domain-specific corpus (61st percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Software & Systems Architecture (29 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08