In FutoIn, business process is a Service. Each Service has a named versionable interface. Each interface has strict definition of types and functions called spec. Spec is a JSON document in special format.
Invoker and Executor are two types of roles in FutoIn communication. Invoker makes calls to Executor. Executor hosts Services. Usually, Invoker is also a client in network communication.
FutoIn messages can be represented in JSON (default), MessagePack, CBOR and potentially other codecs. Embedded binary data is supported only in later two. Raw binary data is also supported through HTTP transport.
FutoIn messages can be transmitted through different communications channels: HTTP, WebSockets, datagram protocols (UNIX, UDP, SCTP, Browser cross-page event), other custom framing on top of streams.
There is special HTTP integration with human-readable URL coding/mapping of message.
Service interface features
Unique Java-style identifier:
- reserved namespace
futoin.*for official specs.
Semantic Versioning like
- only two MAJOR and MINOR parts,
- backward compatibility.
- allow calls to derived interface through the base one.
- mixin types and functions, but do not create inheritance chain.
Complex custom types:
- inherited from JSON-compatible base types,
integeras constrained JSON
- raw byte vector
- type variants (one-of),
- min/max value constraints for numeric,
- min/max length for strings, arrays and raw data,
- item type for arrays,
- field definition for maps (objects),
- enums and sets.
Strict function definition:
- identifier (e.g.
- parameter definition in standard and custom types,
- result definition in standard and custom types,
- list of expected exceptions,
- raw input/output indication,
- max request/response payload size,
- identifier (e.g.
Interface constraints (requirements):
- allow anonymous access,
- require secure channel,
- require Message Authentication Code,
- require binary codec,
- require bi-directional channel,
Communication channel features
- only one peer can act as Invoker,
- example: HTTP(S).
- both can act as Invoker and Executor,
- example: WebSockets, transport protocols, in-browser cross-page events.
- allows using a single communication channel for parallel requests,
- special counter “rid” field to tie requests to responses.
- Raw data upload & download for HTTP,
- Message coding in friendly URL for HTTP.
- Payload size limits based on interface specs.
Note: “spec” refers both to FutoIn specification and particular interface specification as those are tightly related.