PyCOM services talk to each other via 0MQ multipart messages via REP-REQ pair of sockets:
- Command (only CALL is supported now, response will contain either OK on success or FAIL on fatal protocol or server error)
- JSON content in UTF-8.
- (optional, not implemented yet) binary attachment
Top-level request object contains the following properties:
Top-level response object contains the following properties:
Standard services remote API
Remote interface for registering and locating interfaces and services.
Remote interface for authenticating users. There is no such service in PyCOM distribution. Why? Well, because the exact authentication procedure may differ broadly. You have to write an appropriate service yourself. :class:`pycom.apps.demos.static_auth.StaticAuth` can give you a good start.
Large binary objects storage. The main concept is bucket - set of files with a unique identifier. Can be roughly seen as a directory on a file system, but with some additional features like:
- Reference counting for buckets
- Easy cloning, compressing and deletion of a bucket
- Web-interface for reading files in a bucket
Represents a single bucket. This interface is stateful: you open a bucket and work with it. For all methods except create and open :exc:`pycom.BadRequest` is raised if bucket was not opened previously.
The only extension present is a request extension: