[Architecture] Data mapping Tool discussion

Asiri Rathnayake asiri at wso2.com
Tue Nov 30 02:43:50 EST 2010


Hi,

On Tue, Nov 30, 2010 at 12:54 PM, Amila Suriarachchi <amila at wso2.com> wrote:

>
>
> On Tue, Nov 30, 2010 at 11:17 AM, Asiri Rathnayake <asiri at wso2.com> wrote:
>
>> Hi,
>>
>> On Tue, Nov 30, 2010 at 9:47 AM, Sanjiva Weerawarana <sanjiva at wso2.com>wrote:
>>
>>> From a user point of view what they want to see is two data models on two
>>> panes and then to be able to point-n-click to indicate what goes where.
>>>
>>> Internally we can map one to another via a hashmap or whatever but that's
>>> only for the generated code after the mapping is defined.
>>>
>>
>> So does this mean we should not ask the user to do the domain_model ->
>> meta_model mapping?
>>
>> From amila's suggestion the conversion should be like:
>>
>> domain_a_model -> wso2_meta_model -> wso2_meta_model -> domain_b_model
>>
>
> I am not clear what exactly you mean as a model. But in effect what you
> have to map is an runtime instance of one model to a runtime instance of
> another model.
>

Let me give an example,

1. domain_a_model -> a relational database table (ok, may be 'model' term is
misleading)

2. wso2_meta_model -> a model that is generic, like the one you described.

3. domain_b_model -> xml file.

Sorry if i have misunderstood.

Btw, eclipse M2M project [1][2] seems to be a serious candidate that we
should consider.

Thanks

- Asiri

[1] http://www.eclipse.org/m2m/
[2] http://www.eclipse.org/atl/


> wso2 define a model to define that mapping rules for a common structure.
> and Obviously user has to define those rules.
>
> thanks,
> Amila.
>
>
>>
>> so the user should be interested in the second mapping step. We could
>> automate the mapping steps 1 and 3, however we should allow users to
>> customize that mapping somehow.
>>
>> Eclipse EMF framework allows capturing different domain models, and there
>> is also a framework that allows model to model transformation [1] :) need to
>> investigate bit further.
>>
>> Thanks.
>>
>> - Asiri
>>
>> [1] http://www.eclipse.org/m2m/
>>
>>
>>>  Yes the mapping should likely serialize into Java code or XSLT or some
>>> stuff like that.
>>>
>>> Sanjiva.
>>>
>>>
>>> On Tue, Nov 30, 2010 at 9:01 AM, Amila Suriarachchi <amila at wso2.com>wrote:
>>>
>>>> In GUI this may look like this,
>>>>
>>>> First users go and define mappings. This mapping can have a type. (eg.
>>>> xml, java, file, database)
>>>> What he basically define here is how possibly such a type can be convert
>>>> to hashMap or vise versa.
>>>>
>>>> Then he can define converters.
>>>>
>>>> Which have an input mapping and out put mapping from the mappings define
>>>> above.
>>>>
>>>> Then he can apply this converts to any place where he requires the data
>>>> model change.
>>>>
>>>> thanks,
>>>> Amila.
>>>>
>>>>
>>>>
>>>> On Tue, Nov 30, 2010 at 8:45 AM, Amila Suriarachchi <amila at wso2.com>wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Nov 30, 2010 at 7:24 AM, Sanjiva Weerawarana <sanjiva at wso2.com
>>>>> > wrote:
>>>>>
>>>>>> On Tue, Nov 30, 2010 at 7:14 AM, Amila Suriarachchi <amila at wso2.com>wrote:
>>>>>>
>>>>>>>
>>>>>>> What about using an HashMap and List based structure as the metadata
>>>>>>> model?
>>>>>>> Using hashMaps and Lists we can represent any structured data. Then
>>>>>>> in effect any data model has to define how that model maps to metadata model
>>>>>>> and how to generate the data model from that meta data model.
>>>>>>>
>>>>>>
>>>>>> I don't think a hashmap + lists will have enough metadata. I guess it
>>>>>> depends on what we put into the object value :). The basic model we need is
>>>>>> a way to represent record-oriented data models and certainly hashmap is
>>>>>> close. There are some things that are not well represented there (such as
>>>>>> unions and arrays) but we can probably work around it.
>>>>>>
>>>>>> Eclipse MOF has solved this stuff already .. probably very painful to
>>>>>> get over but once we get over it then its useful probably.
>>>>>>
>>>>>> In Esper it uses similar HashMap List based structure to represnet any
>>>>>>> event data.
>>>>>>>
>>>>>>
>>>>>> Yeah but that for values not the model. Values are relatively easy as
>>>>>> you need little info beyond value and type.
>>>>>>
>>>>>
>>>>> This is what I thought.
>>>>>
>>>>> Lets take the XML mapping <---> XML mapping scenario. XML is a runtime
>>>>> value set. So the conversion should happen like this,
>>>>>
>>>>> XML ---> HashMap --> XML
>>>>>
>>>>> yes. HashMap is not the meta data model but the runtime value set.
>>>>>
>>>>> Now system should have some descriptor file (User need to generate this
>>>>> from a UI) which says how  to map that particular XML instance into HashMap
>>>>> and the HashMap instance to XML
>>>>>
>>>>> So system (we) should have develop a model (specific to XML) to define
>>>>> how to define such a mapping (eg. how to define an XML to HashMap mapping)
>>>>>
>>>>> Therefore supporting a particular data model (XML , java objects) is
>>>>> develop that model.
>>>>>
>>>>> thanks,
>>>>> Amila.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> Sanjiva.
>>>>>> --
>>>>>> Sanjiva Weerawarana, Ph.D.
>>>>>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>>>>>> email: sanjiva at wso2.com; phone: +94 11 763 9614; cell: +94 77 787
>>>>>> 6880 | +1 650 265 8311
>>>>>> blog: http://sanjiva.weerawarana.org/
>>>>>>
>>>>>> Lean . Enterprise . Middleware
>>>>>>
>>>>>> _______________________________________________
>>>>>> Architecture mailing list
>>>>>> Architecture at wso2.org
>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> Architecture at wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>>
>>>
>>> --
>>> Sanjiva Weerawarana, Ph.D.
>>> Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
>>> email: sanjiva at wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 |
>>> +1 650 265 8311
>>> blog: http://sanjiva.weerawarana.org/
>>>
>>> Lean . Enterprise . Middleware
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> Architecture at wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture at wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
> _______________________________________________
> Architecture mailing list
> Architecture at wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.wso2.org/pipermail/architecture/attachments/20101130/8594a644/attachment.html>


More information about the Architecture mailing list