start_her 0.0.3 → 0.0.4
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 +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +23 -1
- data/lib/start_her/redis_client.rb +1 -3
- data/lib/start_her/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a12e176cfeb39e6fb11f3a0f07650f6bf449a217
|
4
|
+
data.tar.gz: 0e4bddf2e2bb7abc37199fccf663fe99f617aca1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d8e16a6a01f0d216a65949f01972bb8daa0a1862800e01c7beb384b84d994945ee28106a0a1ad7d26435100146e7f310a1230619586155054be4f0e467898dc
|
7
|
+
data.tar.gz: 91898997d8c206598fa041e6218e74605a9b9ade3f22538aa34ff86157f6015b02dc3bc27d0a351941d7572122277bb727da96959c5ea374f5acbe0fb3c70a78
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,25 @@
|
|
2
2
|
|
3
3
|
# StartHer
|
4
4
|
|
5
|
-
|
5
|
+
This gem provides the basic components required for each application involved in a microservice architecture.
|
6
|
+
|
7
|
+
It is based on Redis PubSub (slighlty improved).
|
8
|
+
|
9
|
+
Microservices components:
|
10
|
+
- Publish message to a channel (with reliable support)
|
11
|
+
- Subscribe to a channel
|
12
|
+
- Automatic connection retry for Publish and Subscribe
|
13
|
+
- Comes with a logger, Logstash, which can be re-used in the parent project
|
14
|
+
- Microservices version discovery:
|
15
|
+
|
16
|
+
When starting the subscriber it subscribes to channel `hb_ping` (by default).
|
17
|
+
|
18
|
+
If it receives a `request` (ie a ping request) it replies on channel `hb_pong` with the following data (by default):
|
19
|
+
- service name
|
20
|
+
- version
|
21
|
+
- microservice id (hostname,... not defined yet)
|
22
|
+
- original `request`
|
23
|
+
|
6
24
|
|
7
25
|
## Requirements
|
8
26
|
|
@@ -155,6 +173,10 @@ describe Subscriber do
|
|
155
173
|
end
|
156
174
|
```
|
157
175
|
|
176
|
+
## TODO
|
177
|
+
- Create an option wich enables a subscriber to receive the same message only once (avoid message replay due to reliable push)
|
178
|
+
- Implement scafolding for create a new project (like a gem) or for initialize a new Rails project
|
179
|
+
|
158
180
|
## LICENSE
|
159
181
|
|
160
182
|
MIT
|
@@ -6,8 +6,6 @@ module StartHer
|
|
6
6
|
module RedisClient
|
7
7
|
include StartHer::RetryPolicies
|
8
8
|
|
9
|
-
MQ_DEFAULTS = StartHer.config.redis
|
10
|
-
|
11
9
|
private
|
12
10
|
|
13
11
|
def client(options = {})
|
@@ -22,7 +20,7 @@ module StartHer
|
|
22
20
|
end
|
23
21
|
|
24
22
|
def client_opts(options)
|
25
|
-
|
23
|
+
StartHer.config.redis.merge(options).dup.tap do |opts|
|
26
24
|
if opts[:network_timeout]
|
27
25
|
opts[:timeout] = opts[:network_timeout]
|
28
26
|
opts.delete(:network_timeout)
|
data/lib/start_her/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: start_her
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- abourquin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|