search for: drbobject

Displaying 20 results from an estimated 28 matches for "drbobject".

2006 Sep 05
2
question about passing array of AR objects to worker
...=&ei=UTF-8", "id"=>"5"}>, #<Resource:0xb79d9da0 @attributes={"uri"=>"http://search.msn.com/results.aspx?q=ruby+on+rails&FORM=QBHP", "id"=>"6"}>] but the worker logs it as (in backgroundrb.log) as #<DRb::DRbObject:0xb77c09a8 @ref=-607202372, @uri="druby://localhost:42531"> can someone explain what''s going on here? Chris
2006 Jul 14
4
Using BackgrounDRb to replace nested loops?
In response to my Rails Weenie post today[1], someone mentioned that I try BackgrounDRb to help take the strain off my application. 1: http://rails.techno-weenie.net/question/2006/7/13/nested-loops- best-way-to-send-messages-to-blog-subscribers I''ve just tried to install and use BackgrounDRb with my app, but I''m afraid that I''m not too versed in running processes
2007 Oct 12
0
Trouble on Multi Server setup
...lhost 127.0.0.1 172.16.0.1 172.16.0.2 :order: deny,allow I tried commenting out "self.setup_drb_acl" in lib/backgroundrb_server.rb, but it didn''t make any difference. Also, if I run "MiddleMan.jobs" from ./script/console on server2 or server3, I get this: #<DRb::DRbObject:0x41b3f240 @uri="drbunix:///tmp/backgroundrbunix_172.16.0.3_22223", @ref=542952540> >From server1, I get this: #<DRb::DRbObject:0xb69ee894 @uri="drbunix:///tmp/backgroundrbunix_localhost_2000", @ref=-610099128> This **seems** right, since the correct port and host...
2007 Jan 27
1
Memory leaks in backgroundrb
While debugging stale backgroundrb it became apparent that there''re memory leaks in it. Here''s top object counts dump: 36715 String 6211 Array 5598 Proc 3150 Hash 1478 DRb::DRbObject 1313 Regexp 1272 Class 750 Thread 741 Socket 739 Slave 739 Slave::LifeLine 737 Process::Status 691 DrillReminderWorker 391 Module 160 Range 75 Gem::Version 73 XSD::QName It''s easy to see that loads of threads and slaves are present in the process. It al...
2007 Apr 04
6
Exception when doing DRb remote calls from a BackgrounDRb worker
Hello, I am trying to make DRb calls to a external server from a backgrounDRb worker, but I''m getting always the next exception when I make the remote call. > ERROR: > drbunix:///tmp/backgroundrb.11175/experimenter_worker_3e899de945f0803a82cd257cfac316d0_0_0.0738904928422051 > - #<Errno::ENOENT: No such file or directory - >
2006 Sep 25
3
Engine Yard blog
Just received the news from Tom Mornini. Congrats Ezra for the new Engine Yard site and the blog you will be collaborating. Hope to read you there soon. http://www.engineyard.com/ Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060925/3f251fa4/attachment.html
2007 Aug 09
2
RoR and DRb
Hi, I have a question regarding RoR and DRb. First of all, I tested with simple client/server examples and everything worked as expected. I have the following lines in my environment.rb: DRb.start_service $rem_obj = DRbObject.new(nil, "druby://#{rname}:9001") Since rem_obj is a global variable, I can call it from any controller and the invoked procedure is run on the server. However, what if you want the client to be registered as an observer. How is that gonna work in rails? I imagine that an observer has t...
2007 Jan 27
0
Debugging stale backgroundrb
...undrb_results>, @lifeline=#<Slave::LifeLine:0x34c0858 @pair=[#<Socket:0x34c07e0>, nil], @fds=[9, 10], @pid=27245, @socket=#<Socket:0x34c07e0>, @object_id=27657260, @owner=27245>, @socket_creation_attempts=42, @dumped=nil, @pid=27248, @status=nil, @debug=false, @object=#<DRb::DRbObject:0x34c05c4 @ref=nil, @uri="drbunix:///tmp/backgroundrb.27243/backgroundrb_results_0_0.488948936927155">, @socket="/tmp/backgroundrb.27243/backgroundrb_results_0_0.488948936927155", @at_exit=nil, @waiter=#<Thread:0x34c06c8 sleep>, @uri="drbunix:///tmp/backgroundrb.27...
2006 Jun 07
1
Using DRb within Rails
...way @@gateway ||= new end def process(amount, card, type = :auth) @biller.process(amount, card, type) end def set_card(user_id, number) @biller.set_card(user_id, number) end protected def initialize DRb.start_service nil, nil, PaymentGateway.ssl_config @biller = DRbObject.new(nil, "drbssl://#{PaymentGateway.host}:#{PaymentGateway.port}") end end In my environment.rb file, I set up the config options. For development/testing I''ve set up a mock class so it doesn''t actually have to use DRb. In my code, I just do gateway = PaymentGateway...
2008 Mar 25
1
extending bdrb / running multiple servers
...antiating a MiddleMan for the correct server and then sending the job request to that server. Needless to say, this process is going a lot easier with the new version, except for one catch. With the old backgroundrb, I was able to connect to an arbitrary server like this: thisMiddleMan = DRbObject.new(nil, "druby://#{server_name}:22223"); Now this doesn''t work. So, I took a look at BackgrounDRb::WorkerProxy, and it seems like it can only connect to the server listed in the config file. Is there supposed to be a way to manage multiple backgroundrb servers? I'&...
2006 Jan 25
7
Global Data, where can it go?
I''m developing a stateful Ruby application that needs to keep data in one location where all people accessing the site can modify its contents. This data will be read-from/written to often, so I would prefer for rails to keep it in memory, rather than a database. My frist try involved global variables. After discovering that they were being "re-initialized" with each new
2006 Nov 28
8
how to update index from a script
Hello all, I''m using AAF right now to index my ~3million db records. However, any additions to these records are added to the database through an external script so the aaf activerecord hooks will not catch any updates. Since new records are only added rarely, I figured I could just add the new records manually in ferret from some type of script. I''ve been looking at the
2007 May 18
4
No return status from mongrel upload progress (and thus no updates on the bar)
...output: ** Starting Mongrel listening at 0.0.0.0:3000 ** Loading script/../config/../config/mongrel_upload_progress.conf external config script The bar doesn''t draw updates - if I connect with irb (as per the upload_progress page) irb(main):001:0> uploads = get_status => #<DRb::DRbObject:0xb7d1ef04 @ref=nil, @uri="druby://0.0.0.0:2999"> irb(main):002:0> uploads.list => [] Nice regular output in my development.log: Processing UploadsController#upload_progress (for 127.0.0.1 at 2007-05-18 15:20:29) [POST] Parameters: {"action"=>"upload_progres...
2006 Dec 27
0
MiddleMan and RSpec partial mocks
I''m trying to test with RSpec (0.7.5), and I have the following code: MiddleMan.should_receive(:new_worker) Every time I run this code, I get this error: undefined method `new_worker'' for class `DRb::DRbObject'' How do I get around this?
2006 Sep 08
1
Access worker outside of Rails?
Hi all, Wondering if it''s possible to access a worker from outside of Rails -- I''ve tried simply including: require RAILS_ROOT + ''/vendor/plugins/backgroundrb/backgroundrb.rb'' BackgrounDRb.MiddleMan.get_worker(key) but, I get an error that the ''get_worker'' method is undefined. Any ideas? Thanks a lot, W -------------- next part
2011 Jul 26
0
connect to DRb server from rails controller ?
...t; trap("INT") { DRb.stop_service } DRb.thread.join ---------------------------------- Client code in application controller: require ''drb'' class ApplicationController < ActionController::Base protect_from_forgery def parser_svc # svc = nil svc = DRbObject.new nil, ''druby://:9000'' svc end end main controller: def pcheck svc = parser_svc res = svc.check render :text => res end when called and server is running get this error: DRb::DRbConnError (druby://:9000 - #<Errno::EADDRNOTAVAIL: The requeste...
2006 Aug 24
10
MongrelCluster - How can I make a request to a specific mongrel instance?
In our app we''ve a number of singleton ruby classes that cache static data in hashes, things like string values, system config params, etc). In a webbrick environment this works ok, but we find in production we have a problem because we have 4 caches, one for each mongrel instance. This also isn''t a BIG problem, but our cache.reload() methods are kinda useless now, because we
2006 Nov 04
1
BackgrounDRb Call for help
...n. If you want to run the new middleman_slave and see it manage multiple processes at once you can run ruby middleman_slave.rb in one terminal and then in irb here are a few commands to play with it: require ''drb'' DRb.start_service(''druby://localhost:0'') m=DRbObject.new(nil, "druby://localhost:2000") 40.times{m.new_worker :class => :worker} m.jobs.keys m.jobs.keys.each {|o| p m.worker(o).progress} m.jobs.keys.each {|o| m[o].shutdown if m.worker(o).done} Now that we use the slave gem to manage external workers there is a slight interface change...
2006 Sep 28
1
upload_progress and DRb.start_service crashes
Whenever I tried to start mongrel_rails with the upload progress script, it would die with the following error: /usr/local/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'': getaddrinfo: No address associated with nodename (SocketError) from /usr/local/lib/ruby/1.8/drb/drb.rb:837:in `open_server_inaddr_any'' from /usr/local/lib/ruby/1.8/drb/drb.rb:860:in
2007 Nov 09
2
Problem with stemming and AAF
...StemmedAnalyzer.new.token_stream(nil, params[:query]) while token = search_terms.next puts token end Like so: Search for "chairs tables" returns token["chair":0:6:1] token["tabl":7:13:1] but the front end throws up on me with a: TypeError (wrong argument type DRb::DRbObject (expected Data)) I''m fully confused. I''m sure it''s something obvious that I''m just not seeing, and after beating my head against this for two days, I''m hoping someone can point it out to me! Or at least get me moving in the right direction. Thanks for a...