Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Share Live CDO Objects with .Net(Web Service to expose CDO Models with .Net To Read/Update)  () 1 Vote
Share Live CDO Objects with .Net [message #830487] Tue, 27 March 2012 17:53 Go to next message
Firoz Ahmad is currently offline Firoz AhmadFriend
Messages: 3
Registered: March 2012
Junior Member
We have a need to support communication between our .Net Web Application and the CDO Dynamic Model.

So basically, share the state in the CDO objects on the go with .net Web Application , modify the Model related data and update back into the CDO Model.


Is that feasible and if so, what is the technology stack to peruse to expose the CDO Model for updates from our website? Can we use Net4J to expose services to be perused by .Net ?

Please advice.

Thanks Rolling Eyes
Re: Share Live CDO Objects with .Net [message #839035 is a reply to message #830487] Sun, 08 April 2012 02:46 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
CDO questions should be posted to the EMF forum group. You can find it on the Forums home page under the Modeling section. I'm moving this message there as a courtesy, but in the future please post CDO questions there.
Re: Share Live CDO Objects with .Net [message #839625 is a reply to message #839035] Mon, 09 April 2012 01:36 Go to previous messageGo to next message
Firoz Ahmad is currently offline Firoz AhmadFriend
Messages: 3
Registered: March 2012
Junior Member
Thanks Eric.


Appreciated.
Re: Share Live CDO Objects with .Net [message #847255 is a reply to message #839625] Tue, 17 April 2012 06:16 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Firoz,

Sorry, your question slipped through my fingers because it did not completely arrive in the EMF newsgroup. Copy:

> We have a need to support communication between our .Net Web Application and the CDO Dynamic Model.
>
> So basically, share the state in the CDO objects on the go with .net Web Application , modify the Model related data
and update back into the CDO Model.
>
>
> Is that feasible and if so, what is the technology stack to peruse to expose the CDO Model for updates from our
website? Can we use Net4J to expose services to be perused by .Net ?
>
> Please advice.
>
> Thanks Rolling Eyes

Unfortunately I'm neither an expert in .NET nor am I aware of existing ways to use Net4j in .NET. It would be cool,
though. Maybe someone else has worked on this?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Share Live CDO Objects with .Net [message #847346 is a reply to message #847255] Tue, 17 April 2012 08:09 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Firoz,

I am also not aware of a direct Net4J/CDO implementation.

At work we implemented a Rest-based service using XMI as serialization to communicate between Java and C# based applications. Thus we wrote a serializer/deserializer for XMI on the C# site which uses meta information from an ecore/genmodel and creates POJOs (or is it POC#Os? - Plain old C# objects) which were generated from the metamodel. But as you want to use CDO this might not be the right approach for you.

The question is: What is your use case?

If you need full CDO assistance (lazy loading, updating etc.) I think you also have to re-implemented most parts of EMF (package registry, containment references, notifications, resources).

I am also not a C# expert, but from my experiences porting a Java application to C# is not as difficult as it sounds. But porting EMF, CDO client site and Net4J is a lot of work. But I agree, that this sounds quite interesing.

Cheers,

Martin
Re: Share Live CDO Objects with .Net [message #850073 is a reply to message #830487] Thu, 19 April 2012 18:37 Go to previous message
Firoz Ahmad is currently offline Firoz AhmadFriend
Messages: 3
Registered: March 2012
Junior Member
I did some digging and there is a way to achieve the same. It is a nice simple way. I never bought the fact that you cannot do this.

1. Service Based implementation
Approach:
CDO works on the premise of a CDO Server running 1: n CDO Instances. Each Instance is self-managed and persisted to a configured Database server. These are the core components that could help lead us to a Web Service under OSGi (through which now you can extend traditional Eclipse plug-ins as Web services).
• An EMF model Library (Your Class Library). It is imperative you should have this for implementing live objects on CDO.
• Other libraries/plug-ins like Org.Eclipse.EMF.CDO, Org.Eclipse.EMF.CDO.Net4J,Org.Eclipse.Net4J.TCP,Org.Eclipse.EMF.Ecore.Change

Steps:
• Create a plug-In Project under Eclipse.
• Create Custom Adaptor to be used by the Plug-In(Not required, but nice design practice)

• Create Custom Java class with API's to CDO Server/CDO Instance for read/updates using transaction handle opened to live CDO instance using for example transaction.getOrCreateResource("/YourCDOLiveInstance").
• Export .JAR from eclipse plug-in and expose .Jar as Eclipse Plug-In Web Service under Tomcat

Pros:
• SOA.
• Abstraction of Your Model complexity implementation from consumer.
• Technology agnostic/highly re-usable.
• Highly configurable.
• Scalable and Customizable.
• Allows development of standard Message schema for contracts for communication between it and other custom applications within/out of Your domain.
• Allows for sharing of final model representation of Message sent in a standard format for persistence and cross-checking.

[Updated on: Thu, 19 April 2012 18:43]

Report message to a moderator

Previous Topic:saving EObjects and dirty
Next Topic:[CDO][Urgent] tables not created..
Goto Forum:
  


Current Time: Fri Apr 26 08:17:26 GMT 2024

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

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

Back to the top