[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[node8-android] FAQ

How does node8-android application run?

The glue between V8 VM and java is made through Android NDK.

Boot sequence:
  1. The (node.js based) execution machinery is started from java (the app is a native android app)
  2. The node instance will load the image file, and (from S8 side) will setup/initialize the interface to access Java objects.
The java code of application required to boot is minimal(required by android application rules); all the code at image level is S8 code (MIT licensed) and written by Ale and/or people of S8 workgroup.

Where did the code that interacts with Node.js come from?

The glue between Node.JS and S8 is implemented in NodeJS framework.

Where did the code that interacts with Node.js come from?

We use a normal build of Node.js for android extended for our custom porpouses.
The bindings to S8 are implemented under folder src/main/cpp (MIT Licensed)
There are files implemented as extensions to boot(createS8()) and access to application resources, under

Where did the code that interacts with Java come from?

The code that interacts with Java is an extension that exposes a native object to S8, capable to walk the system (by reflection) or bind java objects to S8 NativeObjects dynamically.
The code is in the file Java.st (MIT Licensed). The file JavaObject.st implements the mapping machinery to wrap Java Objects (browse JavaObject and subclasses).
The folders android and java (under s8/library/ contain S8 wrappers for android&java packages), it is all S8 code (MIT Licensed).

The origin of the framework was the node-java project. A project that do NOT target android environment, nor the android Java VM.
The glue is between Java and V8 is implemented as Node.js extension (See in java.cpp method Java::Init ). When the node module is initialized, it exposes the handle of Java current NativeObject. The S8 image use that handle to bind initial objects and build the UI at launch time.

As Android is not a target of the node-java project we modified the code and will maintain the code to be adapted to our needs under android environment. Has been made changes according to Android rules, and we are testing the implementation while building the applications published in the node8-android platform.
We look for changes in the node-java project to see if there are code that we need to drag to our platform.

Where is the patch for these changes?

The changes has been marked with comments, and can be observed with diff.
Most of the changes are required to run android; and there is NO additions made at low level to run S8 machinery.
The code we write is S8 code, so we have a small number of lines to adapt and run our objects.

Which commits of nodejs did you use?


We did not required changes to Node.js to run our platform.
All the code are additions and can be found as source code files (all MIT licesed) in distributed Android project.
The version we are running can be found evaluating
NodeJS process versions
in a connected workspace.

Current version numbers (Dic 2019)
ares1.14.0
http_parser2.8.0
mobile0.2.2-pre
modules64
napi3
nghttp21.34.0
node10.13.0-pre
openssl1.1.0i
uv1.23.2
v86.8.275.32-node.36
zlib1.2.11

How do you plan to support updating to newer versions of each of the technologies embeded within node8?

All other code is glue code; it requires the knowledge of nodeJS API (and node-mobile API that is well documented). The code for bindings to java is java and C code that requires knowledge on NDK and JNI.
We review original projects during development of the platform in the places we search for bugs or issues; and guided by malfunction and/or reported issues.

Place to inform about issues or enhancements