[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), 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 (a complete implementation of the node.js API for S8 Smalltalk).

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

We use a build of Node.js for android customized for our needs.
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 (browse NativeObject hierarchy to learn more).
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). You can customize the folder contents to add/remove the classes to interact with in your app.

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 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.

Where is the patch for changes?

The changes has been marked with comments, and can be read with diff.
Most of the changes are required to run android; there is NO additions made at low level to run S8 machinery.
Most of the code we write is S8 code, so we have a small number of lines to adapt and run our objects. We do the interaction with Java as we do with ObjectiveC, C or Lua frameworks.

Which commits of node.js 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