Apache Streams Architecture

The architecture for the Apache Streams project is essentially a loosely coupled set of modules which provide, process, or persist documents and metadata, with a preference for ActivityStreams formatted messages.

Streams contains libraries and patterns for specifying document schemas and converting documents to and from ActivityStreams format, and runtime bindings for deploying, monitoring, and interfacing with running streams.

Streams is heavily influenced by Enterprise Integration Patterns and general messaging architecture. It is the goal of the project to support multiple execution containers, including distributed deployments.

Apache Streams (incubating) Architecture

Streams Vocabulary

Activity Persist Reader: Task running within an Activity Streams deployment that sources documents from a file system or database.

Activity Persist Writer: Task running within an Activity Streams deployment that saves documents to a file system or database.

Activity Processor: Task running within Activity Streams deployment that transforms documents, perhaps with a synchronous call to an external system.

Activity Provider: Task running within Activity Streams deployment that sources documents for the stream, likely in their original data format.

Activity Publisher: Entity external to Activity Streams server that creates Activities per the activitystre.ms specification

Activity Publisher Endpoint Adapter: Provides protocol interfaces for Activity Publishers to use when registering as an Activity Publisher and when publishing Activities

Publisher Registration Service: Authorizes Activity Producers to publish Activities to Activity Streams server and configures a dedicated Activity Consumer for the Activity Publisher

Activity Routing Service: For pushed Activities, this service routes the Activity to the appropriate Activity Consumer

Activity Consumer: Consumes Activities from Authorized Activity Publishers. An Activity Consumer is set up to be either a push or pull service. A Pull Activity Consumer will poll an Activity Publisher for new Activities, and a Push Activity Consumer will receive new Activities from the Activity Router Service.

Activity Splitter: Activity Consumers use the Activity Splitter to create discrete Activity messages from a collection of Activities and place them for processing on the Activity Queue.

Activity Aggregation Service: Pops Activities from the Activity Queue and notifies Activity Streams Subscriber Delegates when a new Activity Stream they have subscribed to is available.

Activity Streams Subscriber: An external entity that is interested in subscribing to aggregated Activity Streams based on some criteria. Expects Activities adhering to activitystre.ms specification

Activity Streams Subscriber Delegate: Defines the aggregation of Activity Streams on behalf of Activity Streams Consumers and provides notification to its Activity Streams Subscriber when new aggregated Activity Streams are available

Activity Streams Subscriber Endpoint Adapter: Provides protocol interfaces for Activity Streams Subscribers to use when subscribing to Activity Streams and polling for new Activity Streams

Activity Streams Subscriber Registration Service: Creates Activity Streams Subscriber Delegates for each Activity Streams Subscribers.

Activity Streams Router: Handles the routing of poll requests from Activity Streams Subscribers to Activity Streams Subscriber Delegates and push notifications from Activity Streams Subscriber Delegates to Activity Streams Subscribers