Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Framework Model
Framework Model [message #972088] Mon, 05 November 2012 05:45 Go to next message
Michael  ück is currently offline Michael ück
Messages: 8
Registered: July 2009
Junior Member
Hi,

i'm somehow stuck on my current project.

I created a metamodel for a self written service oriented framework.
Basically it consists of services, messages interchanged by those and connections between the services transporting the messages.

So far i'm able to model the library of services which are already implemented. That means i got an model describing which services exist, how the messages they exchange look like and what "transport" mechanisms are avaible to connect those services.

What i like to do now is to create a tool to build configurations of so called service chains.

So i'd like to create instances of the services, define some configuration values for the attributes defined in the model and connect the service instances with the transport mechanisms also defined in the model.

For a prototype i'd like to use a editor like the one i generated for my metamodel.
But i really don't know how to achieve this.

If i'm not completly wrong the metamodel and it's instances are basically instances of ecore. So i think it should be possibly to build a genmodel for both (for example)

thinking of the metamodel hierachy of OMG it's something like:

M0: Ecore
M1: Metamodel defining what's a "Service", a "Message" and a "Transport"
M2: instances of "Services" and such, for example a Service to write something to a file.
M3: a Service chain (currently an Spring XML File defining instances of instances of Service = beans)

Sorry if the description is a little bit confusing, but actually i am confused too Wink

[Updated on: Mon, 05 November 2012 06:31]

Report message to a moderator

Re: Framework Model [message #972117 is a reply to message #972088] Mon, 05 November 2012 06:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26013
Registered: July 2009
Senior Member
Michael,

Comments below.

On 05/11/2012 11:45 AM, Michael ück wrote:
> Hi,
>
> i'm somehow stuck on my current project.
>
> I created a metamodel for a self written service oriented framework.
> Basically it consists of services, messages interchanged by those and
> connections between the services transporting the messages.
>
> So far i'm able to model the library of services which are already
> implemented. That means i got an model describing which services
> exist, how the messages they exchange look like and what "transport"
> mechanisms are avaible to connect those services.
>
> What i like to do now is to create a tool to build configurations of
> so called service chains.
> So i'd like to create instances of the services, define some
> configuration values for the attributes defined in the model and
> connect the service instances with the transport mechanisms also
> defined in the model.
Here your talking about actual service instance that won't be EObjects
and you see the service model as the meta model for these instances?
>
> For a prototype i'd like to use a editor like the one i generated for
> my metamodel.
> But i really don't know how to achieve this.
It sounds like you just design another model that uses parts of your
existing model (or add directly to that existing model)...
>
> If i'm not completly wrong the metamodel and it's instances are
> basically instances of ecore. So i think it should be possibly to
> build a genmodel for both (for example)
>
> thinking of the metamodel hierachy of OMG it's something like:
>
> M0: Ecore
> M1: Metamodel defining what's a "Service", a "Message" and a "Transport"
> M2: instances of "Services" and such, for example a Service to write
> something to a file.
> M3: a Service chain (currently an Spring XML File defining instances
> of instances of Service = beans)
> Sorry if the description is a little bit confusing, but so i am :)
I think you have these M things in the wrong order, and I'm not so sure
the jump from M2 and M3 is really a meta level jump.

Certainly if you have XML files (which hopefully have a corresponding
schema) you can define another Ecore model for reading, manipulating,
and writing those instances. Is that what you want? Do you have a
schema for them?
Re: Framework Model [message #972207 is a reply to message #972117] Mon, 05 November 2012 07:46 Go to previous messageGo to next message
Michael  ück is currently offline Michael ück
Messages: 8
Registered: July 2009
Junior Member
Hi Ed,

thank you for your quick answer.


Quote:

> What i like to do now is to create a tool to build configurations of
> so called service chains.
> So i'd like to create instances of the services, define some
> configuration values for the attributes defined in the model and
> connect the service instances with the transport mechanisms also
> defined in the model.
Here your talking about actual service instance that won't be EObjects
and you see the service model as the meta model for these instances?

Actually no, if i understood your question right.

Within the metamodel (*.ecore) i define "Service" as an instance of EClass.
Within the Model (*.mymodel) i define "FileWriteService" as an instance of "Service".
Within the "Tool" i like to create an instance of "FileWriteService".
And after all that i like to serialize that last "model" into an xml that looks exactly like what we have now.

Perhaps it helps if i describe what i have in mind for the "Tool" even if it's quite "GUI" centric:
I want to have a palette containing all services currently implemented where the user just drags them onto a drawing space. By dragging the service a instance of that service is created and the user can alter the properties of the service and connect it to another one.

Quote:

> For a prototype i'd like to use a editor like the one i generated for
> my metamodel.
> But i really don't know how to achieve this.
It sounds like you just design another model that uses parts of your
existing model (or add directly to that existing model)...


Yes i thought of that too but i hoped i could use the existing tools at least for a "simple" prototype.

I'll try to create two simple examples and append them here.

Quote:

> M0: Ecore
> M1: Metamodel defining what's a "Service", a "Message" and a "Transport"
> M2: instances of "Services" and such, for example a Service to write
> something to a file.
> M3: a Service chain (currently an Spring XML File defining instances
> of instances of Service = beans)
> Sorry if the description is a little bit confusing, but so i am Smile
I think you have these M things in the wrong order, and I'm not so sure
the jump from M2 and M3 is really a meta level jump.

You're write the "M things" are in the wrong order. The list should start with M3. Sorry for that.

Quote:

Certainly if you have XML files (which hopefully have a corresponding
schema) you can define another Ecore model for reading, manipulating,
and writing those instances. Is that what you want? Do you have a
schema for them?


We only have DTDs for the XML files at hand. But there are XSDs for spring i think.
If I'd create a model for that i'd have a model for graphs of java objects and i'm afraid that they'll contain way to much information i don't need.
I'd rather like to generate those files from my model.

Regards,
Michael
Re: Framework Model [message #972252 is a reply to message #972207] Mon, 05 November 2012 08:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26013
Registered: July 2009
Senior Member
Michael,

Comments below.

On 05/11/2012 1:46 PM, Michael ück wrote:
> Hi Ed,
>
> thank you for your quick answer.
>
>
> Quote:
>> > What i like to do now is to create a tool to build configurations
>> of > so called service chains.
>> > So i'd like to create instances of the services, define some >
>> configuration values for the attributes defined in the model and >
>> connect the service instances with the transport mechanisms also >
>> defined in the model.
>> Here your talking about actual service instance that won't be
>> EObjects and you see the service model as the meta model for these
>> instances?
>
> Actually no, if i understood your question right.
Oh...
>
> Within the metamodel (*.ecore) i define "Service" as an instance of
> EClass.
> Within the Model (*.mymodel) i define "FileWriteService" as an
> instance of "Service".
> Within the "Tool" i like to create an instance of "FileWriteService".
EMF can't necessarily help you with that. Consider the analog in the
Library model where you have a Library EClass and you create in instance
and set the name of the Library to "Berlin Public Library". It doesn't
make sense to use that to create an actual physical or logical instance
of Berlin Public Library; it's not a metamodel.
> And after all that i like to serialize that last "model" into an xml
> that looks exactly like what we have now.
Is there a schema for that XML? There needs to be, or you need to write
a schema that corresponds to the XML syntax you want. You'd need to
create an Ecore model from that schema and you'd need to create instance
of that model to read and write the XML. There's some type of
correspondence between your FileWriteSevice instance from Model, and
the EClasses from this schema-based model. In addition, somehow you'll
use that correspondence to populate those instances...
>
> Perhaps it helps if i describe what i have in mind for the "Tool" even
> if it's quite "GUI" centric:
> I want to have a palette containing all services currently implemented
> where the user just drags them onto a drawing space. By dragging the
> service a instance of that service is created and the user can alter
> the properties of the service and connect it to another one.
>
> Quote:
>> > For a prototype i'd like to use a editor like the one i generated
>> for > my metamodel.
>> > But i really don't know how to achieve this.
>> It sounds like you just design another model that uses parts of your
>> existing model (or add directly to that existing model)...
>
>
> Yes i thought of that too but i hoped i could use the existing tools
> at least for a "simple" prototype.
>
> I'll try to create two simple examples and append them here.
>
> Quote:
>> > M0: Ecore
>> > M1: Metamodel defining what's a "Service", a "Message" and a
>> "Transport"
>> > M2: instances of "Services" and such, for example a Service to
>> write > something to a file.
>> > M3: a Service chain (currently an Spring XML File defining
>> instances > of instances of Service = beans)
>> > Sorry if the description is a little bit confusing, but so i am :)
>> I think you have these M things in the wrong order, and I'm not so
>> sure the jump from M2 and M3 is really a meta level jump.
>
> You're write the "M things" are in the wrong order. The list should
> start with M3. Sorry for that.
>
> Quote:
>> Certainly if you have XML files (which hopefully have a corresponding
>> schema) you can define another Ecore model for reading, manipulating,
>> and writing those instances. Is that what you want? Do you have a
>> schema for them?
>
>
> We only have DTDs for the XML files at hand. But there are XSDs for
> spring i think.
There have to be schemas. DTDs are semi-useless. Even if you have to
write a schema by hand, that's simpler than writing a corresponding
Ecore model with ExtendedMetaData annotations by hand.
> If I'd create a model for that i'd have a model for graphs of java
> objects and i'm afraid that they'll contain way to much information i
> don't need.
You can easily reduce what you display, but it seems important if you
are to read and instance, manipulate it, and write it back out, that you
capture every last detail in a model.
> I'd rather like to generate those files from my model.
That's okay too, if it's a unidirectional trip, but you at least need to
model everything you want to have written out.
>
> Regards,
> Michael
>
Re: Framework Model [message #972269 is a reply to message #972252] Mon, 05 November 2012 08:46 Go to previous message
Michael  ück is currently offline Michael ück
Messages: 8
Registered: July 2009
Junior Member
Hi Ed,

thanks for your responses.

It's a bit clearer now, especially through the Library Example. You're right, it doesn't make sense from a modelling perspective.

I think i have to clear things up a bit and separate modelling aspects from the "business" aspects.

Regards,
Michael
Previous Topic:EcoreUtil.equals fails for EObjects read from 2 XML files which are actually copies of each other
Next Topic:Problem concurrently resolving proxies to same resource
Goto Forum:
  


Current Time: Thu Aug 28 07:18:00 EDT 2014

Powered by FUDForum. Page generated in 0.01876 seconds