FTN5: FutoIn HTTP integration Version: 1.3 Date: 2018-02-14 Copyright: 2014-2018 FutoIn Project (http://futoin.org) Authors: Andrey Galkin
Well, as mentioned in other specs, FutoIn project was born by influence of Web technologies in scope of Enterprise solutions. So, HTTP is fundamental communication channel (besides WebSockets).
Use cases:
Note: By definition of HTTP, only uni-directional message exchange is supported with no multiplexing on communication channel level.
Note: Executor must accept URI with or without trailing slash in path
The following MIME-types are assumed under "FutoinMIME":
application/futoin+json
for JSON codingapplication/futoin+cbor
for CBOR codingapplication/futoin+msgpack
for MessagePack codingapplication/futoin+
as prefix for other formats not defined hereFutoIn request and response messages must have FutoinMIME MIME-type. This type must be used ONLY for actual messages in Invoker-Executor dialog. In any other case, standard MIME-type should be used for messages depending on coding format.
Implementation must refuse parsing request or response message, if corresponding HTTP headers do not have correct MIME-type.
Invoker should assume Use Case #4, if response MIME-Type is not FutoinMIME.
URI is assumed as defined in its RFC3986 or any later version.
Note: Executor must behave equally with or without trailing slash in URI path part.
Generic format: "{end-point-URI}/{interface}/{version}/{function_name}[/sec_field]"
Example: "https://api.example.com/futoin/some.interface.name/1.0/someFunc" "https://api.example.com/futoin/some.interface.name/1.0/someFunc/sec_field"
Query string starts with question mark "?". Parameters are separated with ampersand sign "&".
Example: "https://api.example.com/futoin/some.interface.name/1.0/someFunc?param1=val1¶m2=val2"
There are the following rules for query string coding:
Reserved.
By fundamental principles of FutoIn, there should be a special File Upload service implemented once (for both long storage and temporary files). In general, no other service should accept file uploads. Instead, special file operation API should exist.
File uploads have a serious risk of security exploits and denial of service. It should not be implemented in any arbitrary service.
Client code should first request file upload token and only then start upload identifying each related request with this token, besides general security framework.
HTTP multipart/form-data upload must not be handled by Executor. Instead, FileUpload service should handle one. Still, it is not recommended to upload more than one file at a time to save bandwidth or error situations.
To minimize effect of temporary upload errors, FileUpload service should support incremental file upload using combination of Use Case #2 and #3.
Modern web browser JavaScript should support file reading API. Client side should limit buffer size to a reasonable size until direct streaming from file is not supported by XHR.
It should be an object for on-demand access of HTTP request/response details.
HTTPChannelContext inherits from ChannelContext
=END OF SPEC=