Class

Rinda::RingServer

Inheritance
< Object
Included Modules
DRbUndumped

A RingServer allows a Rinda::TupleSpace to be located via UDP broadcasts. Service location uses the following steps:

  1. A RingServer begins listening on the broadcast UDP address.
  2. A RingFinger sends a UDP packet containing the DRb URI where it will listen for a reply.
  3. The RingServer recieves the UDP packet and connects back to the provided DRb URI with the DRb service.

Methods

Class

Visibility Signature
public new (ts, port=Ring_PORT)

Instance

Visibility Signature
public do_reply ()
public do_write (msg)
public reply_service ()
public write_service ()

Class Method Detail

new(ts, port=Ring_PORT)

Advertises ts on the UDP broadcast address at port.

Instance Method Detail

do_reply()

Pulls lookup tuples out of the TupleSpace and sends their DRb object the address of the local TupleSpace.

do_write(msg)

Extracts the response URI from msg and adds it to TupleSpace where it will be picked up by reply_service for notification.

reply_service()

Creates a thread that notifies waiting clients from the TupleSpace.

write_service()

Creates a thread that picks up UDP packets and passes them to do_write for decoding.