Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » COSMOS » help with MDR creation
help with MDR creation [message #10652] Fri, 27 June 2008 01:00 Go to next message
Nithya is currently offline NithyaFriend
Messages: 10
Registered: July 2009
Junior Member
Hello Ali,

Thank you so much for your help, we were able to successfully create a
CMDBf layer on our mdr using COSMOS framework. Now we can send a CMDBf
query to our MDR and get back the correct CMDBf query result.

We now want to use COSMOS framework for making our MDR discoverable using
an end point reference. I went through the sample MDR module, but I am
unclear on how to deploy it in a web server.

As far as I have understand, just like the sample XML repository helped in
building the cmdbf layer for our mdr, we must be able to use the Example
MDR modules and customize it to deploy our MDR instead of starting from
scratch.

I do not have much idea on how to actually launch the exampleMDR as a
discoverable service and view it with browser (like cosmos demo
application), could you please help us on the deployment/ configuration
procedures needed for this? References to any related documents for better
understanding would be really helpful.


Thanks,
Nithya
------------------------------------------------------------ ------------------


Hi Hanu,

a) IItemConstraintHandler is a generic interface used for all constraints
associated with item templates (e.g. instance id handler, record type
handler, and etc...). If you look at
org.eclipse.cosmos.samples.cmdbf.services.query.ItemInstance IdHandler,
you'll notice that it extends AbstractItemConstraintHandler, which
implements IItemConstraintHandler.

b) That depends on the type of constraints your MDR will support.

To support item templates you need to implement: IItemTemplateHandler (or
optionally extend AbstractItemTemplateHandler)

For each item constraints (i.e. Instance id, record type, property value,
and XPath), you need to implement IItemConstraintHandler (or optionally
extend AbstractItemConstraintHandler)

To support relationship templates you need to implement:
IRelationshipTemplateHandler

For each relationship constraint (i.e. Instance id, record type, property
value, and XPath), you need to implement IRelationshipConstraintHandler
(or
optionally extend AbstractRelationshipConstraintHandler)

c) The default implementation of the CMDBf query engine, invokes
IRelationshipTemplateHandler.execute(...) for each item in the source and
target item template. If there are multiple relationships, then you're
template handlers will be invoked multiple times based on the entries of
the
source and target item templates.


Is there any way to extend the example to cover most traversed paths to
help newbies like myself?


In most cases, yes.


Based on my assessment, we can reuse



org.eclipse.cosmos.dc.cmdbf.services.query.service.impl and the following
classes in org.eclipse.cosmos.samples.cmdbf.services.query



a) We need to write classes similar to the classes mentioned in this
package



b) We need to add another class ItemConstraintHandler.java


Ideally you want to reuse as much code as possible under the plug-in:
org.eclipse.cosmos.dc.cmdbf.services and make your MDR based on a revision
of org.eclipse.cosmos.samples.cmdbf.services.

I'm posting this e-mail thread to the newsgroup so it can benefit others.

To learn how to access COSMOS newsgroup, click on the 'newsgroup' link
from
COSMOS main web page. We can continue the discussion from there.

Thanks and good luck,

============================================================ ======



Hi Ali,

Overall, we are very impressed with COSMOS initiative and commitment of
this
group.

Thanks for the prompt and detailed response.

I have the following questions:

a) There seem to be no sample code for implementing IItemConstraintHandler
in the Sample Query Service. Is there sample code that we can look at?

b) What are the generic interfaces that all our Domain Objects must
implement?

By looking at the code, it appears that if Our Domain Objects implement
IItemConvertible, IXMLWritable, would the framework automatically take
care
of conversions?

c) It is unclear how to implement RelationShipTemplate in a generic way?
For
instance, if we have to support multiple relationships, how does the code
look like?

Is there any way to extend the example to cover most traversed paths to
help
newbies like myself?

I am beginning to figure out exposing our proprietary data in such a way
that it can be adopted easily into COSMOS framework.

Based on my assessment, we can reuse

org.eclipse.cosmos.dc.cmdbf.services.query.service.impl and the following
classes in org.eclipse.cosmos.samples.cmdbf.services.query

a) We need to write classes similar to the classes mentioned in this
package

b) We need to add another class ItemConstraintHandler.java

We would greatly appreciate any guidance on this regard.

Thanks in advance,

Hanu

============================================================ ======



Hi Hanu,

Here are a few recommendations:

1) If you're not already familiar with CMDBf, you can read the standard
here: http://cmdbf.org/schema/1-0-0/CMDBf_v1.0b.pdf

2) Even though the following document is a bit outdated, it still will
gives
you a good overview of the CMDBf framework:
http://wiki.eclipse.org/Providing_a_CMDBf_Query_and_Registra tion_Service.
This document will describe how you can use COSMOS' APIs to provide CMDBf
services (i.e. query/registration).

