Skip to content

Visualizer architecture

John Collins edited this page Apr 15, 2019 · 6 revisions

up

This page is badly out of date.

Overview

This page will lay out the architecture and plan of how the game visualizer will be implemented, along with a description of technologies used and other important information.

Visualizer mockup

Technically, the visualizer can be split into two major parts:

1. Game overview window

A persistent window which always shows a brief overview of the entire game, along with the most important information about brokers, producers and consumers with links to more detailed info about each entity.

2. Details window

The window in which all of the detailed info selected in the Game overview is shown.

Visualizer mockup #1

This mockup is the default one, with game overview and details windows placed horizontally next to each other.
Mockup #1

Visualizer mockup #2

This is a second proposed mockup, with details window placed below the game overview. This way, each of the windows is granted more horizontal space, making the graphs drawn in the details window show more information.
Mockup #2

Some remarks

Each of the windows is planned to be contained in it's own div, that will be handled with jQuery's collapsible elements. In essence, this means that each window can be minimized so that the focus can be shifted from one element to another.

Technology overview

General rule of thumb is to choose as little of different technologies as possible, and to avoid additional Grails plugins to every extent possible. Ie. jQuery and Javascript will be handled from Google's CDNs, rather than additional Grails plugins resulting in a much cleaner architecture and maintainability.

List of technologies

HTML/CSS

The core of the visualizer will be handled by HTML and CSS, the way any web page is handled these days.

php

Php will probably be needed for querying the database, or reading messages sent to the visualizer for information access.

Javascript

The scripting language of Web today. Although the majority of Javascript will be handled by the jQuery and other libraries, there is still a possibility that some elements will rely on Javascript only.

jQuery / jQuery UI

Rich Javascript library with many usable widgets. Most, if not all of the UI elements will be handled with jQuery UI widgets.

Flot

Flot is a Javascript library oriented on graphs and plotting. All of the graphs and charts in the visualizer will be handled by this library.

Grails / Groovy

Eventually, the skeleton based around HTML/CSS and Javascript was planned to be merged with Grails code to finally become a Grails plugin, and to use the Groovy code to access relevant information about the brokers. However, if communication with the server will be handled by polling and/or database requests, it is possible to implement the visualizer independently of the Grails plugins and only use the technologies mentioned before.

Visualizer communication

TBA

Visualizer building plan

While working on the visualizer, I usually start from the bottom and working my way up, to simplify the building process and following these steps, more or less:

  1. Build a skeleton using HTML/CSS
  2. Enrich the GUI and interactivity by introducing jQuery and it's widgets
  3. Adding on additional Javascript libraries, like Flot and dependencies
  4. Finishing touches on the visual elements
  5. Deploy a visual demo (http://161.53.19.109:8080/q/demo.html)
  6. Handle the communication with the server
  7. Testing and bug handling

Additional notes

This plan is laid out for everyone to comment on, and for people willing to help to gain insight in what needs to be done and how it is supposed to be done.

For any comments and remarks, don't hesitate to contact me via the mailing list.

Clone this wiki locally