Rails requirement for background / asynchronous task

We have rails v2.3.8 / apache / passenger application and have asynchronous requirements for some lengthy tasks. So I evaluated some solutions around rails / ruby, wanted to get feedback from some solutions.

I also had one question - how to generate background tasks / workers. Given that our rails application will work inside the apache / passenger container, does this mean that the background / workers also spawn the apache / passenger process / thread?

Is there only one workflow / process that will mean that jobs will be processed one at a time or work jobs will be processed in parallel? I came from java / j2ee background, so I have a good understanding of Message Beans / threading but don’t know how rails messaging services work?

Some of the parameters on the basis of which we evaluate the following solutions are performance / scale, distributed workers (working on separate nodes), support for Rails v3

  • Beanstalkd → async-observer

  • Getting started → Work

  • ActiveMQ (stomp) → Workling / activeMessageing

  • Delayed WORK

+3
source share
2 answers

Phusion Passenger -. . . - , Phusion Passenger.

+1

, , , , , .

reset . . http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_smart_spawning_gotcha_1_unintential_file_descriptor_sharing .

. reset

PhusionPassenger.on_event(:starting_worker_process) do |forked|
  if forked
    ...
  end
end if defined?(PhusionPassenger)

.

0

Source: https://habr.com/ru/post/1765536/


All Articles