3) In i10 we transitioned from the OSGi platform to web services. An MDR
in
i10 is a web service running on the Axis2 engine. The student/teacher
sample is your best point of reference to determine how all pieces of
COSMOS
works. The sample is composed of two parts:

a) The CMDBf implementation of the services

b) Wrapping to package the sample as an MDR (i.e. a web service)

The code for the first part can be retrieved from COSMOS CVS under:

org.eclipse.cosmos/examples/org.eclipse.cosmos.samples.cmdbf .services

The second part can be retrieved from:

org.eclipse.cosmos/examples/org.eclipse.cosmos.example.mdr.w s

org.eclipse.cosmos.samples.cmdbf.services contains an implementation of a
record type constraint:

org.eclipse.cosmos.samples.cmdbf.services/src/org.eclipse.co smos.samples.cmdbf.services.query/ItemRecordTypeHandler.java

For the overall flow of the query operation, see
CMDBfQueryOperation.execute(Object) under
org.eclipse.cosmos.dc.cmdbf.services/src-query-service/org.e clipse.cosmos.dc.cmdbf.services.query.service.impl.
The plug-in can be retrieved under the following CVS module:
org.eclipse.cosmos/data-collection. Notice the result is suppressed in
the
last step (i.e. step 4: processContentSelectors (queryResult,
cmdbfQuery);)

We are working towards solidifying our documentation and sample set.

Let us know if you have any other questions.

Thanks,

Ali Mehregani

Phone Number: (905) 413-3712

Service Modeling Language - COSMOS

http://www.eclipse.org/cosmos/



=====================================================



Ali,

I am beginning to develop an MDR for exposing Qualcomm properitary
provisioning system based on COSMOS framework. I am looking at the code
written by you in Samples project.

While I understand overall flow, I am not quite clear on how to implement
record constraints and how the filtering happens based on 'SuppressResult'
etc.

Is there a generic example which would cover all features of Graph Query
Language?

I have internally championed that COSMOS framework is the Best Approach
and
got approval to build a MDR. I need all the guidance that I can get to
move
forward on this.

I am looking to get direction and help.

I would greatly appreciate it if you can give me guidance and necessary
pointers in this respect.

BTW, Are there any training sessions going to be held for Developers Like
to
adopt COSMOS framework? If so, when and where?

Thanks in advance,

