Spotify Apollo HTTP Service

Java libraries for writing composable microservices

License

License

Categories

Categories

Apollo Container Microservices
GroupId

GroupId

com.spotify
ArtifactId

ArtifactId

apollo-http-service
Last Version

Last Version

1.15.8
Release Date

Release Date

Type

Type

jar
Description

Description

Spotify Apollo HTTP Service
Java libraries for writing composable microservices

Download apollo-http-service

How to add to project

<!-- https://jarcasting.com/artifacts/com.spotify/apollo-http-service/ -->
<dependency>
    <groupId>com.spotify</groupId>
    <artifactId>apollo-http-service</artifactId>
    <version>1.15.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.spotify/apollo-http-service/
implementation 'com.spotify:apollo-http-service:1.15.8'
// https://jarcasting.com/artifacts/com.spotify/apollo-http-service/
implementation ("com.spotify:apollo-http-service:1.15.8")
'com.spotify:apollo-http-service:jar:1.15.8'
<dependency org="com.spotify" name="apollo-http-service" rev="1.15.8">
  <artifact name="apollo-http-service" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.spotify', module='apollo-http-service', version='1.15.8')
)
libraryDependencies += "com.spotify" % "apollo-http-service" % "1.15.8"
[com.spotify/apollo-http-service "1.15.8"]

Dependencies

compile (6)

Group / Artifact Type Version
com.spotify : apollo-core jar
com.spotify : apollo-environment jar
com.spotify : apollo-okhttp-client jar
com.spotify : apollo-jetty-http-server jar
com.spotify : apollo-metrics jar
ch.qos.logback : logback-classic jar 1.2.3

test (5)

Group / Artifact Type Version
org.junit.vintage : junit-vintage-engine jar
org.mockito : mockito-core jar 2.23.4
io.cucumber : cucumber-java jar 4.8.0
io.cucumber : cucumber-junit jar 4.8.0
com.spotify : apollo-test jar

Project Modules

There are no modules declared in this project.

Apollo

Circle Status Codecov Maven Central License

Status: Bug-fix only

Apollo is heavily used within Spotify, however, most of its development is currently done internally leveraging Apollo's module system. We want to signal this current state to the community by putting the project in maintenance mode.
This project will no longer have new features or accept PRs for new features. We will continue to accept bug fixes and update dependencies.

Apollo is a set of Java libraries that we use at Spotify when writing microservices. Apollo includes modules such as an HTTP server and a URI routing system, making it trivial to implement restful API services.

Apollo has been used in production at Spotify for a long time. As a part of the work to release version 1.0.0 we moved the development of Apollo into the open.

There are two main libraries in Apollo:

Apollo API

The apollo-api library is the Apollo library you are most likely to interact with. It gives you the tools you need to define your service routes and your request/reply handlers.

Here, for example, we define that our service will respond to a GET request on the path / with the string "hello world":

public static void init(Environment environment) {
  environment.routingEngine()
      .registerAutoRoute(Route.sync("GET", "/", requestContext -> "hello world"));
}

Note that, for an Apollo-based service, you can see the routes defined for a service by querying /_meta/0/endpoints.

The apollo-api library provides several ways to help you define your request/reply handlers. You can specify how responses should be serialized (such as JSON). Read more about this library in the Apollo API Readme.

Apollo Core

The apollo-core library manages the lifecycle (loading, starting, and stopping) of your service. You do not usually need to interact directly with apollo-core; think of it merely as "plumbing". For more information about this library, see the Apollo Core Readme.

Apollo Test

In addition to the two main Apollo libraries listed above, to help you write tests for your service we have an additional library called apollo-test. It has helpers to set up a service for testing, and to mock outgoing request responses.

Links

Introduction Website
JavaDocs
Maven site

Diagrams

Apollo set-up

Apollo in runtime

Code of conduct

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

com.spotify

Spotify

Versions

Version
1.15.8
1.15.7
1.15.6
1.15.5
1.15.2
1.15.1
1.15.0
1.14.1
1.14.0
1.13.0
1.12.1
1.12.0
1.11.0
1.10.1
1.9.0
1.8.0
1.7.0
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.0
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0