cuboid 0.2.4.2 → 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/CHANGELOG.md +9 -0
- data/README.md +7 -3
- data/lib/cuboid/application.rb +3 -1
- data/lib/cuboid/rpc/server/instance/peers.rb +37 -0
- data/lib/cuboid/rpc/server/{services/base.rb → instance/service.rb} +2 -4
- data/lib/cuboid/rpc/server/instance.rb +3 -2
- data/lib/version +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16117ddd8bcfeb196beb164a425a2a42643a121ba8b511f5f78ed193b177c858
|
4
|
+
data.tar.gz: 9553e538510f8b9f1262c7d11cac98dffca53e1989d0d2dabc56e201bd555a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3af03cb62af997478c66ae905e43c1a10efc7971833dd12cd8d46e964cdfa7469578d8ed86c02117448a91beff5020a1418872e6d9a117638289c77969331aa
|
7
|
+
data.tar.gz: c16194307cd888377f2a9030de4c7540d1c15bd5458e696f11c3b417f38ca08ed0c956eb6e41d328d4afa5b10bd3652e2e2b6d30990d7136924c6d14e2e82598
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 0.2.6
|
2
|
+
|
3
|
+
* `Application.serializer` now defaults to JSON for REST API compatibility.
|
4
|
+
|
5
|
+
# 0.2.5
|
6
|
+
|
7
|
+
* `RPC::Server::Services::Base` => `RPC::Server::Instance::Service`
|
8
|
+
* Added `RPC::Server::Instance::Peers` as a helper to iterate over peer `Instances`.
|
9
|
+
|
1
10
|
# 0.2.4.2
|
2
11
|
|
3
12
|
* 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) --
|
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
|
|
data/lib/cuboid/application.rb
CHANGED
@@ -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
|
@@ -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/
|
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::
|
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.
|
1
|
+
0.2.6
|
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
|
+
version: 0.2.6
|
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-
|
11
|
+
date: 2023-05-26 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
|