[Backgroundrb-devel] Loading an array of MiddleMen

Vanson Samuel vansonsamuel at gmail.com
Fri Mar 14 13:22:21 EDT 2008


Hi Hemant,
Thanks for the quick reply.  I will create a git-patch and tests for
you today.  Attached is my own version of backgroundrb_environment.rb,
however I suspect that those who need this feature will want to
implement it in their own way. That is why I put it in
config/backgroundrb_environment.rb outside of the the backgroundrb
source tree.

Once this patch has been commit people will be able to create a
backgroundrb_environment.rb file where they can implement code that
will create a their own MiddleMan or MiddleMen array.  If this file
has not been created then a MiddleMan will be loaded based on the
default configuration file..

- Vanson

On Fri, Mar 14, 2008 at 12:53 AM, hemant kumar <gethemant at gmail.com> wrote:
>
>
>  On Thu, 2008-03-13 at 11:48 -0400, Vanson Samuel wrote:
>  > Hi,
>  > I am currently working on a project that requires multiple rails
>  > applications (lets call them consumers, since they will consume
>  > requests) to exposes long running services that will be executed from
>  > a management rails application (the producer of the requests).  To do
>  > this BackgrounDrb was installed on all the consumers and the producer.
>  >  BackgrounDrb was configured to on each of the consumers and the
>  > configuration files were copied over to the producer.  This is where I
>  > run into a problem, there can only be one MiddleMan on the producer.
>  > In version .99 of BackgrounDrb I got over this hurdle by passing in
>  > the configuration file path to BackgrounDrb.initialize.  I would then
>  > instantiate and array of MiddleMen using the modified class.  I want
>  > to do the same thing again for the new version.  Only this time I am
>  > hoping that my changes will be merged into the trunk.  Please see the
>  > attached patch and let me know if this is possible.
>  >
>
>  Yes, that should work. Can you submit your patch with git-format-patch
>  so as I can commit it. You also need to submit some test cases, if you
>  want the patch to in. Also, you are not mentioning whats there in
>  backgroundrb_environment.rb file.
>
>  Just to clarify further, if inside your rails application you need an
>  array of middleman all you need to do is, creating custom middlemen by
>  requiring backgroundrb.rb file and changing ip and port to which it
>  connects. I think, details are pretty bare and should be easily
>  hackable.
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backgroundrb_environment.rb
Type: application/octet-stream
Size: 390 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080314/e635dde2/attachment-0001.obj 


More information about the Backgroundrb-devel mailing list