views:

315

answers:

2

I would like to host a service on a WinCE device. The WinCE device is the host which can be accessed(control and data acquisition) by multiple clients (PC or WinCE) over serial port, TCP, USB etc. I was considering using Protocol Buffers for serialization on the wire. It would be ideal to use WCF or remoting but as far as I see they are not implement on the Compact Framework. Anyone have any ideas how this can be achieved.

A: 

CF 3.5 has some WCF, but at current only the full-fat framework has WCF with the hooks to support swapping out the serializer on the fly. I know of some users who are using CF but passing a Stream over the wire (as far as WCF is concerned) and handling the protobuf-net (de)serialization outside of WCF (a byte[] may work similarly, but they chose Stream - I can't recall why- perhaps base-64 issues?). Would that help?

Marc Gravell
I have done a lot of searching but I can't find a way to host WCF in Compact Framework. Instead of writing my own communication with the WinCE device I want to use an existing framework.
@jauwaad - do you want WinCE as the server? No - protobuf-net doesn't do that. It *has* a server included but it uses `HttpListener`, so only works on full framework.
Marc Gravell
Thanks Marc. I love your implementation of Protocol buffers, have been toying with it for sometime. As far as my current project WinCE is the server and the PC is the client that starts communications.
A: 

It's a blatant plug, I admit, but you might consider hosting a REST web service from the device.

ctacke
SmartClient Device Connectivity seemed like a very good option, but I can't figure out how to deploy it without having to install visual studio on every client.