DRbObservable : delete_observer ; clients shutdown?

Hi the list,

Has anyone already used DRbObservable ? I am writing a server. When a client calls the server, all others clients are informed of the action. DRbObserver.add_observer works fine, no problem with notify either. But I cannot remove one client from the observers list.
And I cannot achieve making the server detect when one client was shutdown… It seems the rescue part of DRbObservable module in drb/observer.rb is never processed.

I am on Windows 2000 (maybe problems come from the OS), with Ruby 1.8.0 (I know it is not a stable version, but it’s preconfigured when installing) and DRb-2.0.3.

Thanks in advance for any hint.
Jérôme HAUSS

class Server
include DRb::DRbObservable

def subscribe(client)

add_observer(client)

end

def unsubscribe(client)

delete_observer(client)

end

end

class Client
include DRb::DRbUndumped

end

aServer.subscribe(aClient)

aServer.unsubscribe(aClient)

Has anyone already used DRbObservable ? I am writing a server. When a
client calls the server, all others clients are informed of the
action. DRbObserver.add_observer works fine, no problem with notify
either. But I cannot remove one client from the observers list.
And I cannot achieve making the server detect when one client was
shutdown… It seems the rescue part of DRbObservable module in
drb/observer.rb is never processed.

Please try require ‘drb/eq’.

— your_server.rb —
require ‘drb/drb’
require ‘drb/eq’

Great (“c’est génial [French]”) !!! Thanks a lot, this time
DRbObservable.delete_observer is working.
PS. Is it a beginner mistake ? May I find a tutorial explaining this ?

Is the second problem (when client is shutdown without unsubscribing from
server) specific to the win Ruby version ?

···

----- Original Message -----
From: “Masatoshi SEKI” m_seki@mva.biglobe.ne.jp
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Wednesday, June 18, 2003 4:37 PM
Subject: Re: DRbObservable : delete_observer ; clients shutdown ?

Has anyone already used DRbObservable ? I am writing a server. When a
client calls the server, all others clients are informed of the
action. DRbObserver.add_observer works fine, no problem with notify
either. But I cannot remove one client from the observers list.
And I cannot achieve making the server detect when one client was
shutdown… It seems the rescue part of DRbObservable module in
drb/observer.rb is never processed.

Please try require ‘drb/eq’.

— your_server.rb —
require ‘drb/drb’
require ‘drb/eq’