cuboid 0.2.4.2 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1591d4ea28efb0163566ff380d5cb5bd66c6fdb161e70faee67b2fdeda12fc4
4
- data.tar.gz: 6aba361e06c053f03ae86bca93b322afef249740376fe328710f75fbc7889cb5
3
+ metadata.gz: d3b544e8f6eb34d19ba08d26c263435e34321ab174d86ce09da67b4b9651924d
4
+ data.tar.gz: eb9be57eccb9429514f04c66f36337669a9865d2f634d118eabe38d853ad5980
5
5
  SHA512:
6
- metadata.gz: 404d0460e9de33909a3a8c6504e8ed5744ec363ab4e1b4304304b75455037e7a1002129f8c0a0551c7c6fba8bd250f9d5207dc8df93063cc6d3db231ca0bb477
7
- data.tar.gz: 588642b0dc6ec0f2aff03bde48b6161db0652585d8463536c640fdf864d217998a24016f2dbf3b90c87c1eead7767a890ee487eace72ca57518331d362552f33
6
+ metadata.gz: ab705216690f6891f9530f1252ea6d782208f9707d4b1d6d6e75435489c6c1d6927f699662810f7daffc5dd726ecd0cef00817e4e11b75660699ac7886ab66ee
7
+ data.tar.gz: 134eaeefd0742c2de4cf22cbe9c7f805d5efb752a9194f737b393b51e1f4354241c2704de27a328fa45b37883c91182134964f495f4038c82e1cd0e89f3b052f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.2.5
2
+
3
+ * `RPC::Server::Services::Base` => `RPC::Server::Instance::Service`
4
+ * Added `RPC::Server::Instance::Peers` as a helper to iterate over peer `Instances`.
5
+
1
6
  # 0.2.4.2
2
7
 
3
8
  * Instance RPC services now decorated with `Server::Services::Base`.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Cuboid Framework -- a decentralized distributed framework in Ruby.
1
+ # Cuboid Framework -- a decentralized & distributed computing framework in Ruby.
2
2
 
3
3
  ## Summary
4
4
 
@@ -8,6 +8,9 @@ distributed applications in Ruby.
8
8
  In hipper terms, you can very easily setup your own specialized _Cloud_ or
9
9
  _Cloud_ within a _Cloud_.
10
10
 
11
+ In older-fashioned terms you can build load-balanced, on-demand, clustered applications and even super-computers --
12
+ see [Peplum](https://github.com/peplum/).
13
+
11
14
  It offers:
12
15
 
13
16
  * Load-balancing of _**Instances**_ via a network (_**Grid**_) of _**Agents**_.
@@ -262,8 +265,9 @@ _You can replace `host1` with `localhost` and run all examples on the same machi
262
265
 
263
266
  ## Users
264
267
 
265
- * [QMap](https://github.com/qadron/qmap) -- A distributed network mapper/security scanner.
266
- * [Peplum](https://github.com/peplum/peplum) -- A cluster/supercomputer builder.
268
+ * [QMap](https://github.com/qadron/qmap) -- A distributed network mapper/security scanner powered by [nmap](http://nmap.org/).
269
+ * [Peplum](https://github.com/peplum/peplum) -- A distributed parallel processing solution -- allows you to build Beowulf
270
+ (or otherwise) clusters and even super-computers.
267
271
 
268
272
  ## License
269
273
 
@@ -0,0 +1,37 @@
1
+ module Cuboid
2
+ module RPC
3
+ class Server
4
+ class Instance
5
+
6
+ class Peers
7
+ include Enumerable
8
+
9
+ def initialize
10
+ @peers = {}
11
+ end
12
+
13
+ def set( peer_info )
14
+ peer_info.each do |url, token|
15
+ next if url == self.self_url
16
+ @peers[url] = Cuboid::Application.application.connect( url: url, token: token )
17
+ end
18
+
19
+ nil
20
+ end
21
+
22
+ def each( &block )
23
+ @peers.each do |_, client|
24
+ block.call client
25
+ end
26
+ end
27
+
28
+ def self_url
29
+ Cuboid::Options.rpc.url
30
+ end
31
+
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,9 +1,8 @@
1
1
  module Cuboid
2
2
  module RPC
3
3
  class Server
4
- module Services
5
-
6
- module Base
4
+ class Instance
5
+ module Service
7
6
 
8
7
  attr_reader :name
9
8
  attr_reader :instance
@@ -18,5 +17,4 @@ end
18
17
  end
19
18
  end
20
19
  end
21
-
22
20
  end
@@ -12,7 +12,8 @@ require lib + 'rpc/server/active_options'
12
12
  require lib + 'rpc/server/output'
13
13
  require lib + 'rpc/server/application_wrapper'
14
14
 
15
- require lib + 'rpc/server/services/base'
15
+ require lib + 'rpc/server/instance/service'
16
+ require lib + 'rpc/server/instance/peers'
16
17
 
17
18
  module RPC
18
19
  class Server
@@ -334,7 +335,7 @@ class Instance
334
335
  server.add_handler( 'options', @active_options )
335
336
 
336
337
  Cuboid::Application.application.instance_services.each do |name, service|
337
- service.include Server::Services::Base
338
+ service.include Server::Instance::Service
338
339
  si = service.new( name, self )
339
340
 
340
341
  Cuboid::Application.application.send :attr_reader, name
data/lib/version CHANGED
@@ -1 +1 @@
1
- 0.2.4.2
1
+ 0.2.5
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuboid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.2
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tasos Laskos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-23 00:00:00.000000000 Z
11
+ date: 2023-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -296,9 +296,10 @@ files:
296
296
  - lib/cuboid/rpc/server/application_wrapper.rb
297
297
  - lib/cuboid/rpc/server/base.rb
298
298
  - lib/cuboid/rpc/server/instance.rb
299
+ - lib/cuboid/rpc/server/instance/peers.rb
300
+ - lib/cuboid/rpc/server/instance/service.rb
299
301
  - lib/cuboid/rpc/server/output.rb
300
302
  - lib/cuboid/rpc/server/scheduler.rb
301
- - lib/cuboid/rpc/server/services/base.rb
302
303
  - lib/cuboid/ruby.rb
303
304
  - lib/cuboid/ruby/array.rb
304
305
  - lib/cuboid/ruby/hash.rb