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

New Request/Response implementation using Fibers #149

Merged
merged 10 commits into from
Jun 19, 2018

Conversation

wallyqs
Copy link
Member

@wallyqs wallyqs commented Jun 19, 2018

  • Add new Fiber-aware request that works synchronously under the same fiber, using the new request/response implementation that is less chatty over the network and uses a single async subscription.

  • Introduce NUID style inboxes for requests

  • Spec updates

wallyqs added 10 commits June 4, 2018 10:43
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
When a callback is not passed #request now it is
possible to await for a number of responses by using a
Fiber when making the request.

```ruby
NATS.start do
  Fiber.new do
    response = NATS.request("help", "please")
    puts "Received: #{response}"
  end.resume
end
```

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
@wallyqs wallyqs merged commit 8297160 into nats-io:master Jun 19, 2018
@wallyqs wallyqs deleted the requests-fiber-mux branch June 19, 2018 17:06
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 this pull request may close these issues.

None yet

1 participant