Class | Rinda::RingProvider |
In: |
lib/rinda/ring.rb
|
Parent: | Object |
RingProvider uses a RingServer advertised TupleSpace as a name service. TupleSpace clients can register themselves with the remote TupleSpace and look up other provided services via the remote TupleSpace.
Services are registered with a tuple of the format [:name, klass, DRbObject, description].
Creates a RingProvider that will provide a klass service running on front, with a description. renewer is optional.
# File lib/rinda/ring.rb, line 232 232: def initialize(klass, front, desc, renewer = nil) 233: @tuple = [:name, klass, front, desc] 234: @renewer = renewer || Rinda::SimpleRenewer.new 235: end
Advertises this service on the primary remote TupleSpace.
# File lib/rinda/ring.rb, line 240 240: def provide 241: ts = Rinda::RingFinger.primary 242: ts.write(@tuple, @renewer) 243: end