Move AvailServer AvailRuntime to Session
Closed this issue · 3 comments
Presently, the AvailServer
holds on to one shared AvailRuntime
. The result is that each connected AvailServerChannel
Command channel (User - Session) shares the single runtime. Provide an option to have each Session
have its own AvailRuntime
.
Each AvailServerChannel
command channel has a Session
. Each child AvailServerChannel
(non-command channel) spawned by the parent command channel shares access to the parent's Session
.
This ticket requires the following:
- Create AvailServer configurable option that allows for either, a) preserving a single shared
AvailRuntime
(present state) or b) allow for eachSession
to hold its ownAvailRuntime
- Create
AvailRuntime
onSession
that will either be a reference to the sharedAvailServer
AvailRuntime
(a) or have its ownAvailRuntime
(b) so there is one perSession
. - Allow
AvailRuntime
to be shared between sessions via a token (b) AvailServer
jar flag indicates to optionally run using environment variableAVAIL_ROOTS
to pre-populateAvailRuntime
with predefinedModuleRoots
.- Add AvailServer API feature that allows client to add/remove/create a
ModuleRoot
.
To generalize this, we could introduce an abstract AvailServer layer with the handling of the AvailRuntime
/ AvailBuilder
left to the concrete implementation. The Session
will hold on to a reference to both an AvailRuntime
& AvailBuilder
handed to it by the AvailServer. Depending on the AvailServer implementation it will either be a reference to the single shared runtime or a new one.
With different AvailRuntime
s and generalizing ModuleRoot
source origin, #194, I'm not sure what we will do about the Repository
s (build artifacts). This is a level of complexity not yet discussed and probably should be ironed out before either task is completed.
The switch to Anvil development has shifted focus away from AvailServer development. AvailServer development has been stagnant for sometime. In the event AvailServer is revisited, we will re-establish requirements at that time.