From: Ben Johnson Date: 2006-09-22T02:25:44+09:00 Subject: Re: Question about drb and databases Paul Lutus wrote: > Ben Johnson wrote: > >> Let's say I have 2 servers. One has the database, the other doesn't. The >> main application is being ran on the one with the database. If I was to >> distribute ruby using DRb to the other server does that process need a >> different kind of database connection? Basically what I'm asking is do I >> need to connect to the database using localhost or the IP? Because wont >> the database calls go over the wire like all of the other calls >> therefore a localhost connection should work, right? > > No -- unless I am not understanding you. But if both machines are on the > same intranet, the IP approach (using an intranet IP) should be fairly > swift. > > Strictly speaking, 'localhost' refers to a particular machine's > self-identity, not to an intranet machine's identity. Right, but if I distribute ruby onto a completely different machine the ruby files do not have to be present over there do they? Does it cache them on the other server or do everything over the wire? I'm doing a ruby on rails project here. So, if it does everything over the wire, wouldn't it do the db calls over the wire as well since the db calls run through the ActiveRecord files? Thanks for your help. -- Posted via http://www.ruby-forum.com/.