-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote interface: Implement client side for RPC #137
Milestone
Comments
ajblane
changed the title
Implement RPC using RabitMQ C client
Implement RPC using RabbitMQ C client
Apr 9, 2019
jserv
changed the title
Implement RPC using RabbitMQ C client
Remote interface: Implement client side for RPC
Apr 15, 2019
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
Apr 25, 2019
* make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
Apr 25, 2019
* `make BUILD_REMOTE=1` to build libdcurl.so and remote-worker * `make BUILD_REMOTE=1 check` with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
Apr 25, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 12, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 14, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 14, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 20, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * Channel management for multiple threads but no verification * Implement local fallback PoW when remote interface fails Related DLTcollab#137 Related DLTcollab#139
Related to #139 |
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 22, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 23, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 23, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137 fix: Fix thread safe For the alanxz-provided RabbitMQ C AMQP client library, it does not support that multiple threads execute multiple channels in an AMQP connection. Therefore, we fix it to open an AMQP connection per thread.
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 23, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 23, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 28, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 30, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
ajblane
added a commit
to ajblane/dcurl
that referenced
this issue
May 31, 2019
* make BUILD_REMOTE=1 to build libdcurl.so and remote-worker * make BUILD_REMOTE=1 check with RabbitMQ broker and remote-worker * RPC with exclusive callback queues with TTL property * AMQP connection management for multiple threads * Implement local fallback PoW when remote interface fails Related DLTcollab#137
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, RabbitMQ C client only provides the RPC client example and not provides the RPC server example.
RPC server
Here are some samples:
RPC client
For the RPC client example, it declares a private queue (callback queue) with auto-delete that means the queue is deleted when all consumers have finished using it. However, one RPC client only has one private queue. Therefore, I will modify a private queue with auto-delete into a private queue with exclusive. See RabbitMQ the difference between exclusive and auto-delete to know them. Moreover, exclusive queues auto-delete when the consumer disconnects and we need to keep connection alive, so we need to use exclusive callback queues with TTL property to automatically delete callback queues.
In addition, in the scenario of AttachToTangle API, there only is 0 or 1 result message in the callback queue of a AttachToTangle thread, so correlation id is not required.
Channel management for multiple threadsIt is very common to open a new channel per thread and not share channels between them, see "Channels", so we may require the channel management. Here is [a example of the implementation of channel management].(https://github.com/alanxz/SimpleAmqpClient/blob/master/src/ChannelImpl.cpp#L134)
For the alanxz-provided RabbitMQ C AMQP client library, it does not support that multiple threads execute multiple channels in an AMQP connection. Therefore, we instead should open an AMQP connection per thread, as refers to "Writing applications using librabbitmq".
The text was updated successfully, but these errors were encountered: