Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ServiceStack Cross-platform Interoperability

I just learned about ServiceStack and so far from the comments I have read it looks very promising to make the switch from WCF.

This posts says it runs on .NET and Mono ServiceStack vs ASP.Net Web API

I would like to know if a ServiceStack web service hosted on a Windows server can be consumed by a client, say, Mono on Mac OSX.

Does ServiceStack serializing/deserializing work from one server platform to a different client platform?

Theorectically, this should be possible because we are targeting the CLR.

However, in practice it really depends on Mono's implementation of the CLR.

like image 475
Tim Robbins Avatar asked Dec 19 '25 19:12

Tim Robbins


2 Answers

The ServiceStack client and server dlls does work on full Mono Server as-is. E.g. all the live demos on servicestack.net have always been hosted on Ubuntu/Mono/Nginx (i.e. for over 4 years).

The same client libraries also work where you have the full version of Mono installed, so it should also work on MonoMac.

But Xamarin's iOS and Android Mobile platforms do require custom builds for each platform. We haven't previously supported these mobile platforms, but we'll start providing custom builds after the release of ServiceStack v4. Initially with Android as it doesn't have iOS's NoJIT technical limitations, then later with iOS after we've find suitable workarounds for iOS limitations.

like image 61
mythz Avatar answered Dec 22 '25 18:12

mythz


Our experience has been that there have been issues with using a mono servicestack service host with wcf soap1.1 clients.

In particular the version of mono that the service host was based on had problems deserialising the messages that a .net wcf 4.5 client generated.

From memory they couldn't process the namespaces within the xml. We supplied the c# data contract classes to them to build the service. There was one other incompatibility but I can't remember what that was, i think it was to do with the conventions within service stack. Originally the data contracts had the word Response at the end of the message object. Service stack has a convention around async responses that they ran into issues with. We ended up renaming the contracts.

They ended up putting a translation layer to strip out the problematic xml attributes.

In reverse, i.e. a implementation of a mono client with iis hosted wcf basic http soap 1.1 service seemed to work much better. I don't recall any problems with the implementation this way round.

I think that future versions of mono fixed the deserialisation issue.

Hope this helps.

like image 20
JTew Avatar answered Dec 22 '25 17:12

JTew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!