Hanu
Re: help with MDR creation [message #10688 is a reply to message #10652] Fri, 27 June 2008 16:39 Go to previous messageGo to next message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Nithya,

If you have the 1.0M3 build installed that we just made available
yesterday, and you have the COSMOS SDK installed in Eclipse, you can
select the MDR project, right click and select Run As > Run On Server.
This will cause a Tomcat instance to be started, and will automatically
open an instance of the COSMOS Web UI so you can do some testing. That
doesn't answer the question of how you deploy to production, but might
help you at least run your MDR for testing purposes.

Hope this helps,
David

Nithya wrote:
> Hello Ali,
>
> Thank you so much for your help, we were able to successfully create a
> CMDBf layer on our mdr using COSMOS framework. Now we can send a CMDBf
> query to our MDR and get back the correct CMDBf query result.
> We now want to use COSMOS framework for making our MDR discoverable
> using an end point reference. I went through the sample MDR module, but
> I am unclear on how to deploy it in a web server.
>
> As far as I have understand, just like the sample XML repository helped
> in building the cmdbf layer for our mdr, we must be able to use the
> Example MDR modules and customize it to deploy our MDR instead of
> starting from scratch.
>
> I do not have much idea on how to actually launch the exampleMDR as a
> discoverable service and view it with browser (like cosmos demo
> application), could you please help us on the deployment/ configuration
> procedures needed for this? References to any related documents for
> better understanding would be really helpful.
>
>
> Thanks,
> Nithya
Re: help with MDR creation [message #10721 is a reply to message #10688] Fri, 27 June 2008 17:57 Go to previous messageGo to next message
Nithya is currently offline NithyaFriend
Messages: 10
Registered: July 2009
Junior Member
Hi David,

We are using eclipse-SDK-3.4M6-win32. We have check out
org.eclipse.cosmos.example.mdr and related modules. From the documentation

http://wiki.eclipse.org/Constructing_a_Data_Manager
1.we understand that the cosmos.example.mdr and related modules have the
neccessary code already for making the XMLrepository MDR
2.we have to follow the deployment procedures that would make it
discoverable using end point reference.

I am a newbie in this domain and would really appreciate some hand holding
in this area. At this point, I can still see a Run As > OSGi
configuration as one of the optiona coming up when I click
org.eclipse.cosmos.example.mdr project. It would be great if you please
help me on how to proceed or point to the relevant documentations.

Thanks a lot,
Nithya
Re: help with MDR creation [message #10753 is a reply to message #10721] Wed, 02 July 2008 17:41 Go to previous message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
Nithya wrote:
> Hi David,
>
> We are using eclipse-SDK-3.4M6-win32. We have check out
> org.eclipse.cosmos.example.mdr and related modules. From the documentation
> http://wiki.eclipse.org/Constructing_a_Data_Manager 1.we understand that
> the cosmos.example.mdr and related modules have the neccessary code
> already for making the XMLrepository MDR
> 2.we have to follow the deployment procedures that would make it
> discoverable using end point reference.
> I am a newbie in this domain and would really appreciate some hand
> holding in this area. At this point, I can still see a Run As > OSGi
> configuration as one of the optiona coming up when I click
> org.eclipse.cosmos.example.mdr project. It would be great if you please
> help me on how to proceed or point to the relevant documentations.
>
> Thanks a lot,
> Nithya

Nithya,

Did the email you received from Hubert clear things up for you?

David
Re: help with MDR creation [message #571438 is a reply to message #10652] Fri, 27 June 2008 16:39 Go to previous message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Nithya,

If you have the 1.0M3 build installed that we just made available
yesterday, and you have the COSMOS SDK installed in Eclipse, you can
select the MDR project, right click and select Run As > Run On Server.
This will cause a Tomcat instance to be started, and will automatically
open an instance of the COSMOS Web UI so you can do some testing. That
doesn't answer the question of how you deploy to production, but might
help you at least run your MDR for testing purposes.

Hope this helps,
David

Nithya wrote:
> Hello Ali,
>
> Thank you so much for your help, we were able to successfully create a
> CMDBf layer on our mdr using COSMOS framework. Now we can send a CMDBf
> query to our MDR and get back the correct CMDBf query result.
> We now want to use COSMOS framework for making our MDR discoverable
> using an end point reference. I went through the sample MDR module, but
> I am unclear on how to deploy it in a web server.
>
> As far as I have understand, just like the sample XML repository helped
> in building the cmdbf layer for our mdr, we must be able to use the
> Example MDR modules and customize it to deploy our MDR instead of
> starting from scratch.
>
> I do not have much idea on how to actually launch the exampleMDR as a
> discoverable service and view it with browser (like cosmos demo
> application), could you please help us on the deployment/ configuration
> procedures needed for this? References to any related documents for
> better understanding would be really helpful.
>
>
> Thanks,
> Nithya
Re: help with MDR creation [message #571465 is a reply to message #10688] Fri, 27 June 2008 17:57 Go to previous message
Nithya is currently offline NithyaFriend
Messages: 10
Registered: July 2009
Junior Member
Hi David,

We are using eclipse-SDK-3.4M6-win32. We have check out
org.eclipse.cosmos.example.mdr and related modules. From the documentation

http://wiki.eclipse.org/Constructing_a_Data_Manager
1.we understand that the cosmos.example.mdr and related modules have the
neccessary code already for making the XMLrepository MDR
2.we have to follow the deployment procedures that would make it
discoverable using end point reference.

I am a newbie in this domain and would really appreciate some hand holding
in this area. At this point, I can still see a Run As > OSGi
configuration as one of the optiona coming up when I click
org.eclipse.cosmos.example.mdr project. It would be great if you please
help me on how to proceed or point to the relevant documentations.

Thanks a lot,
Nithya
Re: help with MDR creation [message #571498 is a reply to message #10721] Wed, 02 July 2008 17:41 Go to previous message
David Whiteman is currently offline David WhitemanFriend
Messages: 166
Registered: July 2009
Senior Member
Nithya wrote:
> Hi David,
>
> We are using eclipse-SDK-3.4M6-win32. We have check out
> org.eclipse.cosmos.example.mdr and related modules. From the documentation
> http://wiki.eclipse.org/Constructing_a_Data_Manager 1.we understand that
> the cosmos.example.mdr and related modules have the neccessary code
> already for making the XMLrepository MDR
> 2.we have to follow the deployment procedures that would make it
> discoverable using end point reference.
> I am a newbie in this domain and would really appreciate some hand
> holding in this area. At this point, I can still see a Run As > OSGi
> configuration as one of the optiona coming up when I click
> org.eclipse.cosmos.example.mdr project. It would be great if you please
> help me on how to proceed or point to the relevant documentations.
>
> Thanks a lot,
> Nithya

Nithya,

Did the email you received from Hubert clear things up for you?

David
Previous Topic:help with MDR creation
Next Topic:help with COSMOS_DG_Constructing_a_Data_Manager
Goto Forum:
  


Current Time: Thu Apr 25 13:56:58 GMT 2024

Powered by FUDForum. Page generated in 0.03143 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top