Coder Social home page Coder Social logo

Comments (15)

epicwhale avatar epicwhale commented on May 28, 2024

Deploy your app source code to the multiple servers and run the workers there? As long as the REDIS instance is centralized, I don't see the issue?

from bccresquebundle.

malisetti avatar malisetti commented on May 28, 2024

Thanks. I haven't tried anything yet to emulate this. I wanted to know the way.

from bccresquebundle.

epicwhale avatar epicwhale commented on May 28, 2024

Should work without hassles. Don't see a reason not to.

Let's close this issue.

from bccresquebundle.

ruudk avatar ruudk commented on May 28, 2024

Or, If you don't like to deploy the web app to the separate server. Just setup PHP Resque yourself on the other server. Connect it to the same Redis instance and your done.

from bccresquebundle.

danhunsaker avatar danhunsaker commented on May 28, 2024

The trouble there is that you still need the job classes on the (second) worker instance. Doable, but you need to be mindful of the requirement.

from bccresquebundle.

epicwhale avatar epicwhale commented on May 28, 2024

Doesn't make sense to do partial deployments... The Job classes are all in your symfony2 app. Nothing is going to work fine without it.

from bccresquebundle.

ruudk avatar ruudk commented on May 28, 2024

I was just pointing out that it's not a requirement to get it working :)

from bccresquebundle.

danhunsaker avatar danhunsaker commented on May 28, 2024

Strictly speaking, yes, Resque itself will operate just fine without any other code. It won't, however, be able to properly execute any of the jobs without also including the job classes. If your project is designed around this factor, meaning your job classes are implemented separately from the non-job portions of your project, you can safely deploy these separate parts of your project without needing to include the full project in both locations. Most applications aren't designed with this in mind, however, for numerous reasons - not the least of which is code deduplication. It all depends on your project design, which in turn depends on development priorities (among other requirements).

For most users, you'll simply deploy the full project to separate servers, and configure one as your interface/job queueing server, with the other running only your workers. (The hosting service Pagoda Box uses this approach, as one example of how this might work in practice.)

from bccresquebundle.

malisetti avatar malisetti commented on May 28, 2024

Thanks guys, you are the best. I will try to implement some of these practices.

from bccresquebundle.

malisetti avatar malisetti commented on May 28, 2024

I was trying to use resque from php(consumer) and node js(producer used https://github.com/technoweenie/coffee-resque). I see the way these two are using redis is not similar to push jobs and to poll jobs. So there is no interoperability. I am wrong. I just moved to Gearman after this.

from bccresquebundle.

danhunsaker avatar danhunsaker commented on May 28, 2024

Ah. That. Yeah. Coffee Resque is probably keeping up with the original Ruby version of Resque, where the PHP version is not. We're hoping to fix that, because interoperability between languages is actually one of the project goals, but progress is slow until the current (original) maintainer can find enough time to properly consider adding more maintainers.

Sorry we weren't ready in time for your project, but hopefully you'll keep an eye on us and give Resque another shot when we finally catch up! Best of luck!

from bccresquebundle.

malisetti avatar malisetti commented on May 28, 2024

But the https://github.com/chrisboulton/php-resque says it's a direct port of ruby resque, then why the implementation is different ? @danhunsaker

from bccresquebundle.

danhunsaker avatar danhunsaker commented on May 28, 2024

Because Ruby Resque is several versions further along. PHP Resque was ported a few years ago and hasn't been kept in sync, largely due to the original developer not having enough time.

Also, PHP and Ruby work differently, so there will be some differences because of that. Those aren't the kinds of differences that cause problems, though. The problems are coming from one implementation continuing to make changes and improvements, while the other implementation stays essentially the same as it was when it was ported originally.

from bccresquebundle.

epicwhale avatar epicwhale commented on May 28, 2024

@danhunsaker this issue can be closed as the worker.root_dir config is an intermediate solution to this problem.

from bccresquebundle.

danhunsaker avatar danhunsaker commented on May 28, 2024

Not sure why I was tagged on that...

from bccresquebundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.