ifuture 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -8
- data/ifuture.gemspec +4 -7
- data/lib/ifuture/version.rb +1 -1
- metadata +11 -32
- checksums.yaml.gz.sig +0 -1
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 946e1245c8cb89d65297ee5cbef0f93032a33d19
|
4
|
+
data.tar.gz: 80e16960e46696fa06b0b7ba1466174f13ba135c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5039914e0b78eeae732930f024c0f41d4c4119ba713d4418f893c034dacf3c837cf7e8d1e7cc4cf119fdab686d4666fe5a232f19a737a0c3adf3db4bb066a6
|
7
|
+
data.tar.gz: eb87345eb4f01c11cb50d2393e0e5f85c18bff397975dfc29730ee0e423afa8ba0195643413893884a5c7f5a1f78163aec70459d58a8a308f783710e528eccf0
|
data/README.md
CHANGED
@@ -2,13 +2,23 @@
|
|
2
2
|
[![Build Status](https://secure.travis-ci.org/Havenwood/ifuture.png?branch=master)](http://travis-ci.org/havenwood/ifuture)
|
3
3
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/Havenwood/ifuture)
|
4
4
|
|
5
|
-
Futures for Ruby implemented with [IChannel](https://github.com/robgleeson/ichannel) for interprocess communication
|
5
|
+
A Futures gem for Ruby implemented with [IChannel](https://github.com/robgleeson/ichannel) for interprocess communication over a unix socket or Redis. Run some code in another process and get the result back later!
|
6
6
|
|
7
7
|
The Future starts running right away, but isn't blocking because it runs in its own fork and uses IChannel to communicate with the parent Process. This allows multithreading without the GIL blocking as it would with Futures implemented on Threads. If the value is asked for and it is ready, it will be returned right away. If the value is asked for early, the Future blocks until delivery.
|
8
8
|
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
`gem install ifuture`
|
12
|
+
|
13
|
+
The Redis gem is required as well if you opt to use Redis instead of the default unix socket transporter.
|
14
|
+
|
15
|
+
`gem install redis`
|
16
|
+
|
9
17
|
## Usage
|
10
18
|
|
11
19
|
```ruby
|
20
|
+
require 'ifuture'
|
21
|
+
|
12
22
|
future = IFuture.new do
|
13
23
|
3.downto 0 do |n|
|
14
24
|
sleep 1
|
@@ -35,11 +45,12 @@ future.ready?
|
|
35
45
|
future.value
|
36
46
|
#=> "Sekret!!"
|
37
47
|
```
|
38
|
-
###
|
48
|
+
### Code Serialization Format
|
39
49
|
|
40
50
|
The default serialization format is Marshal, but you can use JSON, YAML or other formats that implement the methods #load and #dump.
|
41
51
|
|
42
52
|
```ruby
|
53
|
+
require 'ifuture'
|
43
54
|
require 'json'
|
44
55
|
|
45
56
|
future = IFuture.new JSON do
|
@@ -48,21 +59,19 @@ future = IFuture.new JSON do
|
|
48
59
|
end
|
49
60
|
```
|
50
61
|
|
51
|
-
###
|
62
|
+
### IPC Transporter
|
52
63
|
|
53
|
-
By default iFuture uses
|
64
|
+
By default iFuture uses IChannel with unix sockets for transferring serialized code. An alternate choice is to use IChannel with Redis, locally or over the network.
|
54
65
|
|
55
66
|
```ruby
|
67
|
+
require 'ifuture'
|
68
|
+
|
56
69
|
future = IFuture.new(Marshal, :redis, {host: 'localhost', key: 'readme'}) do
|
57
70
|
sleep 5
|
58
71
|
:over_the_wire
|
59
72
|
end
|
60
73
|
```
|
61
74
|
|
62
|
-
## Installation
|
63
|
-
|
64
|
-
`gem install ifuture`
|
65
|
-
|
66
75
|
## Contributing
|
67
76
|
|
68
77
|
1. Fork it
|
data/ifuture.gemspec
CHANGED
@@ -10,17 +10,14 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ['shannonskipper@gmail.com']
|
11
11
|
gem.description = %q{Concurrent Futures with Processes}
|
12
12
|
gem.summary = %q{Futures implemented on top of IChannel for interprocess communication.}
|
13
|
-
gem.homepage = 'https://github.com/
|
14
|
-
|
13
|
+
gem.homepage = 'https://github.com/havenwood#readme'
|
14
|
+
gem.license = 'MIT'
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.require_paths = ['lib']
|
17
17
|
|
18
|
-
gem.add_development_dependency 'ichannel', '~>
|
18
|
+
gem.add_development_dependency 'ichannel', '~> 7.1.0'
|
19
19
|
gem.add_development_dependency 'minitest'
|
20
20
|
gem.add_development_dependency 'rake'
|
21
21
|
|
22
|
-
gem.add_runtime_dependency 'ichannel', '~>
|
23
|
-
|
24
|
-
gem.signing_key = '/Users/shannonskipper/.gem/private/gem-private_key.pem'
|
25
|
-
gem.cert_chain = ['/Users/shannonskipper/.gem/private/gem-public_cert.pem']
|
22
|
+
gem.add_runtime_dependency 'ichannel', '~> 7.1.0'
|
26
23
|
end
|
data/lib/ifuture/version.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ifuture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shannon Skipper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDijCCAnKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRcwFQYDVQQDDA5zaGFu
|
14
|
-
bm9uc2tpcHBlcjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQB
|
15
|
-
GRYDY29tMB4XDTEzMDIwMjIyMjQ1MFoXDTE0MDIwMjIyMjQ1MFowRTEXMBUGA1UE
|
16
|
-
AwwOc2hhbm5vbnNraXBwZXIxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmS
|
17
|
-
JomT8ixkARkWA2NvbTC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|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2013-05-18 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-10 00:00:00.000000000 Z
|
34
12
|
dependencies:
|
35
13
|
- !ruby/object:Gem::Dependency
|
36
14
|
name: ichannel
|
@@ -38,14 +16,14 @@ dependencies:
|
|
38
16
|
requirements:
|
39
17
|
- - ~>
|
40
18
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
19
|
+
version: 7.1.0
|
42
20
|
type: :development
|
43
21
|
prerelease: false
|
44
22
|
version_requirements: !ruby/object:Gem::Requirement
|
45
23
|
requirements:
|
46
24
|
- - ~>
|
47
25
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
26
|
+
version: 7.1.0
|
49
27
|
- !ruby/object:Gem::Dependency
|
50
28
|
name: minitest
|
51
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,14 +58,14 @@ dependencies:
|
|
80
58
|
requirements:
|
81
59
|
- - ~>
|
82
60
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
61
|
+
version: 7.1.0
|
84
62
|
type: :runtime
|
85
63
|
prerelease: false
|
86
64
|
version_requirements: !ruby/object:Gem::Requirement
|
87
65
|
requirements:
|
88
66
|
- - ~>
|
89
67
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
68
|
+
version: 7.1.0
|
91
69
|
description: Concurrent Futures with Processes
|
92
70
|
email:
|
93
71
|
- shannonskipper@gmail.com
|
@@ -106,8 +84,9 @@ files:
|
|
106
84
|
- lib/ifuture/version.rb
|
107
85
|
- test/helper.rb
|
108
86
|
- test/ifuture_test.rb
|
109
|
-
homepage: https://github.com/
|
110
|
-
licenses:
|
87
|
+
homepage: https://github.com/havenwood#readme
|
88
|
+
licenses:
|
89
|
+
- MIT
|
111
90
|
metadata: {}
|
112
91
|
post_install_message:
|
113
92
|
rdoc_options: []
|
@@ -125,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
104
|
version: '0'
|
126
105
|
requirements: []
|
127
106
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.0.
|
107
|
+
rubygems_version: 2.0.6
|
129
108
|
signing_key:
|
130
109
|
specification_version: 4
|
131
110
|
summary: Futures implemented on top of IChannel for interprocess communication.
|
checksums.yaml.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1s��g�;WۑP�؛b���-�}@�˳?<� ����jـ�hex]ߥ���
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
Binary file
|