[en] Native Android and IOS clients

Topics: Technical Support
Jan 2, 2014 at 6:52 AM
hi,
We want to implement native client libraries of zyan framework for android and ios platforms (Full Duplex TCP channel). Before starting want to know is it possible or not? If yes, any helping material will be appreciated.

Thanks for such a good library :)
Coordinator
Jan 2, 2014 at 12:30 PM
Hi hisabir, thank you for your kind words!
 
Before starting want to know is it possible or not?
 
The current version of Zyan only supports Xamarin.Android.
I haven't even started working on iOS support, although I have plans to implement it in 2014.

Main problem is that Xamarin.iOS doesn't support JIT-compilation, so the runtime code generation is not available.
Every code executed on iOS devices should be compiled ahead of time, and this is quite a restriction.
As a result, Xamarin.iOS doesn't support remoting and binary serialization (which is what Zyan heavily relies on).
The same goes for Windown Phone and WinRT platforms.

So I must warn you that iOS port of Zyan may take a lot of time!
I have so many things to experiment with.
 
any helping material will be appreciated.
 
Using Zyan in a class library is no different from using it in an application.
We have plenty of documentation in English and German: https://zyan.codeplex.com/documentation
Let me know if you think that any specific topic is not covered comprehensively, and I'll be glad to update our wiki.

By the way, if you'd like to help with iOS port, join us :)

Regards, Alex
Coordinator
Jan 2, 2014 at 12:45 PM
Ah, looks like I didn't quite get your question....
 
native client libraries of zyan framework
 
Did you mean to port Zyan itself to Java (for Android) and ObjectiveC (for iOS)? I don't think it's currently possible.
Zyan is built on top of .NET base class library, which is quite different from Java and ObjectiveC libraries.
.NET framework may not even be compatible with Java and ObjectiveC in its base abstractions.
For example, in Java you don't have delegates, LINQ, expressions, lambdas and so on.
To make Zyan truly portable between different native platforms means to sacrifice all .NET-specific features.

Regards, Alex
Coordinator
Jan 2, 2014 at 12:59 PM
I have to admit that I like the idea more and more...
Of course, native client libraries won't support all .NET-specific features, but that's not the goal.
The goal is to interoperate with Zyan-based server supporting most features we can possible do for every platform.
That means rethinking Zyan from scratch starting from transport protocols and serialization (I have plans for it anyway, for version ~4.x).
That's quite a challenge! :)
Jan 3, 2014 at 6:38 AM
Edited Jan 3, 2014 at 6:42 AM
Hi Alex,
Did you mean to port Zyan itself to Java (for Android) and ObjectiveC (for iOS)?
yes you are right, This is what I meant.

Ok we are looking to implement such a solution for our commercial server product and zyan was going to be part of its server implementation. So I think simple TCP sockets with some custom protocol (or protocol buffer based) should work on all platforms. Anyway, thanks for your interest and seems long way to go
Coordinator
Jan 3, 2014 at 9:55 PM
Hi hisabir,

Are you sure RESTful web-services won't do it for you? :)

In our own application we have Zyan-powered server (Zyan handles security, sessions, auth. management, etc. and works as a skeleton for the whole server part) which supports most .NET-based clients out of the box: Windows, Linux, MacOS and Android. For all other kinds of clients we provide web-services via ServiceStack library using JSON serialization format. It covers PHP, Java, Javascript, etc. — any platform you can ever imagine supports web services.

I'd suggest you evaluating similar approach (unless you have some very specific needs strictly incompatible with web services).

Regards, Alex