Re: ActiveRecord through Drb: problem with ids

Ezra Z. wrote:

g = obj.find(1)
puts “#{g[:id]} | #{g.name}”
g.flowers.each do |f|
puts “#{f[:if]} | #{f[:id]} | #{f.name}”
end

So by using arinstance[:id] instead of arinstance.id
you will avoid this problem all together.

Hey thanks a lot Erza, it works great!

I have one more question if you don’t mind… Now that I can get
ActiveRecords through Drb, I intend to use them in order to populate FOX
widgets on a fat client, and send the changes back to the server when
the user decides to apply the changes.

Do you think performances will be OK for a relatively complex GUI,
through a low-bandwith network? Does a DrbUndumped ActiveRecord object
generate a lot of round-trips when reading and writing the data in the
object?

On Aug 25, 2006, at 1:32 PM, Philippe L. wrote:

alias :id__ :id

DRb.start_service()

data in the object?
Hey Philip-

My first guess would be that it should be fine. But without knowing

more details it is hard to say for sure. I think the best thing you
could do is run some simulations and benchmark it to see if it is
acceptable to you. Run it over the same slow networks you would be in
the real version and just use irb on the client side to crete and
edit a bunch of AR objects over drb and monitor the network traffic
with netstat or something and benchmark with the built in benchmark
class. This should give yopu a good idea about what you can expect
performance wise.

Cheers-
-Ezra