async-bus 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/bus/client.rb +74 -36
- data/lib/async/bus/controller.rb +58 -0
- data/lib/async/bus/protocol/connection.rb +254 -81
- data/lib/async/bus/protocol/invoke.rb +78 -0
- data/lib/async/bus/protocol/proxy.rb +44 -41
- data/lib/async/bus/protocol/release.rb +37 -0
- data/lib/async/bus/protocol/response.rb +51 -0
- data/lib/async/bus/protocol/transaction.rb +93 -63
- data/lib/async/bus/protocol/wrapper.rb +145 -35
- data/lib/async/bus/server.rb +27 -31
- data/lib/async/bus/version.rb +5 -20
- data/lib/async/bus.rb +3 -19
- data/license.md +21 -0
- data/readme.md +53 -0
- data/releases.md +12 -0
- data.tar.gz.sig +1 -0
- metadata +49 -16
- metadata.gz.sig +0 -0
|
@@ -1,51 +1,161 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
|
13
|
-
# all copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
# THE SOFTWARE.
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2021-2025, by Samuel Williams.
|
|
22
5
|
|
|
23
|
-
require
|
|
6
|
+
require "msgpack"
|
|
7
|
+
|
|
8
|
+
require_relative "proxy"
|
|
9
|
+
require_relative "invoke"
|
|
10
|
+
require_relative "response"
|
|
11
|
+
require_relative "release"
|
|
12
|
+
|
|
13
|
+
require_relative "../controller"
|
|
24
14
|
|
|
25
15
|
module Async
|
|
26
16
|
module Bus
|
|
27
17
|
module Protocol
|
|
18
|
+
# Represents a MessagePack factory wrapper for async-bus serialization.
|
|
28
19
|
class Wrapper < MessagePack::Factory
|
|
29
|
-
|
|
20
|
+
# Initialize a new wrapper.
|
|
21
|
+
# @parameter connection [Connection] The connection for proxy resolution.
|
|
22
|
+
# @parameter reference_types [Array(Class)] Types to serialize as proxies.
|
|
23
|
+
def initialize(connection, reference_types: [Controller])
|
|
30
24
|
super()
|
|
31
25
|
|
|
32
|
-
@
|
|
26
|
+
@connection = connection
|
|
27
|
+
@reference_types = reference_types
|
|
28
|
+
|
|
29
|
+
# Store the peer connection for forwarding proxies:
|
|
30
|
+
# When a proxy is forwarded (local=false), it should point back to the sender
|
|
31
|
+
# (the peer connection), not the receiver (this connection).
|
|
32
|
+
@peer_connection = nil
|
|
33
|
+
|
|
34
|
+
# The order here matters.
|
|
35
|
+
|
|
36
|
+
self.register_type(0x00, Invoke, recursive: true,
|
|
37
|
+
packer: ->(invoke, packer){invoke.pack(packer)},
|
|
38
|
+
unpacker: ->(unpacker){Invoke.unpack(unpacker)},
|
|
39
|
+
)
|
|
33
40
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
41
|
+
[Return, Yield, Error, Next, Throw, Close].each_with_index do |klass, index|
|
|
42
|
+
self.register_type(0x01 + index, klass, recursive: true,
|
|
43
|
+
packer: ->(value, packer){value.pack(packer)},
|
|
44
|
+
unpacker: ->(unpacker){klass.unpack(unpacker)},
|
|
45
|
+
)
|
|
46
|
+
end
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
# Reverse serialize proxies back into proxies:
|
|
49
|
+
# When a Proxy is received, use proxy_object to handle reverse lookup
|
|
50
|
+
self.register_type(0x10, Proxy, recursive: true,
|
|
51
|
+
packer: self.method(:pack_proxy),
|
|
52
|
+
unpacker: self.method(:unpack_proxy),
|
|
53
|
+
)
|
|
44
54
|
|
|
45
|
-
self.register_type(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
55
|
+
self.register_type(0x11, Release, recursive: true,
|
|
56
|
+
packer: ->(release, packer){release.pack(packer)},
|
|
57
|
+
unpacker: ->(unpacker){Release.unpack(unpacker)},
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
self.register_type(0x20, Symbol)
|
|
61
|
+
self.register_type(0x21, Exception, recursive: true,
|
|
62
|
+
packer: self.method(:pack_exception),
|
|
63
|
+
unpacker: self.method(:unpack_exception),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
self.register_type(0x22, Class,
|
|
67
|
+
packer: ->(klass){klass.name},
|
|
68
|
+
unpacker: ->(name){Object.const_get(name)},
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
reference_packer = self.method(:pack_reference)
|
|
72
|
+
reference_unpacker = self.method(:unpack_reference)
|
|
73
|
+
|
|
74
|
+
# Serialize objects into proxies:
|
|
75
|
+
reference_types&.each_with_index do |klass, index|
|
|
76
|
+
self.register_type(0x30 + index, klass, recursive: true,
|
|
77
|
+
packer: reference_packer,
|
|
78
|
+
unpacker: reference_unpacker,
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Pack a proxy into a MessagePack packer.
|
|
84
|
+
#
|
|
85
|
+
# Validates that the proxy is for this connection and serializes the proxy name.
|
|
86
|
+
# Multi-hop proxy forwarding is not supported, so proxies can only be serialized
|
|
87
|
+
# from the same connection they were created for (round-trip scenarios).
|
|
88
|
+
#
|
|
89
|
+
# @parameter proxy [Proxy] The proxy to serialize.
|
|
90
|
+
# @parameter packer [MessagePack::Packer] The packer to write to.
|
|
91
|
+
# @raises [ArgumentError] If the proxy is from a different connection (multi-hop forwarding not supported).
|
|
92
|
+
def pack_proxy(proxy, packer)
|
|
93
|
+
# Check if the proxy is for this connection:
|
|
94
|
+
if proxy.__connection__ != @connection
|
|
95
|
+
proxy = @connection.proxy(proxy)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
packer.write(proxy.__name__)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Unpack a proxy from a MessagePack unpacker.
|
|
102
|
+
#
|
|
103
|
+
# When deserializing a proxy:
|
|
104
|
+
# - If the object is bound locally, return the actual object (round-trip scenario)
|
|
105
|
+
# - If the object is not found locally, create a proxy pointing to this connection
|
|
106
|
+
# (the proxy was forwarded from another connection and should point back to the sender)
|
|
107
|
+
#
|
|
108
|
+
# @parameter unpacker [MessagePack::Unpacker] The unpacker to read from.
|
|
109
|
+
# @returns [Object | Proxy] The actual object if bound locally, or a proxy pointing to this connection.
|
|
110
|
+
def unpack_proxy(unpacker)
|
|
111
|
+
@connection.proxy_object(unpacker.read)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Pack an exception into a MessagePack packer.
|
|
115
|
+
# @parameter exception [Exception] The exception to pack.
|
|
116
|
+
# @parameter packer [MessagePack::Packer] The packer to write to.
|
|
117
|
+
def pack_exception(exception, packer)
|
|
118
|
+
packer.write(exception.class.name)
|
|
119
|
+
packer.write(exception.message)
|
|
120
|
+
packer.write(exception.backtrace)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Unpack an exception from a MessagePack unpacker.
|
|
124
|
+
# @parameter unpacker [MessagePack::Unpacker] The unpacker to read from.
|
|
125
|
+
# @returns [Exception] A reconstructed exception.
|
|
126
|
+
def unpack_exception(unpacker)
|
|
127
|
+
klass = unpacker.read
|
|
128
|
+
message = unpacker.read
|
|
129
|
+
backtrace = unpacker.read
|
|
130
|
+
|
|
131
|
+
klass = Object.const_get(klass)
|
|
132
|
+
|
|
133
|
+
exception = klass.new(message)
|
|
134
|
+
exception.set_backtrace(backtrace)
|
|
135
|
+
|
|
136
|
+
return exception
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Pack a reference type object (e.g., Controller) into a MessagePack packer.
|
|
140
|
+
#
|
|
141
|
+
# Serializes the object as a proxy by generating a temporary name and writing it to the packer.
|
|
142
|
+
# The object is implicitly bound to the connection with a temporary name.
|
|
143
|
+
#
|
|
144
|
+
# @parameter object [Object] The reference type object to serialize.
|
|
145
|
+
# @parameter packer [MessagePack::Packer] The packer to write to.
|
|
146
|
+
def pack_reference(object, packer)
|
|
147
|
+
packer.write(@connection.proxy_name(object))
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Unpack a reference type object from a MessagePack unpacker.
|
|
151
|
+
#
|
|
152
|
+
# Reads a proxy name and returns the corresponding object or proxy.
|
|
153
|
+
# If the object is bound locally, returns the actual object; otherwise returns a proxy.
|
|
154
|
+
#
|
|
155
|
+
# @parameter unpacker [MessagePack::Unpacker] The unpacker to read from.
|
|
156
|
+
# @returns [Object | Proxy] The actual object if bound locally, or a proxy otherwise.
|
|
157
|
+
def unpack_reference(unpacker)
|
|
158
|
+
@connection.proxy_object(unpacker.read)
|
|
49
159
|
end
|
|
50
160
|
end
|
|
51
161
|
end
|
data/lib/async/bus/server.rb
CHANGED
|
@@ -1,49 +1,45 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
|
13
|
-
# all copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
# THE SOFTWARE.
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2021-2025, by Samuel Williams.
|
|
22
5
|
|
|
23
|
-
require_relative
|
|
24
|
-
require
|
|
6
|
+
require_relative "protocol/connection"
|
|
7
|
+
require "set"
|
|
25
8
|
|
|
9
|
+
# @namespace
|
|
26
10
|
module Async
|
|
11
|
+
# @namespace
|
|
27
12
|
module Bus
|
|
13
|
+
# Represents a server that accepts async-bus connections.
|
|
28
14
|
class Server
|
|
29
|
-
|
|
15
|
+
# Initialize a new server.
|
|
16
|
+
# @parameter endpoint [IO::Endpoint] The endpoint to listen on.
|
|
17
|
+
# @parameter options [Hash] Additional options for connections.
|
|
18
|
+
def initialize(endpoint = nil, **options)
|
|
30
19
|
@endpoint = endpoint || Protocol.local_endpoint
|
|
31
|
-
@
|
|
32
|
-
|
|
33
|
-
@context = {}
|
|
20
|
+
@options = options
|
|
34
21
|
end
|
|
35
22
|
|
|
36
|
-
|
|
23
|
+
# Called when a connection is established.
|
|
24
|
+
# Override this method to perform setup when a connection is established.
|
|
25
|
+
#
|
|
26
|
+
# @parameter connection [Protocol::Connection] The established connection.
|
|
27
|
+
protected def connected!(connection)
|
|
28
|
+
# Do nothing by default.
|
|
29
|
+
end
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
# Accept incoming connections.
|
|
32
|
+
# @yields {|connection| ...} Block called with each new connection.
|
|
33
|
+
def accept(&block)
|
|
39
34
|
@endpoint.accept do |peer|
|
|
40
|
-
connection = Protocol::Connection.server(peer)
|
|
41
|
-
|
|
35
|
+
connection = Protocol::Connection.server(peer, **@options)
|
|
36
|
+
|
|
37
|
+
connected!(connection, &block)
|
|
38
|
+
|
|
39
|
+
yield connection if block_given?
|
|
42
40
|
|
|
43
|
-
yield connection
|
|
44
41
|
connection.run
|
|
45
42
|
ensure
|
|
46
|
-
connection = @connected.delete(peer)
|
|
47
43
|
connection&.close
|
|
48
44
|
end
|
|
49
45
|
end
|
data/lib/async/bus/version.rb
CHANGED
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
|
13
|
-
# all copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
# THE SOFTWARE.
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2021-2025, by Samuel Williams.
|
|
22
5
|
|
|
6
|
+
# @namespace
|
|
23
7
|
module Async
|
|
8
|
+
# @namespace
|
|
24
9
|
module Bus
|
|
25
|
-
VERSION = "0.
|
|
10
|
+
VERSION = "0.3.0"
|
|
26
11
|
end
|
|
27
12
|
end
|
data/lib/async/bus.rb
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
# furnished to do so, subject to the following conditions:
|
|
11
|
-
#
|
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
|
13
|
-
# all copies or substantial portions of the Software.
|
|
14
|
-
#
|
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
# THE SOFTWARE.
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2021-2025, by Samuel Williams.
|
|
22
5
|
|
|
23
6
|
require_relative "bus/version"
|
|
7
|
+
require_relative "bus/controller"
|
data/license.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright, 2021-2025, by Samuel Williams.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/readme.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Async::Bus
|
|
2
|
+
|
|
3
|
+
When building distributed systems or multi-process applications, you need a way for processes to communicate and invoke methods on objects in other processes. `async-bus` provides a lightweight message-passing system for inter-process communication (IPC) using Unix domain sockets, enabling transparent remote procedure calls (RPC) where remote objects feel like local objects.
|
|
4
|
+
|
|
5
|
+
Use `async-bus` when you need:
|
|
6
|
+
|
|
7
|
+
- **Inter-process communication**: Connect multiple Ruby processes running on the same machine.
|
|
8
|
+
- **Transparent RPC**: Call methods on remote objects as if they were local.
|
|
9
|
+
- **Type-safe serialization**: Automatically serialize and deserialize Ruby objects using MessagePack.
|
|
10
|
+
- **Asynchronous operations**: Non-blocking message passing built on the Async framework.
|
|
11
|
+
|
|
12
|
+
[](https://github.com/socketry/async-bus/actions?workflow=Test)
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
Please see the [project documentation](https://socketry.github.io/async-bus/) for more details.
|
|
17
|
+
|
|
18
|
+
- [Getting Started](https://socketry.github.io/async-bus/guides/getting-started/index) - This guide explains how to get started with `async-bus` to build asynchronous message-passing systems with transparent remote procedure calls in Ruby.
|
|
19
|
+
|
|
20
|
+
- [Controllers](https://socketry.github.io/async-bus/guides/controllers/index) - This guide explains how to use controllers in `async-bus` to build explicit remote interfaces with pass-by-reference semantics, enabling bidirectional communication and shared state across connections.
|
|
21
|
+
|
|
22
|
+
## Releases
|
|
23
|
+
|
|
24
|
+
Please see the [project releases](https://socketry.github.io/async-bus/releases/index) for all releases.
|
|
25
|
+
|
|
26
|
+
### v0.3.0
|
|
27
|
+
|
|
28
|
+
- Add support for multi-hop proxying.
|
|
29
|
+
- Fix proxying of throw/catch value.
|
|
30
|
+
- `Client#run` now takes a block.
|
|
31
|
+
- `Server#run` delegates to `Server#connected!`.
|
|
32
|
+
|
|
33
|
+
### v0.2.0
|
|
34
|
+
|
|
35
|
+
- Fix handling of temporary objects.
|
|
36
|
+
|
|
37
|
+
## Contributing
|
|
38
|
+
|
|
39
|
+
We welcome contributions to this project.
|
|
40
|
+
|
|
41
|
+
1. Fork it.
|
|
42
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
|
43
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
|
44
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
|
45
|
+
5. Create new Pull Request.
|
|
46
|
+
|
|
47
|
+
### Developer Certificate of Origin
|
|
48
|
+
|
|
49
|
+
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
|
50
|
+
|
|
51
|
+
### Community Guidelines
|
|
52
|
+
|
|
53
|
+
This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
|
data/releases.md
ADDED
data.tar.gz.sig
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1����F�5;rf�f�uC��Ŀ������GA ��'C�w�2(st!_��[{��F�}L<�s���^@�J�|���ש�e��g�$0�(}�}��{�����l�(����B,ηCѓ����4k��(ĂI�z���\2�|碹ZK���&l1��W�f�3^�g�<�O���#P}��v�z��R��%��Ʋ�Wc�稢N��8�i�e�P08eؗ�;��Z�\j���Βom�i{j�q�kЂ��Vڙ⦾�!�奧�b����Y�,8_O�
|
metadata
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-bus
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
|
-
cert_chain:
|
|
11
|
-
|
|
9
|
+
cert_chain:
|
|
10
|
+
- |
|
|
11
|
+
-----BEGIN CERTIFICATE-----
|
|
12
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
|
13
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
|
14
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
|
15
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
|
16
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
|
17
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
|
18
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
|
19
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
|
20
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
|
21
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
|
22
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
|
23
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
|
24
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
|
25
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
|
26
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
|
27
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
|
28
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
|
29
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
|
30
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
|
31
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
|
32
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
|
33
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
|
34
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
|
35
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
|
36
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
|
37
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
|
38
|
+
-----END CERTIFICATE-----
|
|
39
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
40
|
dependencies:
|
|
13
41
|
- !ruby/object:Gem::Dependency
|
|
14
42
|
name: async
|
|
@@ -25,7 +53,7 @@ dependencies:
|
|
|
25
53
|
- !ruby/object:Gem::Version
|
|
26
54
|
version: '0'
|
|
27
55
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
56
|
+
name: io-endpoint
|
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
|
30
58
|
requirements:
|
|
31
59
|
- - ">="
|
|
@@ -39,13 +67,13 @@ dependencies:
|
|
|
39
67
|
- !ruby/object:Gem::Version
|
|
40
68
|
version: '0'
|
|
41
69
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
70
|
+
name: io-stream
|
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
|
44
72
|
requirements:
|
|
45
73
|
- - ">="
|
|
46
74
|
- !ruby/object:Gem::Version
|
|
47
75
|
version: '0'
|
|
48
|
-
type: :
|
|
76
|
+
type: :runtime
|
|
49
77
|
prerelease: false
|
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
79
|
requirements:
|
|
@@ -53,38 +81,44 @@ dependencies:
|
|
|
53
81
|
- !ruby/object:Gem::Version
|
|
54
82
|
version: '0'
|
|
55
83
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
84
|
+
name: msgpack
|
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
|
58
86
|
requirements:
|
|
59
87
|
- - ">="
|
|
60
88
|
- !ruby/object:Gem::Version
|
|
61
89
|
version: '0'
|
|
62
|
-
type: :
|
|
90
|
+
type: :runtime
|
|
63
91
|
prerelease: false
|
|
64
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
93
|
requirements:
|
|
66
94
|
- - ">="
|
|
67
95
|
- !ruby/object:Gem::Version
|
|
68
96
|
version: '0'
|
|
69
|
-
description:
|
|
70
|
-
email:
|
|
71
97
|
executables: []
|
|
72
98
|
extensions: []
|
|
73
99
|
extra_rdoc_files: []
|
|
74
100
|
files:
|
|
75
101
|
- lib/async/bus.rb
|
|
76
102
|
- lib/async/bus/client.rb
|
|
103
|
+
- lib/async/bus/controller.rb
|
|
77
104
|
- lib/async/bus/protocol/connection.rb
|
|
105
|
+
- lib/async/bus/protocol/invoke.rb
|
|
78
106
|
- lib/async/bus/protocol/proxy.rb
|
|
107
|
+
- lib/async/bus/protocol/release.rb
|
|
108
|
+
- lib/async/bus/protocol/response.rb
|
|
79
109
|
- lib/async/bus/protocol/transaction.rb
|
|
80
110
|
- lib/async/bus/protocol/wrapper.rb
|
|
81
111
|
- lib/async/bus/server.rb
|
|
82
112
|
- lib/async/bus/version.rb
|
|
113
|
+
- license.md
|
|
114
|
+
- readme.md
|
|
115
|
+
- releases.md
|
|
83
116
|
homepage: https://github.com/socketry/async-bus
|
|
84
117
|
licenses:
|
|
85
118
|
- MIT
|
|
86
|
-
metadata:
|
|
87
|
-
|
|
119
|
+
metadata:
|
|
120
|
+
documentation_uri: https://socketry.github.io/async-bus/
|
|
121
|
+
source_code_uri: https://github.com/socketry/async-bus.git
|
|
88
122
|
rdoc_options: []
|
|
89
123
|
require_paths:
|
|
90
124
|
- lib
|
|
@@ -92,15 +126,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
92
126
|
requirements:
|
|
93
127
|
- - ">="
|
|
94
128
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: '
|
|
129
|
+
version: '3.2'
|
|
96
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
131
|
requirements:
|
|
98
132
|
- - ">="
|
|
99
133
|
- !ruby/object:Gem::Version
|
|
100
134
|
version: '0'
|
|
101
135
|
requirements: []
|
|
102
|
-
rubygems_version: 3.
|
|
103
|
-
signing_key:
|
|
136
|
+
rubygems_version: 3.6.9
|
|
104
137
|
specification_version: 4
|
|
105
138
|
summary: Transparent Ruby IPC over an asynchronous message bus.
|
|
106
139
|
test_files: []
|
metadata.gz.sig
ADDED
|
Binary file
|