What is the Center?¶
Overview¶
The Center is 3forge’s real-time database, engineered for performance, flexibility, and full SQL compliance. It is capable of handling over 100,000 inserts per second and can manage datasets exceeding one billion rows.
The Center supports standard SQL syntax, allowing users to define complex data logic using familiar constructs. Storage can be configured on a per-table basis, offering both in-memory and on-disk persistence options. The Center synchronizes in-memory tables with external data sources, ensuring consistency and continuity, and is highly extensible, making it easy to define custom triggers or procedures to suit specialized workflows.
Users can access the Center in two primary ways: by opening the Web component in a browser and navigating to Dashboard > AMIDB Shell Tool, or by establishing a Telnet connection to the ami.db.console.port, which defaults to port 3290. Once connected, users can interact with the Center using a MySQL-like syntax.
Advanced¶
Startup Process¶
The following diagram describes the process when the Center starts up in chronological order.
Note 1: During Initialize schemas from .amisql files , this is when your custom methods/tables/triggers/timers are being initialized from your ami.db.schema.config.files and ami.db.schema.managed.file.
Note 2: During Start up AMI Entity, the child diagram describes the order in which different AMI Entities start up. Because timers get initialized after the triggers, the timer's onStartupScript will not cause triggers to fire. If you want onStartupScript to be picked up by the trigger at startup, you should use stored procedure's onStartupScript instead.
In-memory Database¶
Features of the 3forge in-memory database include:
- Tables: Tables are used to store data internally; they use a columnar structure for higher capacity and query performance. Tables may be configured for persistence, meaning that data inserted will be available upon restart.
- Stored Procedures: Stored Procedures are similar to stored procedures in a database or procedures in a procedural language. They can be used to execute pre-defined queries to return tables.
- Triggers: Triggers can be attached to tables enabling custom logic to be executed on key events such as inserting, updating or deleting data.
- Timers: Timers can be configured to execute custom logic on given days, times or intervals.
- Derived Views: Derived views can be used to calculate and store real-time derivations of underlying tables such as an aggregation, union or join.
Real-time Sending and Receiving¶
The Center is capable of sending and receiving data streams in real-time:
- Sending Data into 3forge from JDBC connection: Java applications can connect to 3forge using the JDBC driver. The driver supports the full suite of functionality within the 3forge database including inserting, updating and deleting records.
- Sending Data into 3forge from the front end: 3forge dashboards can include forms and other hooks for uploading data into the 3forge database.
- Sending Data into 3forge from the real-time streaming API: Applications can connect to 3forge Relays through the real-time API. Then records can be streamed into 3forge at high rates exceeding 100,000 messages per second.
- Real Time Triggers: As data is streamed into 3forge (through any of the above methods) triggers can be fired to look for interesting events, etc.
- Real Time Derived Views: Derived views can be attached to tables allowing for real-time aggregation, unions, joins, etc. The result is additional tables that can be used just like normal tables.
- Querying real-time views from JDBC: Java applications can connect to 3forge using the JDBC driver. Using various SQL query methods, the applications can query for snapshots.
- Displaying real-time data in the dashboard: 3forge dashboards can connect directly into the 3forge database to show real-time tables that reflect exactly what's in the 3forge database tables. Additionally, other visualizations such as charts and heatmaps can access the database for more advanced views of the data.
