Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Task queuing system over network that is implemented by dRuby. Tasks created by a server are distributed to nodes for calculation.
DRbQS is written as server-client system; a server creates tasks and puts them into Rinda::TupleSpace; nodes for calculation take tasks from Rinda::TupleSpace, calculate them, and return their results to the server.
DRbQS also provides some utilities to define tasks, to execute a server and nodes (over ssh), to transfer files between a server and nodes, to create temporary files and directories, and to test and profile programs of DRbQS.
DRbQS is tested on Ubuntu 11.04 and we can install DRbQS easily on Linux. Note that due to some requirements, DRbQS does not work probably on Windows.
We can install gem of DRbQS.
gem install drbqs
DRbQS uses Fiber, so ruby requires version 1.9. Also, some features of DRbQS does not work on Windows platform due to uses of Kernel#fork. Because SSH is used to execute processes over network, it is desirable that ssh servers on all computers are installed.
DRbQS requires the following gems.
If we want to profile programs for DRbQS then we need to install ruby-prof.
gem install ruby-prof
DRbQS saves configuration files in ~/.drbqs. To create the directory, we type in a terminal
drbqs-manage initialize
A server works as below.
A node works as below.
Execute a server from a file in which the creation of tasks is written.
Specifying a file that defines class of tasks, execute nodes to connect the server.
Send some signals to a server and get some information.
Run processes of a server and a node over ssh.
Execute set of a server and nodes from a file written as DSL, which can be over SSH.
The above examples are in the directory example/simple.
require_relative 'task.rb'
DRbQS.define_server do |server, argv, opts|
task = DRbQS::Task.new(Sum.new(10, 20, 2), :calc) do |srv, result|
puts "Result is #{result}"
end
server.queue.add(task)
end
class Sum
def initialize(a, b, c)
@a = a
@b = b
@c = c
end
def calc
@a + @b + @c
end
end
DIR = File.dirname(__FILE__)
default port: 12345
server :local, "localhost" do |srv|
srv.load File.join(DIR, 'server.rb')
end
node :local do |nd|
nd.load File.join(DIR, 'task.rb')
end
Basic way of execution is how to use the commands drbqs-server and drbqs-node. We move the same directory of server.rb and task.rb in a terminal. To execute a server, we type the command
drbqs-server server.rb
To execute a node, we type the command in another terminal
drbqs-node druby://:13500 -l task.rb
Then, the node connects to the server and calculate a task. When the node send the result of the task, the result of sum is displayed in the terminal of the server.
To run a server and some nodes all together, we uses the command drbqs-execute and a definition file. In the same directory of execute.rb, we type the command
drbqs-execute execute.rb
Then, a server and a node run and their output is saved to files in the directory 'drbqs_execute_log'.
Copyright (c) 2011 Takayuki YAMAGUCHI. See LICENSE.txt for further details.
FAQs
Unknown package
We found that drbqs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.