Adam Lally wrote:
I am working on some modifications to the XMI deserializer that will
allow the following scenario:
1) A CAS is serialized to XMI.
2) Copies of the XMI documents are sent to multiple remote services
3) Each remote service appends to the CAS (does not delete or modify
existing stuff) and responds with a new serialized XMI CAS)
4) The multiple XMI responses are all merged back into a single CAS
instance
This would permit multiple remote services that don't depend on each
other to run in parallel, assuming they only append to the CAS (which
is common). Of course there's other work on the runtime needed to
actually do the parallel invocations, but XMI serializer support is a
prerequisite.
The basic XMI deserializer changes aren't too complicated. First,
when the CAS is originally serialized in step 1, we make available to
the caller the maximum xmi:id value in that CAS (this is mostly
already done, we just need to add a public accessor for this value).
Next, we allow passing this value to the deserializer as an optional
argument that essentially says "deserialize only XMI elements whose
xmi:id is greater than the specified value".
Any comments on this approach?
Currently don't understand how the xmi:id is generated. For example we
have a CAS in step 1 that is serialized with a max xmi:id of 100.
Now two other remote services get this XMI document and do their
processing on it and serialize the CAS again. First service adds for
example FS with ids from 101 to 150, right?
And what do the second process? I think it also starts with numbering at
101. So how are the XMI documents merged in the XMI deserializer. Is it
necessary
so merge the xmi:id attributes before creating the CAS or is it
sufficient to just read the additional xmi:ids (greater than 100) and
add them to the CAS?
I think when xmi:ids must be merged before the CAS is created the XMI
deserializer have to take care about the references with special offset
values. That is easy when using
<myproj:Baz xmi:id="2">
<myFoo href="#1"/>
<myproj.Baz>
but more difficult when using
<myproj:Baz xmi:id="2" myFoo="1"/>
How will be merging be done?
-- Michael