Dear ruotists ;) I'm keeping trying to use ruote wisely for the project i'm working on, and a few technical questions have arisen.
Basically, what I need is to dispatch the processing of numerous files between several resources, each of which is not necessarily available at a given time. First things first: - I regularly receive new files to treat, and set up a ruote script in which a process collects their name every x minutes. - those files must be fed into a computing tool that i can call via a system call (or ruby via a SWIG wrapper, but that's not the issue) I spent quite some time reading the documentation, and came with 2 possible ways to do what I want to do. Let's reduce the problem to one file for now. 1/ Since I can write a participant that has a filename as a workitem field and calls my external tool, it's "easy" to instantiate as many participants as I need to process my files. or 2/ I could use a remote participants and listener to deport the work out of the engine. For instance, I could use a FileParticipant or a YamlParticipant that gives me a "physical" trace of the workitem, then my external tool could easily read the yaml string and do its magic, and put the result in the directory that the listener polls (in the form of a well crafted yaml file I suppose) to it can send the workitem back to the engine. First questions : Am I clear ? Is the second idea correct (feasible) or did I get something wrong ? Now for the real fun: The problem is that in fact I don't have one but dozens of file to process, and only a few computing cores as resources. What I'm trying to design is a system that smartly uses all the availables resources, so that when a resource is free (ie ended to process a file), it will be claimed as soon as possible to process a new file. For that purpose, I understood that maybe I could use a worklist (a list of workitems if I'm right) to store workitems and dispatch them to the correct amount of participants. Afterwards it's just a question of elegantly manage loops until the worklist is empty. Again, are my assumptions correct ? As I said earlier, I've read a decent part of the documentation, but still, the use of remote participants/listeners, and worklists confuses me. There are indeed information and some relevant sample lines of code in the rdoc and here on the list (otherwise I never could have imagined the two solutions above), but nothing that popped into my eyes as a short but clean example of how to use remote participants and listeners, or a worklist. If anyone has hints or simple examples to provide, I'll be really thankful. Best regards, Marc --~--~---------~--~----~------------~-------~--~----~ you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en -~----------~----~----~----~------~----~------~--~---
