[Thali-talk] Yaron's Weekly Update - 9/29/2014

Yaron Goland yarong at microsoft.com
Tue Sep 30 14:07:48 EDT 2014


To be fair 'everywhere' was never formally defined. But my understanding is that the minimal set (e.g. it might not be complete) is, in alphabetical order:

* Android
* iOS
* Linux
* OS/X
* Windows 32 (what you traditional think of as Windows aka Windows Desktop)
* Windows Phone Runtime
* Windows Runtime (the new run time for Windows Store apps)

So our existing Java code base won't run in iOS, Windows Phone Runtime or Windows Runtime. 

For iOS we could theoretically use something like Oracle ADF Mobile or RoboVM and for Windows (Phone) Runtime we could try something like ikvm. But the devil is in the details. Each of these supports different APIs, different class configurations, etc. in different ways. It's a really fragile rube goldberg-esque mess that frankly scares me.

So given this list running in Java really makes me worried. 

Another option is Xamarin. It supports the complete list above and by all reports works really well. They also now have an option for open source projects to get free licenses. So if someone wants to contribute to Thali they won't have to pay $1000 to get the IDE. But what isn't clear to me (I have homework to do) is if they actually support the entire .net runtime everywhere. Looking at their docs I believe the answer is 'no'. Which means that core APIs I depend on for things like crypto and SSL and HTTP Listener and HTTP client, etc. won't be there for me. Which means having to do various local hacks to get access to what I need and effectively having to write non-trivial amounts of platform specific code.

The final serious option on the list is Node.js. Node.js is really written in C and that is supported by all the listed platforms. Node.js can apparently already compile natively for Android. There are other efforts around iOS. It's generally been made clear to me internally that if I want to help get Node.js running 'everywhere' I would be fully supported in doing that. There are also existing companies (e.g. tidekit and JxCore) that have made declarations (but no code) of having the ability to package Node.js apps for iOS and Android.

When Thali first started I wrote the whole thing in Javascript using PouchDB with a hacked up Java layer pretending to be Node.js. In the end I abandoned that code base and switched to Java because it was clear that the amount of work needed to make Node.js run everywhere was far beyond what I could handle on my own and the only resources I had was myself. Switching to Java let me get a full end to end system working and demo it to my management which got them excited enough to now being willing to fund the node work! Sigh...

So my general inclination is to do the following:
1. Get node running everywhere, either via existing efforts like tidekit/JxCore or working directly with Joyent to get things where we need them. 
2. Get Cordova running on the desktop.
3. Create a Cordova plugin that supports running a Node.JS app in the background (this is not the same thing as node-webkit, I'm not looking to control the Node.js app from the foreground Cordova app, just launch it)

We would then declare this to be the primary architecture for writing Thali apps. I would then drop in PouchDB as both our client (in the foreground browser) and our server (in Node).

In talking with folks about this general idea the excitement has been palatable. There is something about 'node everywhere' that everybody agrees 'just makes sense'. We would still have platform specific work to do. For example, hooking up Bluetooth and Wi-Fi direct into Node. But everyone seems to agree that is something that just needs to happen and there is a willingness to fund it.

So we'll see.

Yaron        

________________________________________
From: Michael Rogers <michael at briarproject.org>
Sent: Tuesday, September 30, 2014 7:34 AM
To: Yaron Goland; thali-talk at thaliproject.org
Subject: Re: [Thali-talk] Yaron's Weekly Update - 9/29/2014

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 29/09/14 18:21, Yaron Goland wrote:
> * *TL;DR - Our VP likes Thali and wants to give us resources but
> only if we can run 'everywhere'. This most likely means re-writing
> everything in Node and making Node run on all platforms. But we'll
> see. Submitted bug fix for thread unsafe code in Couchbase only to
> have a conflicting change put in after mine in Couchbase and be
> asked to rebase my code.*

What platforms are you missing?

Cheers,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBCAAGBQJUKr9tAAoJEBEET9GfxSfMwa4H/iVvu5d78Lz265IoM3x042RM
hpq4GWqxqI8gAQ22qt8I8BvkjhakQ/zhVErKxtvkqMixYkOZzedEtH9LG+HwB4Oq
PXG4k23ryUGov0Pxy1+w0yfol2QOcoxYXaD22ukqYUn1gh1YqxYnwgwcq3sfAboG
q35pMoGp4OPRS/FsFa/SYt+7rCZXKbUgjaQViii7ptp/uj+UYK+bJ6btYrUOuUbv
4BnZm6LBuJLQXsMlRxLNRP/3CutRyU/iSYWFjwJNe/1hx3fY/gx8mjNqgYOtcO/W
5kPxnfxnD8mQrtyqCvDLmjXrJASC3yjg61tmS+WAVRp6WbQt2aD4aR2Y3TP+2+U=
=yEhX
-----END PGP SIGNATURE-----


More information about the Thali-talk mailing list