Dimensions icon indicating copy to clipboard operation
Dimensions copied to clipboard

Create a level of use between 100% Dimensions and 0% Dimensions framework

Open StoneT2000 opened this issue 5 years ago • 0 comments

Right now you can create a Design or a CustomDesign, with the latter being just a wrapper around calling a script that runs a competition and returns results to be used with features such as replay storage, error logs, tournament running etc. This does not have any real security, with the onus placed upon the design creator to ensure their script is safe from uploaded bots.

There could / should be a middle level between Design and CustomDesign that allows a user to also use the security and bot language agnosticism with minimal javascript need and boilerplate.

Proposal: Provide a new custom design type, perhaps a enum, specified by "".

User provides once again a script of sorts that accepts directly commands from agents. Dimensions will start up processes for each agent as it would for any normal design (which means Dimensions can handle more of the security). Depending on the command stream type of the match engine chosen (specified in the custom design probably), these commands from agent processes / containers are simply redirected the script.

The redirect will be a simple message of the agent id, followed by all commands that agent sent, then delimited by a new line char and repeat.

The script can then output whatever it wants, although ill-advised, and when it outputs a specified command to stdout e.g. D_MATCH_DONE, then following lines are stored into a results array and passed to the custom design's getResults function.

Benefits

  • Not too much more code added other than optional engine options
  • Allow engines in other languages to gain access to security features AND bot language agnosticism

Cons Unless the script is just another javascript design, the feature of building a visualizer with command based replays is very difficult.

StoneT2000 avatar Oct 21 '20 01:10 StoneT2000