3

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.

Community
  • 1
  • 1
Tim Robbins
  • 335
  • 4
  • 12

2 Answers2

2

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.

mythz
  • 141,670
  • 29
  • 246
  • 390
1

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.

JTew
  • 3,149
  • 3
  • 31
  • 39
  • 1
    I wouldn't recommend using WCF/SOAP with Mono as their implementation is incomplete. The [JSON, JSV C# Service Clients](https://github.com/ServiceStack/ServiceStack/wiki/C%23-client) use the same src/impl so should work much better. – mythz Nov 05 '13 at 11:29
  • They were using servicestack libraries. The deserialisation issue was in the mono framework, not in the servicestack codebase from what I recall. – JTew Nov 05 '13 at 18:33
  • That's what I'm saying, ServiceStack uses the WCF/SOAP classes built into the .NET framework which is less complete/robust in Mono. By contrast the JSON/JSV formats are completely provided by ServiceStack, which as a result, uses the exact same src/impl that runs on .NET runs on Mono. – mythz Nov 05 '13 at 23:29
  • Ah, ok. I see. I wonder what protocols Tim is looking to compare, Tim? – JTew Nov 06 '13 at 01:56