/thingsplode-synapse

Super-light communication library for anti-fragile cloud architecture.

Primary LanguageJavaApache License 2.0Apache-2.0

logo

Thingsplode Synapse - blazingly fast, super-light communication library for anti-fragile cloud architecture.

Work in progress - version 1.0.0-snapshot

Use cases

  • shines in embedded environment where CPU cycles are precious;
  • scales in the cloud, when millions of concurrent connections need to be served;

Packed with features, yet easy to use

Containerless communication

Supported protocols:

  • REST over HTTP (simplicity);
  • File streaming (download) over HTTP
  • File streaming (upload) over HTTP - #2
  • REST over HTTPS (simplicity and security);
  • Websocket (bidirectional communication for mobile and web);
  • MQTT (small size for IoT);
  • Unix domain sockets for microservices within the same Docker container (or other host-only communication) (speed) - #3;

Simplified microservice communication

Hides the complexity of microservice communication for you. It provides:

  • generated Swagger definition for your published endpoints;
  • built-in Swagger UI for browsing and calling services;
  • HTTP file download support;
  • message introspectors on the Endpoint (server) and Endpoint Proxy (client);
  • load balancer with partitioning / fail-over;
  • circuit breaker (fast failing of connections);
  • replicated service registry - #4;
  • reliable messaging;
  • error handling and message resend mechanism;
  • built-in performance monitoring
  • api keys - #5;
  • Endpoint Proxy (Client) authentication and authorization - #6;
  • message authentication - #7;

Pluggable serialization:

  • json with Jackson
  • json with Gson
  • message pack
  • google protocol buffer - #8;

Synapse Endpoint (Server)

  • request/response pattern
  • rpc pattern
  • publish/subscribe patterns
  • publish one service over multiple channels (Websocket / Rest / MqTT)

Synapse Endpoint Proxy (Client)

  • client proxy with sequential/blocking dispatching;
  • client proxy with asynchronous message dispatching;
  • message pipelining on the Endpoint (Server) side (see HTTP pipelining) - #9;

Non functional features

Some architectural choices are supporting the performance of the library:

  • non-blocking message processing (speed)
  • reactive programming in the user space
  • memory mapped files for persistence (speed)

Supported Message patterns

Request/Response

  • The Endpoint Proxy (Client) dispatches a Request to the Endpoint service (Server) and expects a Response;

Event

  • The Endpoint Proxy can signal events towards the Endpoint service (Server) in a fire and forget manner (also with activated reliable messaging).

Command/Result

  • The Endpoint service (Server) sends commands to the Endpoint Proxy (Client) and expects a Command Execution Result.

Push Notification

  • A notification is sent by the Endpoint service (Server) to the Endpoint Proxty (Client) also with reliable messaging.

Other features

  • http keepalive support