anycable 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/lib/anycable/rpc/rpc.rb +2 -3
- data/lib/anycable/rpc/rpc_services.rb +3 -0
- data/lib/anycable/rpc_handler.rb +3 -6
- data/lib/anycable/version.rb +1 -1
- data/protos/rpc.proto +2 -3
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eafc0ee0da24cde74dd95034c6e2021f30baefd6
|
4
|
+
data.tar.gz: a72505c9ce7e11651bade19e3bd078c10faec624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9ecf0ee0cd599092cf3ea4b1ff46688c3e4ed6551f03f3ec6e3eb37e79e6652f4df027c5e1a41aefb94c498584b2a4553fb5c4d3995b596b0c9c550f8718c39
|
7
|
+
data.tar.gz: d729762ead17bfff76c8d9b287d8b2b06d63d7efe8383b22c0ec439b4b079379ad9713b53b161b6344adcb05341a3c0ed5f8bb79df2565c286596514f79dc311
|
data/README.md
CHANGED
@@ -8,6 +8,11 @@ With AnyCable you can use channels, client-side JS, broadcasting - (almost) all
|
|
8
8
|
|
9
9
|
You can even use ActionCable in development and not be afraid of compatibility issues.
|
10
10
|
|
11
|
+
[Example Application](https://github.com/anycable/anycable_demo)
|
12
|
+
|
13
|
+
<a href="https://evilmartians.com/">
|
14
|
+
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
|
15
|
+
|
11
16
|
## Requirements
|
12
17
|
|
13
18
|
- Ruby ~> 2.3;
|
@@ -16,11 +21,12 @@ You can even use ActionCable in development and not be afraid of compatibility i
|
|
16
21
|
|
17
22
|
## How It Works?
|
18
23
|
|
19
|
-
|
24
|
+
<img src="https://trello-attachments.s3.amazonaws.com/5781e0ed48e4679e302833d3/820x987/5b6a305417b04e20e75f49c5816e027c/Anycable_vs_ActionCable_copy.jpg" width="400" />
|
20
25
|
|
21
26
|
## Compatible WebSocket servers
|
22
27
|
|
23
|
-
|
28
|
+
- [Anycable Go](https://github.com/anycable/anycable-go)
|
29
|
+
- coming soon ...
|
24
30
|
|
25
31
|
|
26
32
|
## Installation
|
@@ -47,7 +53,7 @@ Add `config/anycable.yml`if you want to override defaults (see below):
|
|
47
53
|
|
48
54
|
```yml
|
49
55
|
production:
|
50
|
-
# gRPC server host
|
56
|
+
# gRPC server host
|
51
57
|
rpc_host: "localhost:50051"
|
52
58
|
# Redis URL (for broadcasting)
|
53
59
|
redis_url: "redis://localhost:6379/2"
|
@@ -63,7 +69,7 @@ Anycable uses [anyway_config](https://github.com/palkan/anyway_config), thus it
|
|
63
69
|
Run Anycable server:
|
64
70
|
|
65
71
|
```ruby
|
66
|
-
|
72
|
+
./bin/anycable
|
67
73
|
```
|
68
74
|
|
69
75
|
## ActionCable Compatibility
|
data/lib/anycable/rpc/rpc.rb
CHANGED
@@ -23,9 +23,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
23
23
|
optional :status, :enum, 1, "anycable.Status"
|
24
24
|
optional :disconnect, :bool, 2
|
25
25
|
optional :stop_streams, :bool, 3
|
26
|
-
|
27
|
-
|
28
|
-
repeated :transmissions, :string, 6
|
26
|
+
repeated :streams, :string, 4
|
27
|
+
repeated :transmissions, :string, 5
|
29
28
|
end
|
30
29
|
add_message "anycable.DisconnectRequest" do
|
31
30
|
optional :identifiers, :string, 1
|
data/lib/anycable/rpc_handler.rb
CHANGED
@@ -61,8 +61,7 @@ module Anycable
|
|
61
61
|
status: Anycable::Status::SUCCESS,
|
62
62
|
disconnect: connection.closed?,
|
63
63
|
stop_streams: channel.stop_streams?,
|
64
|
-
|
65
|
-
stream_id: channel.streams.first || '',
|
64
|
+
streams: channel.streams,
|
66
65
|
transmissions: connection.transmissions
|
67
66
|
)
|
68
67
|
end
|
@@ -78,8 +77,7 @@ module Anycable
|
|
78
77
|
Anycable::CommandResponse.new(
|
79
78
|
status: Anycable::Status::SUCCESS,
|
80
79
|
disconnect: false,
|
81
|
-
stop_streams: true
|
82
|
-
stream_from: false
|
80
|
+
stop_streams: true
|
83
81
|
)
|
84
82
|
end
|
85
83
|
|
@@ -97,8 +95,7 @@ module Anycable
|
|
97
95
|
status: Anycable::Status::SUCCESS,
|
98
96
|
disconnect: connection.closed?,
|
99
97
|
stop_streams: channel.stop_streams?,
|
100
|
-
|
101
|
-
stream_id: channel.streams.first || '',
|
98
|
+
streams: channel.streams,
|
102
99
|
transmissions: connection.transmissions
|
103
100
|
)
|
104
101
|
else
|
data/lib/anycable/version.rb
CHANGED
data/protos/rpc.proto
CHANGED
@@ -37,9 +37,8 @@ message CommandResponse {
|
|
37
37
|
Status status = 1;
|
38
38
|
bool disconnect = 2;
|
39
39
|
bool stop_streams = 3;
|
40
|
-
|
41
|
-
string
|
42
|
-
repeated string transmissions = 6;
|
40
|
+
repeated string streams = 4;
|
41
|
+
repeated string transmissions = 5;
|
43
42
|
}
|
44
43
|
|
45
44
|
message DisconnectRequest {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -198,4 +198,3 @@ signing_key:
|
|
198
198
|
specification_version: 4
|
199
199
|
summary: Polyglot replacement for ActionCable server
|
200
200
|
test_files: []
|
201
|
-
has_rdoc:
|