peplum 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/peplum/application.rb +2 -4
- data/lib/peplum/version.rb +1 -1
- data/peplum.gemspec +2 -2
- metadata +3 -4
- data/lib/peplum/application/peers.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0d34847050f1b631cdfdaf01ae41c3632273028a8ab3267519835acb145715f
|
4
|
+
data.tar.gz: 46d816f38aeedf4179aad4a9d77e010e8130bcc8380bf917ce07d5c25208ddc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67cd3f03757fb68dcf605f0899206227afdf8f4be8910f6e3de9c7721bb7e18cb5cdcd42926ebc19acfbe7bce2578be4f4925aca70da85b092997153ca2d2289
|
7
|
+
data.tar.gz: 5fff1d63e60225c540547ed3306f0b8da19ad716773b493f7676059886c52a2e65c82c2f926e0cbddb1455401ac281f9ede9bf30145143de20005be322e28c4e
|
data/lib/peplum/application.rb
CHANGED
@@ -5,8 +5,6 @@ require 'peplum/core_ext/array'
|
|
5
5
|
|
6
6
|
module Peplum
|
7
7
|
class Application < Cuboid::Application
|
8
|
-
require 'peplum/application/peers'
|
9
|
-
|
10
8
|
require 'peplum/application/services/shared_hash'
|
11
9
|
require 'peplum/application/services/scheduler'
|
12
10
|
|
@@ -31,7 +29,7 @@ module Peplum
|
|
31
29
|
def initialize(*)
|
32
30
|
super
|
33
31
|
|
34
|
-
@peers = Peers.new
|
32
|
+
@peers = Cuboid::RPC::Server::Instance::Peers.new
|
35
33
|
end
|
36
34
|
|
37
35
|
def run
|
@@ -121,7 +119,7 @@ module Peplum
|
|
121
119
|
objects: groups.pop,
|
122
120
|
peers: peers,
|
123
121
|
master: {
|
124
|
-
url:
|
122
|
+
url: Cuboid::Options.rpc.url,
|
125
123
|
token: Cuboid::Options.datastore.token
|
126
124
|
}
|
127
125
|
},
|
data/lib/peplum/version.rb
CHANGED
data/peplum.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Tasos Laskos"]
|
9
9
|
spec.email = ["tasos.laskos@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = "Distributed computing made easy."
|
12
|
-
spec.description = "Distributed computing made easy."
|
11
|
+
spec.summary = "Distributed parallel computing made easy."
|
12
|
+
spec.description = "Distributed parallel computing made easy."
|
13
13
|
spec.homepage = "http://ecsypno.com/"
|
14
14
|
spec.required_ruby_version = ">= 2.6.0"
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peplum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tasos Laskos
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: Distributed computing made easy.
|
27
|
+
description: Distributed parallel computing made easy.
|
28
28
|
email:
|
29
29
|
- tasos.laskos@gmail.com
|
30
30
|
executables: []
|
@@ -34,7 +34,6 @@ files:
|
|
34
34
|
- bin/.gitkeep
|
35
35
|
- lib/peplum.rb
|
36
36
|
- lib/peplum/application.rb
|
37
|
-
- lib/peplum/application/peers.rb
|
38
37
|
- lib/peplum/application/services/scheduler.rb
|
39
38
|
- lib/peplum/application/services/shared_hash.rb
|
40
39
|
- lib/peplum/core_ext/array.rb
|
@@ -61,5 +60,5 @@ requirements: []
|
|
61
60
|
rubygems_version: 3.4.13
|
62
61
|
signing_key:
|
63
62
|
specification_version: 4
|
64
|
-
summary: Distributed computing made easy.
|
63
|
+
summary: Distributed parallel computing made easy.
|
65
64
|
test_files: []
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Peplum
|
2
|
-
class Application
|
3
|
-
|
4
|
-
class Peers
|
5
|
-
include Enumerable
|
6
|
-
|
7
|
-
def initialize
|
8
|
-
@peers = {}
|
9
|
-
end
|
10
|
-
|
11
|
-
def set( peer_info )
|
12
|
-
peer_info.each do |url, token|
|
13
|
-
next if url == self.self_url
|
14
|
-
@peers[url] = Peplum::Application.connect( url: url, token: token )
|
15
|
-
end
|
16
|
-
|
17
|
-
nil
|
18
|
-
end
|
19
|
-
|
20
|
-
def each( &block )
|
21
|
-
@peers.each do |_, client|
|
22
|
-
block.call client
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def self_url
|
27
|
-
Cuboid::Options.rpc.url
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|