theRAPTLab / gsgo

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

Infrastructure: Input/Output Device System - [merged] #518

Closed benloh closed 1 year ago

benloh commented 3 years ago

In GitLab by @daveseah on Apr 16, 2021, 20:35

Merges feat/io-systems-4 -> dev

The Input and Device Management System is now available for integration. The system has several features to avoid problems we've had with synchronizing applications in the past while also anticipating our upcoming needs in GEMSTEP.

** THE LATEST DEV BRANCH ** has been merged-in to this branch

OVERVIEW OF KEY OPERATIONS

The major design goal for the Input and Device System was to provide a single getInputs() function "just knew how" to deliver a bunch of data objects, each with a unique id, as an array of values. This follows our very earliest simulation loop conventions, so theoretically it's easy to add as a drop-in replacement.

In practice, there are two main activities you'll do: (1) defining and registering a device from any webapp, and (2) subscribing to a set of devices with desired properties.

Creation

Subscription

Other Nice Things

You can define multiple devices on the same webapp to group controls together.

Likewise you can subscribe to multiple subscription specs, each with its own "controller object" that you can manage whatever way you want.

The underlying systems takes care of all synchronization and communication between device subscribers and creators so it is easy to know if a particular device or set of devices are available.

Any device can belong to multiple subscriptions, with all control data buffered in independent caches. Control data is rewritten in each subscription to have a unique id based on its originating device. This ensures that multiple devices of the same type no longer produce id collisions.

The working reference implementation:

TO TEST

Tracker Features

CharControl Features

OTHER NOTES

We have implemented the minimum number of features to make a multi-instance CharacterController that tries to reduce the finicky app synchronization problems from the past.

As a bonus, the device system give us a more granular way of addressing applications compared to our generalized message system which is more suitable for broadcast than point-to-point.

We have also sketched-in placeholder properties in the device specification for application and user authentication, grouping, and tagging.

The device input management system is part of URSYS, so it is portable to other applications.

The communications system is currently using URSYS messaging instead of a dedicated socket communication channel. Socket channel management is a future feature to allow multiple servers to run on the same network and hosts without conflicting with each other.

We have several new interesting classes:

For an overview of all the data structures in the system, see https://whimsical.com/input-system-dr01-Y2xuF7r1N1kxNJ2MyfzqZY@2Ux7TurymMHkbcce8GSq.

benloh commented 3 years ago

In GitLab by @daveseah on Apr 16, 2021, 21:08

added 192 commits

Compare with previous version

benloh commented 3 years ago

In GitLab by @daveseah on Apr 16, 2021, 21:09

marked this merge request as ready

benloh commented 3 years ago

In GitLab by @daveseah on Apr 16, 2021, 21:18

added 1 commit

Compare with previous version

benloh commented 3 years ago

Huzzah!

benloh commented 3 years ago

mentioned in commit 62a5309ad10d954b541acc483844c0010838af71

benloh commented 3 years ago

In GitLab by @daveseah on Jul 14, 2021, 07:53

added 101h of time spent

benloh commented 3 years ago

In GitLab by @daveseah on Jul 14, 2021, 07:53

remove discount/unbilled hours

benloh commented 3 years ago

In GitLab by @daveseah on Jul 14, 2021, 07:53

subtracted 20h of time spent