Welcome to remcall’s documentation!¶
remcall¶
remcall (short for remote method calls) is a protocol for inter process communication (IPC) between different programming languages using object proxying as its primary method for information exchange. Communication using remcall requires the upfront definition of a schema (comprised of record and enum types and more importantly interfaces with method signatures) which then depending on the programming language is compiled or interpreted. Both communication participants are then free to implement any or none of the interfaces and reference concrete objects to the other side which will be represented using proxy objects. There is a certain distinction between a server (waiting for connections, serving and entry point) and a client (initiating a connection, performing the first method call) in remcall, but the protocol allows for method calls and object proxying in both directions. Remcall employs a binary representation for both, its schema and its communication protocol. Communcation can be layered on top of any bidirectional streams supporting binary data such as TCP sockets, stdin/out, websockets.
- Free software: MIT license
- Documentation: https://remcall.readthedocs.io.
Installation¶
Stable release¶
To install remcall, run this command in your terminal:
$ pip install remcall
This is the preferred method to install remcall, as it will always install the most recent stable release.
If you don’t have pip installed, this Python installation guide can guide you through the process.
From sources¶
The sources for remcall can be downloaded from the Github repo.
You can either clone the public repository:
$ git clone git://github.com/luphord/remcall
Or download the tarball:
$ curl -OL https://github.com/luphord/remcall/tarball/master
Once you have a copy of the source, you can install it with:
$ python setup.py install
remcall¶
remcall package¶
Subpackages¶
remcall.codec package¶
Submodules¶
remcall.codec.base module¶
remcall.codec.read module¶
remcall.codec.write module¶
Module contents¶
remcall.communication package¶
Submodules¶
remcall.communication.base module¶
remcall.communication.bridge module¶
remcall.communication.proxy module¶
-
class
remcall.communication.proxy.
MethodProxy
(interface, method, bridge, name_converter)[source]¶ Bases:
object
remcall.communication.receive module¶
remcall.communication.send module¶
remcall.communication.store module¶
Module contents¶
remcall.schema package¶
Submodules¶
remcall.schema.core module¶
-
class
remcall.schema.core.
Type
(name: str)[source]¶ Bases:
object
-
is_declared
¶
-
sort_key
¶
-
type_order
= -1¶
-
-
class
remcall.schema.core.
Array
(typ: remcall.schema.core.Type)[source]¶ Bases:
remcall.schema.core.Type
-
type_order
= 3¶
-
-
class
remcall.schema.core.
Primitive
(name: str)[source]¶ Bases:
remcall.schema.core.Type
-
class
remcall.schema.core.
Enum
(name: str, values: Iterable[str])[source]¶ Bases:
remcall.schema.core.Type
-
is_declared
¶
-
type_order
= 0¶
-
-
class
remcall.schema.core.
Record
(name: str, fields: Iterable[Tuple[Union[remcall.schema.core.Type, remcall.schema.typeref.TypeRef], str]])[source]¶ Bases:
remcall.schema.core.Type
-
is_declared
¶
-
resolve_type_references
(type_ref_lookup: Mapping[remcall.schema.typeref.TypeRef, remcall.schema.core.Type]) → None[source]¶
-
type_order
= 1¶
-
-
class
remcall.schema.core.
Method
(name: str, arguments: Iterable[Tuple[Union[remcall.schema.core.Type, remcall.schema.typeref.TypeRef], str]], return_type: remcall.schema.core.Type)[source]¶ Bases:
object
-
class
remcall.schema.core.
Interface
(name: str, methods: Iterable[remcall.schema.core.Method])[source]¶ Bases:
remcall.schema.core.Type
-
is_declared
¶
-
methods_sorted
¶
-
resolve_type_references
(type_ref_lookup: Mapping[remcall.schema.typeref.TypeRef, remcall.schema.core.Type]) → None[source]¶
-
type_order
= 2¶
-
-
class
remcall.schema.core.
Schema
(label, types, bytes_method_ref=2, bytes_object_ref=4, sha256_digest=None)[source]¶ Bases:
object
-
declared_types
¶
-
enums
¶
-
enums_sorted
¶
-
interfaces
¶
-
interfaces_sorted
¶
-
iter_declared_types
¶
-
method_lookup
¶
-
method_table
¶
-
method_to_interface
¶
-
records
¶
-
records_sorted
¶
-
type_schemas
¶
-
type_table
¶
-
remcall.schema.typeref module¶
Module contents¶
Submodules¶
remcall.error module¶
-
exception
remcall.error.
DuplicateMethodReturnValue
(request_id)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
DuplicateRegistrationForMethodReturn
(request_id)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
MethodNotAvailable
(method, impl_method_name, this)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
MissingMethodReturnValueEvent
(request_id)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
UnknownCommand
(command)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
UnknownImplementationObjectReference
(key)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
UnknownProxyObject
(obj)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
UnknownType
(typ)[source]¶ Bases:
remcall.error.RemcallError
-
exception
remcall.error.
WrongNumberOfBytesRead
(bytes_requested, bytes_read, offset)[source]¶ Bases:
remcall.error.RemcallError
remcall.generate module¶
-
class
remcall.generate.
CSharphCodeGenerator
(schema, namespace='Remcall.Generated', name_converter=<remcall.naming.CSharpNameConverter object>)[source]¶ Bases:
object
-
indent_chars
= '\t'¶
-
type_names
= {Primitive("void"): 'void', Primitive("boolean"): 'bool', Primitive("int8"): 'SByte', Primitive("uint8"): 'byte', Primitive("int16"): 'Int16', Primitive("uint16"): 'UInt16', Primitive("int32"): 'Int32', Primitive("uint32"): 'UInt32', Primitive("int64"): 'Int64', Primitive("uint64"): 'UInt64', Primitive("float32"): 'float', Primitive("float64"): 'double', Primitive("string"): 'string', Primitive("date"): 'DateTime', Primitive("time"): 'Time', Primitive("datetime"): 'DateTime'}¶
-
remcall.implementation module¶
remcall.naming module¶
remcall.util module¶
Module contents¶
Remcall (short for remote method calls) is a protocol for inter process communication (IPC) between different programming languages using object proxying as its primary method for information exchange. Communication using remcall requires the upfront definition of a schema (comprised of record and enum types and more importantly interfaces with method signatures) which then depending on the programming language is compiled or interpreted. Both communication participants are then free to implement any or none of the interfaces and reference concrete objects to the other side which will be represented using proxy objects. There is a certain distinction between a server (waiting for connections, serving and entry point) and a client (initiating a connection, performing the first method call) in remcall, but the protocol allows for method calls and object proxying in both directions. Remcall employs a binary representation for both, its schema and its communication protocol. Communcation can be layered on top of any bidirectional streams supporting binary data such as TCP sockets, stdin/out, websockets.
Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions¶
Report Bugs¶
Report bugs at https://github.com/luphord/remcall/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Fix Bugs¶
Look through the GitHub issues for bugs. Anything tagged with “bug” and “help wanted” is open to whoever wants to implement it.
Implement Features¶
Look through the GitHub issues for features. Anything tagged with “enhancement” and “help wanted” is open to whoever wants to implement it.
Write Documentation¶
remcall could always use more documentation, whether as part of the official remcall docs, in docstrings, or even on the web in blog posts, articles, and such.
Submit Feedback¶
The best way to send feedback is to file an issue at https://github.com/luphord/remcall/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
Get Started!¶
Ready to contribute? Here’s how to set up remcall for local development.
Fork the remcall repo on GitHub.
Clone your fork locally:
$ git clone git@github.com:your_name_here/remcall.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
$ mkvirtualenv remcall $ cd remcall/ $ python setup.py develop
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
$ flake8 remcall tests $ python setup.py test or py.test $ tox
To get flake8 and tox, just pip install them into your virtualenv.
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Pull Request Guidelines¶
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
- The pull request should work for Python 2.7, 3.4, 3.5 and 3.6, and for PyPy. Check https://travis-ci.org/luphord/remcall/pull_requests and make sure that the tests pass for all supported Python versions.
Deploying¶
A reminder for the maintainers on how to deploy. Make sure all your changes are committed (including an entry in HISTORY.rst). Then run:
$ bumpversion patch # possible: major / minor / patch
$ git push
$ git push --tags
Travis will then deploy to PyPI if tests pass.
Credits¶
Development Lead¶
- luphord <luphord@protonmail.com>
Contributors¶
None yet. Why not be the first?