-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Architecture
Linux Dash has 3 main layers: the UI, Server-side wrappers, & the system Data Pipeline.
The UI of Linux Dash, as in what the users interact with on their installations (or the demo page), is an Angular 1.3 application. It is a fairly involved application as it is written from scratch and leverages a handful of libraries to accomplish everything you see on Linux Dash. It uses gulp as the build process.
The application first checks to see if websockets are supported by the server-side implementation being used and the client-side web browser. If websockets are not supported, it falls back to basic HTTP polling.
The source code for the UI can be found under src/js directory of the project.
The server-side implementation of Linux Dash is available in several languages (Node.js, Python, Go, & PHP). The reason this approach is taken is because majority of the complexity is in the layer which fetches & processes the system data. This allows the server-side implementations to remain wrappers which serve as simple router applications for funneling requests from the client to the Data Pipeline.
The source code for the server-side implementations can be found in app/server/ directory.
This layer is the meat of what Linux Dash is. Linux Dash has a single bash file located at app/server/linux_json_api.sh which is the funnel through which all requests for system data are made.
Each method within this bash script handles a specific system-level data-set which it provides as JSON output for the server-side to pass onto the browser. This JSON is then used by the UI to render visualizations or display the data. Through lifecycle of a basic user session, this script can be called a large number of times.