splitclient-rb 5.0.0.pre.rc1-java → 5.0.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.txt +3 -0
- data/Detailed-README.md +23 -10
- data/NEWS +5 -0
- data/README.md +1 -0
- data/lib/splitclient-rb/split_factory.rb +4 -0
- data/lib/splitclient-rb/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9232effcd6b1545b1c23ad03ed0d97b7c717608
|
4
|
+
data.tar.gz: 6526f3c53265a80c3d7173e768c10d6287bab3a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fb800eb1d7556fbbcd071a0f01a70eab592112a329b5f1da22565bea3f32d59d39d7559e4c66fc94a5cc4a1ddc176f6ae59d37a472ab7e78dadcbfefdd53935
|
7
|
+
data.tar.gz: a42f0cbc272710264487a0b270f0d4619ab813526c361430259850c9d89ae7206467831f793c9f3253d6bcf8aee1d3e02239c4d54069e35c267889d798d04cb2
|
data/CHANGES.txt
CHANGED
data/Detailed-README.md
CHANGED
@@ -447,8 +447,11 @@ Other servers should work fine as well, but haven't been tested.
|
|
447
447
|
|
448
448
|
### Unicorn and Puma in cluster mode (only for "memory mode")
|
449
449
|
|
450
|
-
During the start of your application SDK spawns multiple threads
|
451
|
-
|
450
|
+
During the start of your application, the SDK spawns multiple threads. Each thread has an infinite loop inside,
|
451
|
+
which is used to fetch splits/segments or send impressions/metrics to the Split service continuously.
|
452
|
+
When using Unicorn or Puma in cluster mode (i.e. with `workers` > 0) the application
|
453
|
+
server will spawn multiple child processes, but they won't recreate the threads that existed in the parent process.
|
454
|
+
So, if your application is running in Unicorn or Puma in cluster mode you need to make two small extra steps.
|
452
455
|
|
453
456
|
For both servers you will need to have the following line in your `config/initializers/splitclient.rb`:
|
454
457
|
|
@@ -458,27 +461,37 @@ Rails.configuration.split_factory = factory
|
|
458
461
|
|
459
462
|
#### Unicorn
|
460
463
|
|
461
|
-
If you
|
464
|
+
If you’re using Unicorn you’ll need to include these lines in your Unicorn config (likely `config/unicorn.rb`):
|
462
465
|
|
463
466
|
```ruby
|
467
|
+
before_fork do |server, worker|
|
468
|
+
# keep your existing before_fork code if any
|
469
|
+
Rails.configuration.split_factory.stop!
|
470
|
+
end
|
471
|
+
|
464
472
|
after_fork do |server, worker|
|
465
|
-
|
473
|
+
# keep your existing after_fork code if any
|
474
|
+
Rails.configuration.split_factory.resume!
|
466
475
|
end
|
467
476
|
```
|
468
477
|
|
469
|
-
By doing that SDK will recreate threads for each new worker, besides master.
|
470
|
-
|
471
478
|
#### Puma
|
472
479
|
|
473
|
-
|
480
|
+
If using Puma in cluster mode, add these lines to your Puma config (likely `config/puma.rb`):
|
474
481
|
|
475
482
|
```ruby
|
476
|
-
|
477
|
-
|
483
|
+
before_fork do
|
484
|
+
# keep your existing before_fork code if any
|
485
|
+
Rails.configuration.split_factory.stop!
|
486
|
+
end
|
487
|
+
|
488
|
+
on_worker_boot do
|
489
|
+
# keep your existing on_worker_boot code if any
|
490
|
+
Rails.configuration.split_factory.resume!
|
478
491
|
end
|
479
492
|
```
|
480
493
|
|
481
|
-
By doing
|
494
|
+
By doing the above, the SDK will recreate the threads for each new worker and prevent the master process (that doesn't handle requests) from needlessly querying the Split service.
|
482
495
|
|
483
496
|
## Proxy support
|
484
497
|
|
data/NEWS
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
5.0.1
|
2
|
+
|
3
|
+
Adding stop! method to the factory.
|
4
|
+
With this method the user will be able to stop the threads that queries the Split Service. This will be used in the before_fork configuration in Puma and Unicorn to stop the threads in the master process.
|
5
|
+
|
1
6
|
5.0.0
|
2
7
|
|
3
8
|
This is a breaking change in how users buckets are allocated.
|
data/README.md
CHANGED
@@ -31,6 +31,7 @@ Split has built and maintains a SDKs for:
|
|
31
31
|
* Python [Github](https://github.com/splitio/python-client) [Docs](http://docs.split.io/docs/python-sdk-overview)
|
32
32
|
* GO [Github](https://github.com/splitio/go-client) [Docs](http://docs.split.io/docs/go-sdk-overview)
|
33
33
|
* Android [Github](https://github.com/splitio/android-client) [Docs](https://docs.split.io/v1/docs/android-sdk-overview)
|
34
|
+
* IOS [Github](https://github.com/splitio/ios-client) [Docs](https://docs.split.io/v1/docs/ios-sdk-overview)
|
34
35
|
|
35
36
|
For a comprehensive list of opensource projects visit our [Github page](https://github.com/splitio?utf8=%E2%9C%93&query=%20only%3Apublic%20).
|
36
37
|
|
@@ -30,6 +30,10 @@ module SplitIoClient
|
|
30
30
|
SplitAdapter.new(@api_key, @config, @splits_repository, @segments_repository, @impressions_repository, @metrics_repository, @events_repository, @sdk_blocker)
|
31
31
|
end
|
32
32
|
|
33
|
+
def stop!
|
34
|
+
@config.threads.each { |_, t| t.exit }
|
35
|
+
end
|
36
|
+
|
33
37
|
alias resume! start!
|
34
38
|
end
|
35
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splitclient-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Split Software
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -309,12 +309,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
309
309
|
version: '0'
|
310
310
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
311
311
|
requirements:
|
312
|
-
- - "
|
312
|
+
- - ">="
|
313
313
|
- !ruby/object:Gem::Version
|
314
|
-
version:
|
314
|
+
version: '0'
|
315
315
|
requirements: []
|
316
316
|
rubyforge_project:
|
317
|
-
rubygems_version: 2.6.14
|
317
|
+
rubygems_version: 2.6.14
|
318
318
|
signing_key:
|
319
319
|
specification_version: 4
|
320
320
|
summary: Ruby client for split SDK.
|