Skip to main content

Platform Architecture

NexusFlow breaks the user interface, business resources, real-time messaging and simulation calculations into cooperating modules. Developers must first determine which module should be responsible for a capability, and then connect other modules through stable interfaces or message formats. This can avoid multiple "sources of truth" for the same data, and also allow the workspace, simulation kernel and deployment form to evolve independently.

This page describes Logical Boundary, not a fixed number of processes, containers or servers. Different environments can deploy some modules together or split them into different nodes; as long as the interface, permissions, identification and data life cycle remain consistent, module responsibilities should not change with the deployment method.

Further reading:

Overall Structure​

The arrows in the figure indicate the main call directions allowed, but do not mean that any module can directly access the storage of another module. For example, the browser can only read models and jobs through the platform interface, and cannot directly connect to business databases or real-time message storage.

Module Responsibilities​

Personal Center Module​

The Personal Center module is the resource navigation and management portal for users after entering the platform. It is mainly responsible for:

  • Login, logout and initialization of current user information;
  • Display accessible workspaces based on accounts, organizations and roles;
  • Manage personal models, shared models and job lists;
  • Provides permission-controlled entry points for organization management, workspace management, and system operation and maintenance.

It is not responsible for editing model topology, nor does it perform simulations. Model, job and organization data must be read and modified through the platform server; whether the front-end routing displays a certain page is only used to improve the experience and cannot replace server-side permission verification.

Simulation Workbench Module​

The Simulation Workbench module is responsible for the interaction within a modeling and calculation session:

  • Load workspace definition, component definition and model snapshot;
  • Edit sheets, components, connections, parameters and global parameters;
  • Maintain current drafts, undo records, and interface state in the browser;
  • Save a model snapshot to the platform, or create a job from the current draft;
  • Connect to the real-time channel of the job, receive messages, send control instructions and present results;
  • Caches job snapshots and received messages locally in the browser to support restoration and viewing on the current device.

The Workbench can perform on-the-fly verification and interaction restrictions, but final data verification, object permissions, and job creation are still determined by the platform server. It cannot directly select computing nodes, operate the operating environment, nor treat browser cache as server job records.

Component Editor​

The component editor is intended for workspace maintainers and is used to define:

  • The stable type identifier, name, and classification of the component;
  • SVG appearance and position of ports on the graphic;
  • Parameters, conditional expressions, ports, operation instructions and default values;
  • Global parameter definitions for workspace.

Component definitions are saved to the platform-managed definition storage through the workspace interface. The component editor does not modify user model instances, nor does it contain specific simulation algorithms. When modifying the component type, port or parameter structure that has been put into use, you need to consider the compatibility of the old model and historical jobs at the same time, and cannot directly overwrite its semantics.

Platform Server​

The platform server is the authoritative entrance to business data and permission rules and is mainly responsible for:

  • Issuing and refreshing login tokens and parsing current user and organization relationships;
  • Perform object-level permission verification on users, organizations, workspaces, models, snapshots, and jobs;
  • Provide REST API, verify requests and persist business resources;
  • Create a new model snapshot when saving the model, and update the current snapshot pointed to by the model;
  • When creating a job, solidify the job input snapshot, initialize the running state and initiate calculation scheduling;
  • Issue short-term, one-time live connection tickets to clients with access to jobs.

Platform servers do not perform physics simulations, and should not treat drafts or result caches in a browser as authoritative data. External systems and Python SDK should also be accessed through the same business interface, rather than bypassing the permission layer to directly read and write the database.

Job Real-Time Channel​

The job real-time channel connects the browser and the job message flow, and is mainly responsible for:

  • Verify identity, connection tickets, and job access when establishing a WebSocket connection;
  • Read running or retained job results by message offset;
  • Send logs, trend charts, tables, monitoring values and status messages to the client in batches;
  • Forward control messages such as pause, resume, stop, component operations, and running snapshots to the corresponding kernel channel.

The real-time channel does not create jobs, determine whether the model is visible, or run simulation algorithms. The WebSocket path uses the platform job UUID; the kernel uses another set of running identifiers to send and receive messages, and the two are not interchangeable. See Resource Identifiers for detailed differences.

