# Re: ActiveRecord through Drb: problem with ids

**URL:** <https://www.ruby-forum.com/t/re-activerecord-through-drb-problem-with-ids/66507>\
**Category:** Ruby\
**Created:** [August 26, 2006, 12:50pm UTC](https://www.ruby-forum.com/t/re-activerecord-through-drb-problem-with-ids/66507 "2006-08-26T12:50:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![philpraxis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Post date:** [August 26, 2006, 12:50pm UTC](https://www.ruby-forum.com/t/re-activerecord-through-drb-problem-with-ids/66507/1 "2006-08-26T12:50:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![philpraxis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/77aa72/32.png) [@philpraxis](https://www.ruby-forum.com/u/philpraxis)\
**Post date:** [September 4, 2006, 2:46pm UTC](https://www.ruby-forum.com/t/re-activerecord-through-drb-problem-with-ids/66507/2 "2006-09-04T14:46:25Z")

</div>

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
