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

[GCD] SystemServer

The system server is a server embedded in coco8/jx8 application that expose system access as a web server.

The server can be started evaluating from workspace

Server := GDCWebServer startSystem.
server url
Note: this is the coco8 expression to start the server.
Start server from U8 Welcome tool when running node8-android.

The result of evaluated the expression is the URL to be used to access the server pages.

Once started, the server accept a set of commands used to browse/diagnose/etc the system running in the phone.

Uploaded Image: alert.gifNote that the server runs while the application is running in foreground, and it can be accessed from any computer in the network, e.g. via wifi (it do not require wires to connect from desktop to the phone; and the server can be accessed from another phone.
Uploaded Image: idea.gifActually, the SystemServer is a framework that we have implemented also for JX8 platform (running in all targets of the platform), so you can connect from anywhere to a S8 system hosting a running server.

Connecting to the server

The U8 tools present in UI8 framework (see WI8+UI8 contribution) can run connected to a remote snmalltalk instance.
To connect, press the connect icon in a workspace (or any other tool) and select the connection type and address or the remote smalltalk instance (e.g. yor phone running the system server in the same local network).
When the tool is connected it will evaluate expressions in the remote smalltalk instance and show the results of evaluation locally.

NotePress the help icon in the topPane of each UI8 tool to learn more on the tool and connecting to remote smalltalk instances.

List of commands

To learn more or extend your server see methods under category SystemServer.
/The system home page
/hierarchyReturn an hierarchical description of the classes in the system. Hierarchy is idented with blanks.
/snapshotReturn a snapshot of the running system
/categoriesReturn the array of categories
/category/categoryNameReturn the sources of specified category
/doIt/expressionReturn the result of evaluating expression in the system
/fileIn/expressionFileIn the expression in the system
/ClassNameReturn the fileOut of the class in the system named ClassName
/classesReturn the list of classes
Each line has the name of a class and it's category

NTH & feature requests