Questions tagged [drb]

dRuby (drb) is a distributed object system for Ruby.

dRuby (drb) is a distributed object system for Ruby.

It is written in pure Ruby and uses its own protocol. No add-in services are needed beyond those provided by the Ruby runtime, such as TCP sockets. It does not rely on or interoperate with other distributed object systems such as CORBA, RMI, or .NET.

35 questions
7
votes
3 answers

Drb and "is recycled object" exception

I'm running in a strange issue. My controller calls a drb object @request_handler = DRbObject.new(nil, url) availability_result = @request_handler.fetch_availability(request, @reservation_search, params[:selected_room_rates]) and this Drb object…
Roberto
  • 1,410
  • 1
  • 14
  • 32
6
votes
2 answers

Stopping a Distributed Ruby Service

I have a script that starts up a DRb service, before spawning a handler object and waiting via DRb.thread.join. I would like the script to run until explicitly killed, so I added trap "INT" do DRb.stop_service end which successfully stops the…
kfb
  • 5,342
  • 6
  • 32
  • 46
6
votes
2 answers

Should I be using Rails or Ruby for this website application? How?

I'm very new to web programming (or actually, very old to it, since the last time I messed with the web was HTML 1.1), but now need to deploy a web application quickly. It seems like every time I turn around, there's new acronyms and technologies…
mmr
  • 14,271
  • 28
  • 89
  • 142
5
votes
2 answers

Creating remote Drb server (for use with pry-remote)

I've been really enjoying developing Ruby applications with Pry. I've also seen a Pry plugin called pry-remote which lets you set up a Drb server for remote access to a Pry session. The pry-remote synopsis in the README makes sense and I have no…
user94154
  • 15,244
  • 19
  • 74
  • 113
4
votes
2 answers

How reliable is DRb?

Are there any issues to consider when using DRb for implementing an in-memory message queue and for synchronizing actions between processes? I heard that it could be unreliable, but haven't found anything on the web that confirms this assertion. …
readonly
  • 306,152
  • 101
  • 198
  • 201
4
votes
1 answer

Ruby DRbObject and overriding send

I had a funny situation today (simplified): Ive a communication object of type Adapter, with a #send and a #receive method. My application communicates with it by DRb. So in my application, I have a DRbObject, lets say foo. Now, calling…
SirLenz0rlot
  • 1,933
  • 3
  • 33
  • 48
3
votes
1 answer

QtRuby with DRb or EventMachine

I would like to write an application in Ruby using Qt which will communicate over the network with other instances. How can I integrate Qt's event loop with DRb or EventMachine? EDIT: I found the answer when I will have more time I will post it
denysonique
  • 14,089
  • 6
  • 34
  • 39
3
votes
1 answer

DRb::DRbServerNotFound passing Sinatra params

I have a Sinatra application and DRb server object paired. When I try to pass the Sinatra params hash to a method on my server object I get DRb::DRbConnError … DRb::DRbServerNotFound, yet the same method works when I pass a simple hash directly.…
Phrogz
  • 271,922
  • 98
  • 616
  • 693
3
votes
2 answers

is_a? and dRuby objects

I'm working with dRuby and basicly I'm calling a remote method that returns me an object. In the clientside I have this code: handle_error(response) if response.is_a?(Error) where response is the DRbObject. (I've developed this code before using…
Roberto
  • 1,410
  • 1
  • 14
  • 32
2
votes
1 answer

DRb, "who called me" method

In a DRbserver, how can I see who called a method? I want to log the ip and port from anyone who calls a certain method. something like def who uri = puts uri end Is this functionality available in DRb? Thanks.
pvinis
  • 3,855
  • 5
  • 33
  • 55
2
votes
2 answers

RSpec fails to run --bisect, with error: undefined method `run' for #

I am currently in the process of upgrading a fairly large Rails application from Rails 3 --> Rails 4 (or maybe 5). I am currently at a point where I have a Rails v4.0.13 application, running on Ruby v2.1.5. The test suite is running on RSpec v3.5.2,…
Tom Lord
  • 22,829
  • 4
  • 43
  • 67
2
votes
1 answer

Where is the correct place to initialize the DRb service within a Rails application?

I'm using DRb within a Rails application to offload an expensive task outside the Rails process. Before initializing the client stub with DRbObject.new it is necessary to initialize the DRb service with DRb.start_service. Doing this in model or…
Max Caceres
  • 1,956
  • 3
  • 18
  • 17
1
vote
1 answer

DRb method access

I am writing a simple distributed system in DRb. I have all the peers, and one server to do the bootstrapping. In that server, I have a few methods like "suggest_peer", and "start_service" and "stop_service". When a peer connects to the server, he…
pvinis
  • 3,855
  • 5
  • 33
  • 55
1
vote
0 answers

How would a client/server utilizing UPnP work in Ruby?

I'd like to allow two computers behind routers share files in a server/client setup using Ruby; I've looked into the UPnP implementation for Ruby, but the documentation is, in my opinion, fairly poor and it does not offer much of an explanation of…
collisionTwo
  • 839
  • 2
  • 11
  • 16
1
vote
2 answers

Ruby DRb - Thread-Safety

I'm working on a multi-process file processing script. After trying out threads/forking, I found out about IPC (pipe/socket) and last but not least DRb. It seems like the most capable of all the options and relatively user friendly. I was reading in…
Ohad Dahan
  • 339
  • 2
  • 12
1
2 3