Thanks Fabrizio, your insight's much appreciated.

I sincerely hope for all Java client developers sake, that Oracle does place some very serious efforts behind Mobile Java, otherwise I fear they will loose out to Android.

Patrick is spot on, the only way that Android "might" participate in a djinn is via Surrogate.

Android is missing the most important piece of the puzzle:

java.rmi.Remote
java.rmi.RemoteException

Instead android has a form of RPC called AIDL and something similar to Serializable called Parcelable, which requires the creation of idl files. Looks like they're dealing with stub's too.

http://developer.android.com/guide/developing/tools/aidl.html

They also have some sort of Service interface, I don't know much about it, how its discovered etc.

Serializable is reported to work for some classes, not documented, must be tested etc.

http://developerlife.com/tutorials/?p=288

Cheers,

Peter.

Fabrizio Giudici wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm developing with Android since one month and since I've worked with
Jini maybe I can give some points (all... to be taken with a pinch of
salt).

1. The .dex thing is sometimes transparent, other times not
transparent for what concerns classloaders. OTOH, as reported OSGi
runs on Android and for sure it makes use of classloaders, so problems
should be resolvable.
2. The runtime libraries aren't the entire Java runtime. Not only you
entirely miss Swing, but also some parts of the low-level stuff. For
instance, there's no java.bean.Introspector (not that this must be
related to River, just a point).
3. I've been able to reuse some code I had and that made use of a few
basic infrastructure APIs of the NetBeans Platform. I had some
troubles, mainly because of a kitchen-sink problem of one of the
classes (which brings in a lot of dependencies on AWT/Swing even
though I don't need them). With a bit of patience, this has been
solved by stubbing the required classes and using the Maven shade
plugin (which is able to rename classes and packages in jars) to have
them accepted by the runtime (you're forbidden to embed java.* classes
on your app of course).
4. I'm using serialization internally to my application - I've seen
some strange warnings in the logs, but it was fine. I've also read
something around about people that tried serialization over the
network against a plain Java, and had some issues.

In the end, I think that running River on Android could be possible,
with some work and maybe giving up to some functions. But it's one of
those things that need to be tried.


PS On a matter of perspective, even though I'm not an expert in
scenario forecasts. I've been and I am a great advocate of JME, in
spite of all its known troubles. But unless Oracle gives a big push,
change the overall process about managing and evolving it, and
considering the Android adoption rate, there are high chances that in
a few years if you have to fact with Java(-like) on mobile stuff, it
will be Android.

- -- Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
[email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvv8x4ACgkQeDweFqgUGxcVeACeIIE1WQOXXXWeFtZ2eKqeBoQ3
E+QAoKYkIrQYLfTDrzgZjUCsVz0R5gfY
=ObYN
-----END PGP SIGNATURE-----



Reply via email to