fat xml process definitons (Emilio and Diego)

15 views
Skip to first unread message

John Mettraux

unread,
Jan 21, 2009, 8:15:03 PM1/21/09
to openwfe...@googlegroups.com
Hi Emilio, hi Diego,

I finally noticed that Emilio "recycled" a previous thread instead of
starting a new one. Hence I'm moving your discussion in this new
thread.

Thanks.

On Thu, Jan 22, 2009 at 12:20 AM, <emil...@gmail.com> wrote:
>
> Thank you very much for your tip about using a more standard way to include
> XML files. I understand that using:
>
> <!DOCTYPE process-definition [
> <!ENTITY view1 SYSTEM "_view_file.xml">
> ]>
>
> before the "process-definition", and then including "&view1;" in the
> workflow should work with WEXML.

Sorry, but what is WEXML ? REXML ?

> However, I have tried it and have not
> managed to get it working, so my question is: should it be working (and thus
> it is my fault)?

OK, I have taken a look at REXML documentation, then tried
http://gist.github.com/50362
but it didn't work either. I should maybe try with the sax parser
(Ruote uses the dom parser).

I should also try with libxml, it's way better than REXML, but
requires 'native' gems.


> or is it something that must be implemented (and thus we
> could volunteer to add)?

Well, that's kind of you guys. Somehow I'm already using techniques like

<subprocess ref="http://server.example.com/definitions/sub.xml" />

or

<subprocess ref="path/to/sub/definitions.xml" />

The advantage is that the "include" occurs only once the flow reaches
that expression.

http://openwferu.rubyforge.org/expressions.html#exp_subprocess


> and is there a DTD to be used/validated for OpenWFEru language?

There is one for OpenWFEja at
http://www.openwfe.org/flowdef_r1.7.2.xsd but for Ruote, I haven't
rewritten it.

As

<participant ref="alpha" if="${f:alpha_should_review}" />
<subprocess ref="register-for-accounting" />

can be written

<alpha if=${f:alpha_should_review}" />
<register-for-accouting />

which is more readable sometimes. But it fails validation via a DTD.


Best regards,

--
John Mettraux - http://jmettraux.wordpress.com

John Mettraux

unread,
Jan 21, 2009, 8:40:20 PM1/21/09
to openwfe...@googlegroups.com
(replying to Diego in this new thread as well)


On Thu, Jan 22, 2009 at 3:04 AM, Diego Moreno <dmo...@dit.upm.es> wrote:
>
> For next tests I have used a basic ruote-web installation (downloaded
> today). Tests involve a execution of a workflow loaded from big XML, which
> is something like this:
>
> (...)
>
> I have made four tests. Time was measured from the first set-field operation
> timestamp (seen with your logger code) to the last set-field timestamp.
>
> 1) 40 set-fields from a XML workflow definition with 340 lines. 5 seconds.
>
> 2) 40 set-fields from a XML workflow definition with 1170 lines. 11 seconds.
>
> 3) 40 set-fields, in one sweep using a hash, from a XML workflow definition
> with 1170 lines. 2 seconds.
>
> 4) 40 set-variables from a XML workflow definition with 1170 lines. 14
> seconds.
>
> A hash of set-fields seems to be the solution. But it is strange that the
> size of the workflow part that is not executed influences in the final
> runtime.

Hi Diego,

if you look at how Ruote deals with the syntax tree
(http://jmettraux.wordpress.com/2008/09/07/how-does-ruote-work/)
you'll see that after the parsing and transforming into a syntax tree,
it stores pieces of this tree in not yet evaluated expressions, so
process size (lines of code) has an influence.

Why is Ruote keeping thoses copies and not re-reading the process
definition from its source ? Because the source might have changed or
be unavailable.

Now this is a bit slow, but stems out of robustness requirements.

I'd be happy to speed that up, so thanks for sharing the details of
the issue. I will work on that after the 0.9.20 release.

Now, I think that a process definition with 300 lines is a bit fat,
IMHO it requires a bit of refactoring (process reengineering). It's
probably hard to read and hard to render. I have already discussed
with Emilio about techniques for reducing <if> count
(http://groups.google.com/group/openwferu-users/browse_frm/thread/dafa86d8abd22103).


> By the way, related to ruote-web installation I have found two problems:
>
> - I had to disable the rufus-eval git repository from lib/task/ruote.rake
> because it did not exist.
> - I had to comment line 454 from
> vendor/openwfe/extras/participants/active_participants.rb
> # ActiveRecord::Base.connection_pool.release_connection
> because connection_pool method is missing for ActiveRecord-2.0.2
> (recommended version for run ruote-web)

OK, thanks for notifying me about that.

As you know (http://groups.google.com/group/openwferu-users/browse_frm/thread/f7d3c2781782e002
and http://groups.google.com/group/openwferu-users/browse_frm/thread/f7d3c2781782e002),
I'm working on ruote-web2. I won't continue with ruote-web.

This is my fault, I will clearly tag it as "discontinued" on the
github repository.


Best regards, thanks a lot,

Reply all
Reply to author
Forward
0 new messages