theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

Infrastructure: GEMSTEP Agent Rendering and Mirroring - [merged] #455

Closed benloh closed 1 year ago

benloh commented 4 years ago

In GitLab by @daveseah on Oct 4, 2020, 21:12

Merges gemsrv/tracker-ux-1 -> dev

This the first release of the GEM-STEP rendering system, which allows us for the first time to see Agents created from Agent Templates and jiggle-around running their own programs. While there is yet no provision in this code to actually modify these behaviors outside the development environment, this release does represent a giant step toward having a minimally functioning modeling tool when we combine it with the prototype UI. Woohoo!

WHAT TO SEE

The work is visible in APP_SRV, which is the server app framework that works with realtime graphics libraries. The installation process is the same as always: first pull the repo and switch to the dev branch, then issue these instructions while inside the gsgo directory:

npm ci
npm run bootstrap
npm run app           # this just runs the app_srv module

The APP_SRV runs on localhost, so open Chrome and browse to localhost and press return. There is no port number (e.g. :3000 as GEM_SRV uses) because we are serving the application on default web port 80.

You have the choice of running Generator or Tracker. Make a note of the IP ADDRESS that is reported in the terminal output when run npm run app, so you can browse to it from a remote machine on your LAN.

Here's what each test program does.

Generator

This code exercises the simulation engine (running in a browser for development purposes). It does the following operations:

Tracker

This code does not running the simulation; it only renders the DisplayList that it is listening for.

You can run the Tracker on multiple devices on your LAN, and they will all update at the same time from the Generator. However, you currently can not run multiple instances of Generator because of ID collision; this will be fixed in a future version by using the unique socket address to differentiate different streams. Having this differentiation scheme is essential for implementing "FakeTrack" and "Annotations" from multiple devices, which is part of the upcoming "mobile device and multi device addressing" phase of development.

Also missing from this release is the ControlObject stream that can feed input (such as selections) back to the main simulation. This is also dependent on multi-device addressing. We have a fairly good idea of how we can implement this using existing communication methods; it's just a matter of designing a logical system to keep it all straight.

Other Notable Changes

From the developer perspective, there are several new features of note:

That's everything that I can think of in this build that's new! If you have any questions, just ask Sri.

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 12:36

added 2 commits

Compare with previous version

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 12:56

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 13:00

Error on connect from remote machine: Error: Failed to lookup view "/Users/sri/Dev/merge-tests/gsgo/gs_packages/app_srv/built/web/index" in views directory "/Users/sri/Dev/merge-tests/gsgo/gs_packages/app_srv/views" at Function.render (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/application.js:580:17) at ServerResponse.render (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/response.js:1012:7) at /Users/sri/Dev/merge-tests/gsgo/gs_packages/app_srv/src/server-webpack.js:144:9 at Layer.handle [as handle_request] (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/layer.js:95:5) at next (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/layer.js:95:5) at /Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:281:22 at param (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:354:14) at param (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:365:14) at Function.process_params (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:410:3) at next (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:275:10) at /Users/sri/Dev/merge-tests/gsgo/gs_packages/app_srv/src/server-webpack.js:130:5 at Layer.handle [as handle_request] (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:317:13) at /Users/sri/Dev/merge-tests/gsgo/node_modules/express/lib/router/index.js:284:7

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 13:20

added 1 commit

Compare with previous version

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 13:23

The issue was that the old index.ejs file was leftover in the built directory. This template was used to hold the window global variables for setting URSYS configuration; this was replaced with the getinfo webservice API, and index.ejs became index.html.

Fix is to disable the view engine and then use res.sendFile( filePath ) instead of res.render( filePath )

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 13:26

unmarked as a Work In Progress

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 13:33

added 1 commit

Compare with previous version

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 13:36

added 1 commit

Compare with previous version

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 14:18

added 2 commits

Compare with previous version

benloh commented 4 years ago

In GitLab by @daveseah on Oct 5, 2020, 14:20

mentioned in commit b6f9db281e77d18d31a8b04145f5236dc5da4ca4