Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Aiormq | 217 | 9 | 17 | 2 months ago | 106 | January 02, 2023 | 33 | other | Python | |
Pure python AMQP 0.9.1 asynchronous client library | ||||||||||
Amqp Client | 163 | 2 | 2 | 4 years ago | 12 | May 27, 2015 | 19 | mit | Scala | |
Simple fault-tolerant AMQP client written in Scala and based on Akka and the RabbitMQ java client | ||||||||||
Qamqp | 147 | a month ago | 22 | other | C++ | |||||
AMQP 0.9.1 implementation for Qt | ||||||||||
Node Celery Ts | 85 | 10 months ago | 17 | February 20, 2020 | 20 | bsd-3-clause | TypeScript | |||
TypeScript Celery client for Node | ||||||||||
Haredo | 80 | 2 | 1 | a day ago | 60 | May 10, 2022 | 6 | mit | TypeScript | |
Node.js library for RabbitMQ | ||||||||||
Humusamqp | 78 | 10 | 4 | 10 months ago | 14 | August 05, 2021 | 4 | mit | PHP | |
PHP 7.4 AMQP library | ||||||||||
Dart_amqp | 71 | 4 | 2 | a month ago | 16 | October 16, 2021 | 10 | mit | Dart | |
Dart AMQP client implementing protocol version 0.9.1 | ||||||||||
Rjr | 68 | 13 | 1 | 4 years ago | 21 | November 10, 2015 | 10 | apache-2.0 | Ruby | |
Ruby JSON-RPC Library - json-rpc server/client mechanisms over amqp, websockets, and other transports, written in ruby | ||||||||||
Rabbit4mt4 | 67 | 6 years ago | 1 | gpl-2.0 | MQL5 | |||||
Metatrader 4 / AMQP (RabbitMQ) bridge | ||||||||||
Node Amqp Rpc | 49 | 20 | 12 | 7 years ago | 7 | May 07, 2014 | 11 | mit | JavaScript | |
AMQP RPC driver for node. Tested on RabbitMQ. |
Callme
provides an easy way to do RPC over AMQP (Callme
is the
successor of QAM
<http://packages.python.org/qam>).
Key Features:
A simple RPC Server which provides an add method:
import callme def add(a, b): return a + b server = callme.Server(server_id='fooserver', amqp_host='localhost') server.register_function(add, 'add') server.start()
and a client which uses fooserver to add 1 + 1 and finally prints the result:
import callme proxy = callme.Proxy(server_id='fooserver', amqp_host='localhost') print proxy.add(1, 1)
There are optional parameters to fit different needs which are explained in depth in the Server and Proxy Documentation.
Examples are provided in the examples directory in the package.
The Proxy
is not thread-safe, you must instantiate one Proxy per thread.
The Server
is also not thread-safe as well. Instantiate one Server per
thread.
Even if the Server is not thread-safe itself, it has the capability to use
multi-threading. For each RPC Call a worker thread is started which
significantly improves the call speed if multiple clients are calling
the server simultaneously. To activate multi-threading on the server pass
threading=True
to the Server class.
It is possible to control the access to a RPC Server by the Broker. We use RabbitMQ as example because this is the broker we used for testing and development. To get the highest security out of the permission system it is recommended using separate vhost only for callme communication (if you have other amqp messages on your system on the same broker).
For a more in depth explanation why these permissions look how they are see
Exchange Design
.
To limit one server to only accept RPC Calls to its server_id and send result back to clients we use these permissions. Assumption the RPC server has its own user called carl on the rabbitmq broker.
rabbitmqctl set_permissions carl "server_fooserver_.*" "server_fooserver_.*|client_.*_ex_.*" "server_fooserver_.*"
To limit the Proxy to the server with the server_id fooserver (no other server can then be reached with this user) we use these permissions. Assumption the RPC proxy has its own user called olivia on the rabbitmq broker.
rabbitmqctl set_permissions olivia "client_olivia_.*" "client_olivia_.*|server_fooserver_ex" "client_olivia_.*"
To give the client access to another RPC server with server_id barserver we set the following permissions:
rabbitmqctl set_permissions olivia "client_olivia_.*" "client_olivia_.*|server_fooserver_ex|server_barserver_ex" "client_olivia_.*"
To give the client access to all RPC servers set the permission as follows:
rabbitmqctl set_permissions olivia "client_olivia_.*" "client_olivia_.*|server_.*_ex" "client_olivia_.*"
Callme uses kombu for communication between Proxy and Server. Callme transfers
instances of the RpcResponse
and RpcRequest
to execute remote procedure
calls (RPC). The instances of these classes are pickled by kombu and then
transferred to the server or proxy.
Every Proxy creates a Exchange and a Queue bound to the Exchange which has
the form client_<amqp_user>_ex_<uid>
and client_<amqp_user>_queue_<uid>
.
<uid>
is generated on creation of the Proxy. All Queues and Exchanges are
auto-deleted and non-durable.
Client Exchange and Queue are declared and bound by the client and server Exchange and Queue are declared and bound by the server.
The Exchange and Queue Design:
Time | ------------------------------ | ---------------------------- | Proxy | v | Server | | User: olivia | | User: carl | | ------------ | | ---------- | | | | | | --- RPC Call--------------------------> server_fooserver_ex | | | | (Exchange) | | | | | | | | | | | | | | | | | | | v | | | | | | | | server_fooserver_queue | | | | (Queue) | | | | | | | | | / | | client_olivia_ex_<uid> <----- RPC Result -------------- | | (Exchange) | | | | | | | | | | | | | | v | | | | client_olivia_queue_<uid> | | | | (Queue) | | | |____________________________| |__________________________|
At the moment there are two loggers present with the names callme.proxy and callme.server. Both are mostly used for debugging at the moment.
If you find any issues please report them on https://github.com/ceelian/callme/issues.
You can get the python package on the Python Package Index.
The git repository is available at github.com callme.
callme
can be installed via the Python Package Index or from source.
Using easy_install
to install callme
:
$ easy_install callme
Using pip
to install callme
:
$ pip install callme
If you have downloaded a source tarball you can install it as follows:
$ python setup.py build $ python setup.py install
Wingware - The Python IDE (http://wingware.com).
We are welcome everyone who wants to contribute to callme
.
Development of callme happens at ceelian/callme.
Callme is released under the BSD License. The full license text is in the root folder of the callme Package.