Computing Scheduling and Computing Nodes​

Computing scheduling is responsible for delivering verified jobs to available computing nodes and managing the start, stop, and recycling of the running environment. Compute nodes provide the required resources and connection information to the simulation kernel, but do not interpret the browser interface or determine user permissions.

The number of nodes, resource types, and operating environment can vary with deployment. Business code should rely on platform contracts such as "create jobs", "query status", and "send control", and should not rely on fixed host names, ports, container names, or a certain node.

Simulation Kernel​

The simulation kernel is responsible for the actual calculation:

  • Read the calculation example of this job based on the injected running ID and connection information;
  • Parse topology, component definitions and global parameters;
  • Subscribe to mission control instructions;
  • Publish status, logs, curves, tables, monitoring data and other results in agreed formats;
  • Generate kernel running snapshots when supported and return saved results.

The kernel only processes fixed input and runtime messages for this job. It should not access business tables such as users, organizations, models, etc., should not judge who can view jobs, and should not rely on browser status. See Simulation Kernel Transport and Return Status, Logs, and Results for kernel access contracts.

System Operation and Maintenance Module​

The system operation and maintenance module is a management control surface independent of daily modeling and job calculation. It is mainly responsible for:

  • Summarize service status on master nodes and compute nodes;
  • View service logs and perform controlled starts, stops, and restarts;
  • Manage module versions, update packages, deployment records and operation records;
  • Management node access and configuration related to the operating environment.

Operation and maintenance operations must perform separate administrator permission verification and auditing. This module should not become a second set of business interfaces for models, jobs or results, nor should ordinary business requests bypass object permissions through operation and maintenance channels. See Platform Operations APIs for interface boundaries.

Storage Boundaries​

Different storages bear different reliability, access frequency and retention period. When developing, first determine the owner of the data and then select the storage location.

Storage BoundariesMain ContentAllowed Primary Access PartiesShould Not Be Stored or Assumed
Browser local storageLogin session, interface preferences, clipboard, job snapshot copy, and received messagesPersonal Center and Simulation Workbench in your current browserUser permissions, server job status, or unique result copy
Business persistent storageUsers, organizations, models, model snapshots, jobs, job input snapshots, and resource relationshipsPlatform serverHigh-frequency results streaming, kernel temporary state, or deployment artifacts
workspace definition storageSpatial metadata, global parameter definitions, component definitions, and SVG resourcesThe platform server is managed through the workspace interface, and the Workbench and component editor are accessed through the interface.User model instance, job running status or account credentials
Real-time status and message storageKernel calculation examples, running status, control channel, recent results stream and read index; current implementation provided by RedisPlatform server, job real-time channel, computing node and simulation kernelBusiness master records that need to be retained permanently
Results and running snapshot filesSegmented result messages, kernel running snapshot payloads and other large chunks of dataJob real-time channel and snapshot management logic within the platformIdentity and permissions master data; permanent archive without lifecycle management
Operation and maintenance records and product storageHost and service instances, module versions, update packages, deployment records, operation recordsSystem operation and maintenance module and trusted node agentA business fact about a model, job, or organization
Compute node temporary spaceTemporary files, process status and calculation intermediate quantities in a single run environmentThe running environment of the current jobThe only copy of the platform; data that still needs to exist after node recycling

Data that requires long-term retention must be written to persistent storage by the service that owns the resource. Real-time messages, result files, and browser caches are all subject to their own cleanup policies; don't infer that data from other layers must exist just because there are records in one layer. See Model, Job, Result, and Snapshot Lifecycles for the specific relationship.

The following sequence omits retries, paging, and deployment layer agents, leaving only the key steps of determining data ownership.

Three points need special attention:

  1. Job input is taken from the current draft when the job was created. Whether the model has been saved does not change the principle of independent solidification of job input snapshots; continuing to edit or save the model later will not modify the input of the created job.
  2. Job records and result streams are not the same data. Job metadata can still be in business storage while live messages or results files have been cleaned according to the retention policy.
  3. WebSocket Is Only Responsible for Job Messages. Login, model saving, job creation and historical job query are still completed through HTTP API; do not stuff business resource management into the real-time channel.

