amazon-archives / aws-flow-ruby

ARCHIVED
136 stars 57 forks source link

Possible to have a "simple" client? #30

Open brightball opened 10 years ago

brightball commented 10 years ago

I'm running into a problem in that, there are 3 pieces of this system and all parts are not needed in all places. Specifically, in order to run the "start_execution" method...all we are doing it making a simple call to SWF to trigger things.

That client code should really be useable from anywhere shouldn't it? The workflow worker/decider and the activities need more functionality than that to carry out their duties but a lightweight aws-flow-client would make this system much more useable as a message broker between various application parts.

For example, I'm working on a huge Ruby 1.8.7 system that's being broken down into a service oriented architecture with Ruby 1.9.3+. All of the offloaded logic and processing that's happening, including the decider is handled in the new separated pieces of the codebase...but I still need to start the execution of these processes from the 1.8.7 system.

Currently even calling require 'aws/decider' results in:

MissingSourceFile: no such file to load -- fiber
mjsteger commented 10 years ago

You're right that we should tighten down the requires so that 1.8.7 can launch workflows. In theory, activity workers should also be able to function fine without Fibers. I'll try to get a patch out for this soon.

brightball commented 10 years ago

Great! Thank you!

mjsteger commented 10 years ago

Still working on this. The "easy" solution would be to autoload fibers, which would neatly allow you to use all the clients which don't need fibers in 1.8 without much effort. The status of autoload is uncertain at the moment, however, so I'm not sure if that's the way we should go. I'll dig in and see if there are other, more future-proof ways of dealing with this problem, or if the general consensus is that autoload will continue to be supported.