-
Notifications
You must be signed in to change notification settings - Fork 0
API Server Components
The Server is separated into various componets all handling different tasks. In some cases they communicate with each other or call methods in another component.
Holds the logic for user authentication, creation, login/logout and the user sessions.
Handles user logic. The UserHandler is responsible for creating users and validating users, and therefore handles the cryptographic procedures and the database access for the user table. It provides a route for creating new users.
Handles all the user session state and login/logout functionality. The LoginLogoutHandler holds the user session cache and provides routes for login, logout, checking whether a user is logged in, as well as a middleware to ensure that certain requests can only be done by authenticated users.
Factory method for route function for statistics api. It provides different filters for accessing chain data, such as getting only a certain number of items or for a specified timespan.
Provides implementation of the different requests exposed by the HandleGetStatisticsFactory.
Provides a logger that loggs both to the console and the database, and then can be retrieved via a route and displayed in the browser for remote diagnostics.
Provides a route to display logs in the browser. Both the number of items and the log level can be specified.
Creates the logger that loggs both to the console and the database, with various log levels.
Returns a html string containing the requested log.
The mongoose schema for storing logs in the database.
Holds the state of all running private blockchain. Starts a websocket server to which backend controllers and monitors connect. It is also used to send messages to the blockchain controllers identifierd by their target system.
Provides routes for getting and setting the state of all running private chains and their parameters. When a scenario is started via the frontend, it looks up the scenario from the database and sends the scenario content to the cains.
Formats a scenario defined by payloadSize, period, and number of nodes into a format similar to that of a parsed scylla log.
Class that instanciates a DoubleBuffer and exposes route for Blockchain nodes to POST their simulation data to.
Holds the state of the simulation networks (which chain with number of hosts and miners), the running scenario (name, transaction period and payload size) and recordings (name, startTime and recording state). It also exposes methods to set and modify the state.
BufferAggregator contains the functions to aggregate and the buffered private data.
BufferAggregatorHelper contains the database queries to aggregate the received values and to create and initialize database storages.
Checks whether a received object sent by a private chain node is valid in terms of containing right data fields and datatypes.
Class of the double buffer to store incoming private chain data. Creates two buffers and switches the active (where incoming data gets stored) in a defined period. After the buffers are switched, the filled one gets aggregated and stored to the database.
The mongoose schema for storing temp private data in the database.
The mongoose schema for storing aggregated private in the database.
Is responsible for recieving, parsing, and storing Scylla logs and manually created scenarios. Also exposes a method to get a list of all scenarios and filter by their id.
Recieves a Scylla log and parses it into a format that the different blockchains in the backend can use.
The mongoose database schema for storing parsed Scylla logs and scenarios in the database and read them at a later point.