On Oct 23, 10:52 am, "John Mettraux" <jmettr..Hello John
thanks for fast reply...

On Oct 23, 10:52 am, "John Mettraux" <[EMAIL PROTECTED]> wrote:
> Hi Tomaso,
>
> On 10/23/07, Tomaso <[EMAIL PROTECTED]> wrote:
>
>
>
> > Dear John,
> > thank you for the wonderful OpenWFE(ru).
>
> You're welcome, if it can make your life easier, that's good.
>
> > Our idea is to have a unique db where wf instances are stored and a
> > plugin (something like a
> > owferu-service-connector -briefly OpenWFE-sc ) that may be included
> > into all the rails apps that need workflow "services".
>
> Have you considered having a central Rails application providing a
> RESTful interface to 'client' Rails application ?

Yes, this was my first thought( a web service... ) but the plugin
solution seemed
simpler to me so I asked you about that. But if you think that the
REST flavour is better, i'm happy to
follow you suggestions...
What is needed to have this working?


>
> I would like to implement it (I've been planning to do it since a few
> months ago, to replace the old REST interface).
>
> Your 'client' Rails application could then use ActiveResource to
> interact with the core RESTful "workflow service".
>
> > I suppose that what it needed is something like a DbPersistedEngine:
> > i'had tried to write this class,
> > starting from the FilePersistedEngine, and by consequence i provided a
> > set of classes that enable me to write
> > yaml on a db, similarly to FilePersistedEngine.
>
> > But now the problem for me is: what data must be stored on the
> > database in order to obtain a storage service
> > that can offer at least the same features of the FilePersistedEngine.
> > Can you describe me what data is needed to obtain this, please? I'd be
> > very glad to try to write it on my
> > own ( with your precious help and supervision  :) )
>
> Persistence of the engine (the process instances themselves) to a
> relational database.
>
> I've just implemented that but on top of JRuby and a Java Content
> Repository, that's interesting anyway 
> :http://svn.magnolia.info/svn/modules/community/magnolia-module-workfl...
>
> I'd be glad to help you implement that, with ActiveRecord (and its
> "serialize" directive), it's very easy.
> We can get along with 4 columns. Looking at the JCR based implementation :
>
> ---8<---
>         def []= (fei, fe)
>
>             ldebug { "[]= storing #{fei.to_s}" }
>
>             @mutex.synchronize do
>
>                 c = locate_expression fei, true
>
>                 vf = c.getJCRNode.getSession.getValueFactory
>
>                 c.createNodeData(
>                     WfConstants::NODEDATA_ID, vf.createValue(fei.to_s))
>                 c.createNodeData(
>                     WfConstants::NODEDATA_WFID, vf.createValue(fei.wfid))
>                 c.createNodeData(
>                     WfConstants::NODEDATA_EXPCLASS,
> vf.createValue(fe.class.name))
>
>                 c.createNodeData(
>                     WfConstants::NODEDATA_VALUE, 
> vf.createValue(YAML.dump(fe)))
>
>                 @hm.save
>             end
>         end
> --->8---

This should go in a class like YamlDbStorage or something...


>
> The columns are id, wfid, expclass and value (which contains the
> serialized/yamlized) version of the expression.

There are also wfidgen.last and engine_environment.yaml, correct?


>
> There is one issue though : the engine is demanding in terms of
> updates to the storage. In order to limit them (IO is always costly),
> I generally use the ThreadedStorageMixin :
>
> http://openwferu.rubyforge.org/svn/trunk/openwfe-ruby/lib/openwfe/exp...
>
> which dramatically reduces the number of updates to the
> filesystem/database necessary.

Coupled with the CacheExpressionStorage...


>
> So to sum up all of this, I'd be glad to have your help.  The engine
> persistence to the database is easy to implement, it needs tests and
> documentation though :)

That's my promise ....


>
> Would your company be OK if code that you author goes out under the
> BSD license ?

I haven't forwarded this question...
but, my idea is that once a company agrees to take advantage of open
source software,
should agree also to contribute here and there to community,
shouldn't?

>
> What about the RESTful server approach ?
>
> Best regards, thanks for your interest,
>
> --
> John Mettraux   -///-  http://jmettraux.openwfe.org


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/openwferu-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to