omq 0.6.4 → 0.6.5
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
- data/CHANGELOG.md +6 -0
- data/README.md +17 -17
- data/lib/omq/cli/base_runner.rb +1 -1
- data/lib/omq/cli/pipe.rb +1 -1
- data/lib/omq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 94402697e206444e39655869c1382cea2a2839732d373d6cbcc237dcb125cd44
|
|
4
|
+
data.tar.gz: dbcaa10eb1213e935325d0290611716552d28394dd479d8fc79564a0af6f0e4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a4b4eab9767b52f874bf85816589558bf42e9730da827220490e80ca9dd499ae5ae604c06022d3db07402042a1b52ea1c88737e2c1556b4d78af90391dc1d2f
|
|
7
|
+
data.tar.gz: e2db5e6aaea16af48024be90af8353a81f4d77a4b0b1973131f74dbd915b9aaf52fdd06d08cc57749ffb74b6bd70214ffb2ab04063925887c8a1b72afd4582cb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -107,18 +107,18 @@ end
|
|
|
107
107
|
|
|
108
108
|
## Socket Types
|
|
109
109
|
|
|
110
|
-
| Pattern | Classes | Direction |
|
|
111
|
-
|
|
112
|
-
| Request/Reply | `REQ`, `REP` | bidirectional |
|
|
113
|
-
| Publish/Subscribe | `PUB`, `SUB`, `XPUB`, `XSUB` | unidirectional |
|
|
114
|
-
| Pipeline | `PUSH`, `PULL` | unidirectional |
|
|
115
|
-
| Routing | `DEALER`, `ROUTER` | bidirectional |
|
|
116
|
-
| Exclusive pair | `PAIR` | bidirectional |
|
|
117
|
-
| Client/Server | `CLIENT`, `SERVER` | bidirectional |
|
|
118
|
-
| Group messaging | `RADIO`, `DISH` | unidirectional |
|
|
119
|
-
| Pipeline (draft) | `SCATTER`, `GATHER` | unidirectional |
|
|
120
|
-
| Peer-to-peer | `PEER` | bidirectional |
|
|
121
|
-
| Channel (draft) | `CHANNEL` | bidirectional |
|
|
110
|
+
| Pattern | Classes | Direction | Multipart |
|
|
111
|
+
|---------|---------|-----------|-----------|
|
|
112
|
+
| Request/Reply | `REQ`, `REP` | bidirectional | yes |
|
|
113
|
+
| Publish/Subscribe | `PUB`, `SUB`, `XPUB`, `XSUB` | unidirectional | yes |
|
|
114
|
+
| Pipeline | `PUSH`, `PULL` | unidirectional | yes |
|
|
115
|
+
| Routing | `DEALER`, `ROUTER` | bidirectional | yes |
|
|
116
|
+
| Exclusive pair | `PAIR` | bidirectional | yes |
|
|
117
|
+
| Client/Server | `CLIENT`, `SERVER` | bidirectional | no |
|
|
118
|
+
| Group messaging | `RADIO`, `DISH` | unidirectional | no |
|
|
119
|
+
| Pipeline (draft) | `SCATTER`, `GATHER` | unidirectional | no |
|
|
120
|
+
| Peer-to-peer | `PEER` | bidirectional | no |
|
|
121
|
+
| Channel (draft) | `CHANNEL` | bidirectional | no |
|
|
122
122
|
|
|
123
123
|
All classes live under `OMQ::`. For the purists, `ØMQ` is an alias:
|
|
124
124
|
|
|
@@ -163,16 +163,16 @@ echo "hello" | omq req -c tcp://localhost:5555
|
|
|
163
163
|
omq sub -b tcp://:5556 -s "weather." &
|
|
164
164
|
echo "weather.nyc 72F" | omq pub -c tcp://localhost:5556 -d 0.3
|
|
165
165
|
|
|
166
|
-
# Pipeline with filtering
|
|
166
|
+
# Pipeline with filtering ($F = message parts, $_ = first part)
|
|
167
|
+
# /regexp/ matches against $_, next skips, break stops
|
|
167
168
|
tail -f /var/log/syslog | omq push -c tcp://collector:5557
|
|
168
|
-
omq pull -b tcp://:5557 -e '
|
|
169
|
+
omq pull -b tcp://:5557 -e 'next unless /error/; $F'
|
|
169
170
|
|
|
170
171
|
# Pipe: PULL → eval → PUSH in one process
|
|
171
172
|
omq pipe -c ipc://@work -c ipc://@sink -e '$F.map(&:upcase)'
|
|
172
173
|
|
|
173
|
-
# Pipe with
|
|
174
|
-
omq pipe -c ipc://@work -c ipc://@sink -P
|
|
175
|
-
-r ./fib.rb -e 'fib(Integer($_)).to_s'
|
|
174
|
+
# Pipe with Ractor workers for CPU parallelism (-P = all CPUs)
|
|
175
|
+
omq pipe -c ipc://@work -c ipc://@sink -P -r./fib -e 'fib(Integer($_)).to_s'
|
|
176
176
|
|
|
177
177
|
# Exit when all peers disconnect (pipeline workers, sinks)
|
|
178
178
|
omq pipe -c ipc://@work -c ipc://@sink --transient -e '$F'
|
data/lib/omq/cli/base_runner.rb
CHANGED
data/lib/omq/cli/pipe.rb
CHANGED
data/lib/omq/version.rb
CHANGED