locked
WCF integration with DSS/CCR for remote communication RRS feed

  • Question

  • Dear All,

    I have two separate applications:

    • 1.       A simple self hosted WCF service in a WPF application.
    • 2.       A custom DSS host application (again a WPF app) that starts a very simple DSS service and gets/updates service state (integer and a string).

    My goal is to combine the two so that a non-MRDS client such as a web, windows or mobile app. can remotely communicate back and forth with a MRDS service and potentially at some point a robotic device.

    The problem is how to integrate the two. Would it best to start the WCF hosting from within the same DSS Hosting app or should the DDS orchestration service that is started by the hosting app initiate WCF hosting by ‘spawning’ it.

    Either way how would the WCF service get the data from the DSS service when called in order to pass it back to the non-MRDS client that made the WCF service call? Would this be via a CCR port?

    Please forgive this convoluted description. Also I’m still clawing my way up the DSS/CCR learning curve so it’s all still a little murky at times.

    Any insight and guidance would be much appreciated,

    Simon

     

     

     

     


    Sunday, June 26, 2011 1:53 AM

Answers

  • Hi Jeroen,

    Sorry for the delay in replying and thanks for enquiring.

    My first version of integration of DSS/CCR with WCF for remote distribution and communications consists of a custom simple windows application that acts as both a custom DSS host and WCF host.

    The windows app starts the DSS environment and loads up a test sensor service. This DSS service mimics a simple sensor in so far that it has a constantly changing value using a CCR timer. Once the DSS sensor service has started the windows app initiates the WCF host and service.

    Information is passed back and forth between the singleton WCF web service and the DDS sensor service via the windows hosting application. A separate client windows app ‘gets’ and ‘posts’ data to the DSS sensor service by connecting to the WCF web service in the normal fashion. Obviously the WCF protocols can change depending on the need – HTTP, TCP…etc.

    A lot of this fell into place once I’d figured out how to create a custom DSS host that didn’t need to reside within the RDS root directory.

    The next versions will be hosting and distributing the DSS environment via a web application on IIS, Windows Activation Service (WAS) and merging the WCF Service and the DSS service into one orchestration service. Also want to include Azure at some point too.

    My goal in all this is to be able to deliver and control RDS services to non RDS clients on any platform – windows, web, native mobile, non-windows etc.

    Having said all that I’m still learning DSS/CCR – seems to be going very slow a times.

    What are you working on with RDS? Very interested in sharing experiences.

    Cheers,

    Simon

    Sunday, October 30, 2011 2:15 AM

All replies

  • Dear Simon,

    I would like to know the same things you are looking for. Did you get any further..?

    Greetings,

    Jeroen
    Netherlands

    Monday, October 24, 2011 8:37 PM
  • Hi Jeroen,

    Sorry for the delay in replying and thanks for enquiring.

    My first version of integration of DSS/CCR with WCF for remote distribution and communications consists of a custom simple windows application that acts as both a custom DSS host and WCF host.

    The windows app starts the DSS environment and loads up a test sensor service. This DSS service mimics a simple sensor in so far that it has a constantly changing value using a CCR timer. Once the DSS sensor service has started the windows app initiates the WCF host and service.

    Information is passed back and forth between the singleton WCF web service and the DDS sensor service via the windows hosting application. A separate client windows app ‘gets’ and ‘posts’ data to the DSS sensor service by connecting to the WCF web service in the normal fashion. Obviously the WCF protocols can change depending on the need – HTTP, TCP…etc.

    A lot of this fell into place once I’d figured out how to create a custom DSS host that didn’t need to reside within the RDS root directory.

    The next versions will be hosting and distributing the DSS environment via a web application on IIS, Windows Activation Service (WAS) and merging the WCF Service and the DSS service into one orchestration service. Also want to include Azure at some point too.

    My goal in all this is to be able to deliver and control RDS services to non RDS clients on any platform – windows, web, native mobile, non-windows etc.

    Having said all that I’m still learning DSS/CCR – seems to be going very slow a times.

    What are you working on with RDS? Very interested in sharing experiences.

    Cheers,

    Simon

    Sunday, October 30, 2011 2:15 AM
  • I trust you used the Visual Studio ItemTemplate to create a custom DSS Hosting environment?  I just tested this again to validate that it still works properly.
    Wednesday, November 16, 2011 7:52 AM
    Moderator
  • Are you talking about the DSS XSLT Templates to display dss service data via a web page?

     

    Thursday, November 17, 2011 12:03 AM
  • Hi Simon,

     

    I'm also very interested in your results too!

    Before I googled WCF+DSS, I was (I am) trying to connect a Silverlight 5 (SL5) UI to DSS services.

    • My 1st attempt was to create a WCF service within a DSS service use a VS2010 template. The results was that it just generated the interface and a empty implementation I didn't know how to proceed from there.

     

    • Then I tried to connect directly the silverlight app through a WebClient via DownloadString method which kept throwing  a Security.Exception because for some reason it considers this is a cross-domain communication, although they are all localhost services.

     

    • Finally (I hope) I following the approach that seems consistent after I read your post. I created a DSS service in the SL5 hosting web server as well as a WCF Service. So far I managed to issue a start command from the SL5 UI that Initializes the DSS Host environment from the web server. This was yesterday and today I hope I can now create a service forwarder port of the remote dss service.

    There is an issue tough (not a big deal) which is the dss environment has to start in another port (like localhost:40000) although I still want to know if there is a way to programmatically start a service in an already running DSS HOST (without starting another node). This is already possible from the control panel web page, so there must be a way from C#.

    Thank you for your post.

     

    Best

     

    Nzoji





    • Edited by Nzorro Wednesday, February 1, 2012 8:53 PM
    Wednesday, February 1, 2012 1:52 PM
    • Then I tried to connect directly the silverlight app through a WebClient via DownloadString method which kept throwing  a Security.Exception because for some reason it considers this is a cross-domain communication, although they are all localhost services.

    I'm actually again on this point since I managed to pass security issues thanks to the info found @ bellow:

    http://social.msdn.microsoft.com/Forums/en/roboticsdss/thread/5c51b3aa-0bc1-4ecf-9ba5-3d0fd96968e9

     

    • Finally (I hope) I following the approach that seems consistent after I read your post. I created a DSS service in the SL5 hosting web server as well as a WCF Service. So far I managed to issue a start command from the SL5 UI that Initializes the DSS Host environment from the web server. This was yesterday and today I hope I can now create a service forwarder port of the remote dss service.

    There is an issue tough (not a big deal) which is the dss environment has to start in another port (like localhost:40000) although I still want to know if there is a way to programmatically start a service in an already running DSS HOST (without starting another node). This is already possible from the control panel web page, so there must be a way from C#.

    Thank you for your post.

     

    Best

     

    Nzoji





    I'll update the progress later,

     

    Nzoji

    Wednesday, February 1, 2012 8:56 PM