WCF status, ServiceStack

I'm investigation different options to access remote data for an Android application(in the future WindowsEmbedded and possibly iOS with monotouch), so I've made some tests and I'm trying to understand what is possible and is not possible to do.

I already have a client(WindowsCE)/server(win32) solution that uses raw sockets. I'll rewrite the server with .NET,and for communication I would like to try WCF.
I wrote a simple WCF .NET server application, and connected to it with basicHTTPBinding with Android, and it works.
But for performance reasons I want to use TCPBinding, and I got stuck with svcutil etc etc, and I can't understand if I'm unable to do it or if is not possible.
Is WCF fully, partially, going to be fully supported in mono for android?

If the answer is no, and I cannot use binary TCP binding with WCF, what would it be the advantage of moving to ServiceStack (havent't tested yet, but seems to be considered better than WCF).



  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai

    The TCPBindings aren't supported in Mono, so you're out of luck there. Personally, I like ServiceStack better than WCF. I've found it to be quicker to work with and easier to get going with.

    There is a document on using Web Services in mobile apps, maybe that might help you make a decision?

  • MattiaDurliMattiaDurli ITMember ✭✭

    Thanks for the link.
    My problem is that the current software I want to update (a healthcare application on CE5/WindowsMobile made with .NET Compact Framework 3.5,used in hospitals) uses raw sockets, and it's the one I need to update first, that's why I chose WCF.
    But I want to keep the door open for possible Android or IPad versions, and use a communication framework usable on all 3 platforms.
    WCF seems badly supported on Mono, and ServiceStack seems not supported on .NET Compact Framework.

  • EternalBardEternalBard BRBeta ✭✭

    I migrated from netcf 2.0 to MonoTouch. On Windows Mobile all was done by SOAP WebService common asmx. Windows Mobile handles it well. Indeed, all client classes generated by Visual Studio 2005 that also receives DataTables was copied to MonoTouch project after MonDevelop created their own version without some parts and all runs ok.

    I testes it on Mono Android too. Database download (first subscribe) for about 40 - 50 tables is OK in Windows Mobile, iOS and Android using the same WebService.

    All custom libraries (sync also that was based on RDA) run ok on 3 platforms and also in ASP.NET version of the app... Since I didn't want to do one app for each device, I'm creating basic things that used on Windows Mobile like Windows.Forms.Form, ComboBox, TextBox, Label and Button to use the same code per Form to manipulate UI. That's running on iOs and ASP.NET for web version. Android wasn't done yet. Magic tricks cost Mana...

  • MattiaDurliMattiaDurli ITMember ✭✭

    Yes I considered that a SOAP webservice would work on all the three platforms.
    But still, this isn't better than my proprietary socket protocol, that is proven to be fast, robust and safe, and I can easily port to MonoTouch and MonoDroid.
    Windows Mobile remains for my apps the primary platform.
    What I want to do is to update to a standard protocol, but it should also be better than my proprietary one.
    A possible solution I'm considering is using ServiceStack in my server and access it with REST from Android and iOS clients, and SOAP from my Mobile .NET CF clients.
    But is not an improvement in term of performance.

    Another question: is there a way to know the progress of the download of the webservice response?
    I mean, if the answer is 1MB, can I know the progression and show a progressbar?

  • EternalBardEternalBard BRBeta ✭✭
    edited November 2012

    There is but it must be made. Must make the call Asyc or inside a thread, get the size from server first and then monitor it with a second thread/timer that read the file received to show completion. Well, that if we're talking about a file... Just the call to a webservice method I think that do not give automatic info.

    But something like that could be made if it's another kind of data, I think.

    I speak about SOAP just to let know that it is a real life method here in 1500 enterprise SF users. Maybe on 2013 I'll see how to integrate with JSON in the middle of it, if possible, or try to compress IIS data sent, to see uncompress performance.

    But until now, data can be downloaded at first subscribe from 35 to 5 minutes, depends on size and iPad version (iPad 3 is really more fast) and primarily connection speed. Normal sync is about seconds, really more faster that original C++ app in Windows CE before netcf2 app, with proprietary DB, that could be a few minutes to download files compressed to mount the DB but could process it for 20 to 30 minutes to mount it....

    But depends on architecture and need of you app. Here it was really an advance.

  • JoeJoe AUMember

    I'll throw in another wrap for ServiceStack. I haven't used it end-to-end with a mobile client, but I have in other scenarios. It's a very well put together suite and really makes for streamlined service development.

    A particularly nice thing is getting all the different endpoint formats automatically - XML, JSON, CSV, SOAP etc.

    I do use ServiceStack.Text for serialisation/deserialisation in MonoDroid. It works a treat.

Sign In or Register to comment.