For the specific request structure of the model and job interface, see Model and Snapshot APIs, Job, Control, and Result APIs and Real-Time Job Data Over WebSocket.

Where Should Expansion Capabilities Be Changed?​

Stretch GoalsPrimary Modification PositionContracts That May Need to Be SynchronizedBoundaries That Should Not Be Crossed
Add account, organization, model or job management pagePersonal Center module; when adding business rules, modify the platform server at the same timeREST API, permission description, error responseDon't just hide buttons on the front end to implement permissions, and don't let the page connect directly to the database
Add canvas editing, parameter interaction or result display capabilitiesSimulation Workbench moduleModel snapshot structure, result message parsing, browser cache migrationDo not schedule compute nodes directly in the browser or use local cache as server state
Add new workspace or component typecomponent editor and workspace definition interfacecomponent definitions, parameters, ports, commands, SVG and compatibility rulesDo not hard-code space-specific definitions into the general Workbench, and do not modify historical job snapshots
Adjust business rules for models or jobsPlatform serverREST API, validation, permissions, resource lifecycle, and SDKDo not bypass object permissions and do not allow external scripts to directly write to business storage
Add real-time result types or control instructionssimulation kernel and message contract; job real-time channel and Workbench adaptation on demandMessage format, version compatibility, replay sequence, error handlingDo not mix job UUIDs with kernel run IDs, and do not rely on message arrival to mean persistence
Access new simulation algorithmssimulation kernelCalculation case format, status, results, control and running snapshot contractDo not read account or organization data, and do not hardcode platform addresses, credentials, or node names
Increase computing resources or scheduling strategiesComputing Scheduling and Computing NodesJob running status, resource recycling, logs and fault semanticsDo not change the model structure for scheduling convenience, or let nodes determine user permissions on their own
Add service management, version release or update package capabilitiesSystem operation and maintenance moduleAdministrator authorization, auditing, deployment logging and rollback verificationDo not mix high-privilege operation and maintenance actions into ordinary models or job interfaces
Increase external system integrationPlatform REST API or Python SDKAuthentication, paging, idempotence, error codes and compatibilityDo not scrape the page DOM, reuse browser local data, or share user tokens
Adjust storage or retention policiesThe service that owns the dataData migration, cleanup jobs, state rollback and observabilityDo not add undefined secondary sources of truth, and do not assume that snapshots and results use the same period

If a requirement affects multiple modules at the same time, you should first determine which layer has business semantics. For example, when a new result message is added, the semantics are defined by the simulation kernel and the message contract. The real-time channel is only responsible for reliable forwarding, and the Workbench is only responsible for parsing and display; the three places should not be allowed to interpret different meanings.

Checklist for Cross-Module Changes​

Before submitting cross-module modifications, at least confirm the following issues:

  1. Who Is the Data Owner? clearly identifies the only writing party and authoritative query entry.
  2. Has the Contract Changed? Checks whether the HTTP request, snapshot structure, message format, status, or identification requires version compatibility.
  3. Where Are Permissions Enforced? In addition to browser prompts, the platform interface and real-time connection must complete necessary verification respectively.
  4. When Can Historical Data Continue to Be Read? component definition, model structure and result format change, old models and historical jobs need to be verified.
  5. Where Does the Status Fall on Failure? distinguishes between business persistence status, real-time coverage status, kernel status and operation and maintenance records.
  6. When Is the Data Cleaned? Defines retention and recovery boundaries separately for cache, messages, result files, running snapshots, and deployment artifacts.
  7. Does It Depend on Deployment Details? removes the fixed address, port, node, process name and container name, and uses the configuration and discovery mechanism provided by the platform instead.

After completing these checks, perform an end-to-end verification along the main link of "Browser Operation → Platform Permissions and Persistence → Job Scheduling → Kernel Messages → Result Display".