Skip to content
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

Closed
5 tasks done
ajblane opened this issue Apr 9, 2019 · 1 comment · Fixed by #143
Closed
5 tasks done

Remote interface: Implement client side for RPC #137

ajblane opened this issue Apr 9, 2019 · 1 comment · Fixed by #143
Assignees
Milestone

Comments

@ajblane
Copy link
Collaborator

ajblane commented Apr 9, 2019

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

  • Exclusive callback queues with TTL property
    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.
  • Correlation id is not required
    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 threads
    It 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)
  • AMQP connection management for multiple threads
    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".
@ajblane ajblane self-assigned this Apr 9, 2019
@ajblane ajblane changed the title Implement RPC using RabitMQ C client Implement RPC using RabbitMQ C client Apr 9, 2019
@ajblane ajblane added this to the Saxifraga milestone Apr 10, 2019
@jserv 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
@wusyong wusyong modified the milestones: Saxifraga , Azalea May 13, 2019
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
@ajblane
Copy link
Collaborator Author

ajblane commented May 22, 2019

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
@wusyong wusyong modified the milestones: Azalea, Centaury May 27, 2019
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants