Hello,

> is it possible to call a method from a DRb object which creates and object,
> start service for this object, and returns a handle for the new distributed
> object?

Do you want to distribute two or more objects by one server?

#-- s.rb
require 'drb/drb'
require 'monitor'

class MyObject
  include DRbUndumped
  def initialize(name)
    @name = name
    @info = {}
  end
  attr_accessor :name

  def [](key)
    @info[key]
  end
  
  def []=(key, value)
    @info[key] = value
  end
end

class MockDB
  include MonitorMixin
  def initialize
    super()
    @db = {}
  end
  
  def [](name)
    synchronize do
      @db[name] ||= Element.new(name)
    end
  end
end

DRb.start_service('druby://localhost:12345', MockDB.new)
DRb.thread.join


#-- c.rb
require 'drb/drb'

DRb.start_service
db = DRbObject.new(nil, 'druby://localhost:12345')

foo = db['foo']
p foo
puts foo.name
puts foo['age']
foo['age'] = 0x20

bar = db['bar']
p bar
puts bar.name
puts bar['age']
bar['age'] = 0x10