<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.spiretrading.com/index.php?action=history&amp;feed=atom&amp;title=Server_Overview</id>
	<title>Server Overview - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.spiretrading.com/index.php?action=history&amp;feed=atom&amp;title=Server_Overview"/>
	<link rel="alternate" type="text/html" href="https://wiki.spiretrading.com/index.php?title=Server_Overview&amp;action=history"/>
	<updated>2026-04-07T12:36:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.spiretrading.com/index.php?title=Server_Overview&amp;diff=246&amp;oldid=prev</id>
		<title>Kamal at 22:40, 1 December 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.spiretrading.com/index.php?title=Server_Overview&amp;diff=246&amp;oldid=prev"/>
		<updated>2025-12-01T22:40:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:40, 1 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot; &gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 61:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== install.sh ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== install.sh ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;install.sh&amp;lt;/code&amp;gt; script is designed for Ubuntu Server LTS and performs a complete system installation including:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;install.sh&amp;lt;/code&amp;gt; script is designed for &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the latest &lt;/ins&gt;Ubuntu Server LTS and performs a complete system installation including:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Installing system dependencies (build tools, MySQL, Node.js, Python packages)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Installing system dependencies (build tools, MySQL, Node.js, Python packages)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Building all server applications&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Building all server applications&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kamal</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.spiretrading.com/index.php?title=Server_Overview&amp;diff=245&amp;oldid=prev</id>
		<title>Kamal: Created page with &quot;= Server Overview = Spire is a distributed trading platform composed of multiple specialized servers that work together to provide a complete trading infrastructure. Each serv...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.spiretrading.com/index.php?title=Server_Overview&amp;diff=245&amp;oldid=prev"/>
		<updated>2025-12-01T22:39:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Server Overview = Spire is a distributed trading platform composed of multiple specialized servers that work together to provide a complete trading infrastructure. Each serv...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Server Overview =&lt;br /&gt;
Spire is a distributed trading platform composed of multiple specialized servers that work together to provide a complete trading infrastructure. Each server is independently deployable, communicates through well-defined service interfaces, and authenticates through a central Service Locator.&lt;br /&gt;
== Architecture Principles ==&lt;br /&gt;
&lt;br /&gt;
'''Service-Oriented Design''' - Each server provides a focused set of functionality&lt;br /&gt;
&lt;br /&gt;
'''Distributed Deployment''' - Services can be deployed across multiple machines for scalability&lt;br /&gt;
&lt;br /&gt;
'''Centralized Authentication''' - All services authenticate through the Service Locator&lt;br /&gt;
&lt;br /&gt;
'''Persistent Storage''' - Critical data persisted to MySQL for durability&lt;br /&gt;
&lt;br /&gt;
'''Real-time Updates''' - Services publish updates to subscribed clients&lt;br /&gt;
&lt;br /&gt;
== Service Categories ==&lt;br /&gt;
=== Infrastructure Services ===&lt;br /&gt;
&lt;br /&gt;
'''[[Service Locator]]''' - Centralized authentication, account management, and service discovery&lt;br /&gt;
&lt;br /&gt;
'''[[Uid Server]]''' - Generates unique identifiers for orders and other entities&lt;br /&gt;
&lt;br /&gt;
=== Account &amp;amp; Administration ===&lt;br /&gt;
&lt;br /&gt;
'''[[Administration Server]]''' - Manages account roles, entitlements, risk parameters, and trading permissions&lt;br /&gt;
&lt;br /&gt;
'''[[Web Portal]]''' - Web-based interface for account management and administrative tasks&lt;br /&gt;
&lt;br /&gt;
=== Market Data ===&lt;br /&gt;
&lt;br /&gt;
'''[[Definitions Server]]''' - Provides reference data (countries, currencies, venues, trading schedules)&lt;br /&gt;
&lt;br /&gt;
'''[[Market Data Server]]''' - Receives, sequences, and persists market data from feed clients&lt;br /&gt;
&lt;br /&gt;
'''[[Market Data Relay Server]]''' - Load-balanced distribution of market data to end users&lt;br /&gt;
&lt;br /&gt;
'''[[Charting Server]]''' - Processes time series queries for candlestick and technical analysis data&lt;br /&gt;
&lt;br /&gt;
=== Trading Controls ===&lt;br /&gt;
&lt;br /&gt;
'''[[Compliance Server]]''' - Manages compliance rules and monitors violations&lt;br /&gt;
&lt;br /&gt;
'''[[Risk Server]]''' - Monitors profit/loss, enforces risk limits, manages account state transitions&lt;br /&gt;
&lt;br /&gt;
'''[[Order Execution Server]]''' - Routes orders to venues, tracks execution, enforces controls&lt;br /&gt;
&lt;br /&gt;
== Common Operational Patterns ==&lt;br /&gt;
All servers follow consistent operational patterns:&lt;br /&gt;
&lt;br /&gt;
Configuration via YAML files&lt;br /&gt;
&lt;br /&gt;
Setup scripts for generating configurations&lt;br /&gt;
&lt;br /&gt;
Standard start/stop/check scripts&lt;br /&gt;
&lt;br /&gt;
Timestamped log files in logs/ directory&lt;br /&gt;
&lt;br /&gt;
PID-based process management&lt;br /&gt;
&lt;br /&gt;
== System-Wide Management ==&lt;br /&gt;
In addition to individual server management scripts, the platform provides aggregate scripts for managing all servers collectively.&lt;br /&gt;
&lt;br /&gt;
=== install.sh ===&lt;br /&gt;
The &amp;lt;code&amp;gt;install.sh&amp;lt;/code&amp;gt; script is designed for Ubuntu Server LTS and performs a complete system installation including:&lt;br /&gt;
* Installing system dependencies (build tools, MySQL, Node.js, Python packages)&lt;br /&gt;
* Building all server applications&lt;br /&gt;
* Configuring MySQL database and creating the spire schema&lt;br /&gt;
* Creating service accounts in the Service Locator&lt;br /&gt;
* Setting up initial permissions and directory structure&lt;br /&gt;
* Configuring all servers with appropriate network settings&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./install.sh -p [password] [options]&lt;br /&gt;
&lt;br /&gt;
Required:&lt;br /&gt;
  -p    Password for Spire services&lt;br /&gt;
&lt;br /&gt;
Optional:&lt;br /&gt;
  -u    MySQL username (default: spireadmin)&lt;br /&gt;
  -m    MySQL password (default: same as -p)&lt;br /&gt;
  -i    Global network interface (default: auto-detected)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The installation script automatically creates service accounts for all servers and assigns them to the appropriate permission groups.&lt;br /&gt;
&lt;br /&gt;
=== setup.py ===&lt;br /&gt;
The &amp;lt;code&amp;gt;setup.py&amp;lt;/code&amp;gt; script configures all servers by propagating common settings across individual server configurations:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python setup.py [options]&lt;br /&gt;
&lt;br /&gt;
Optional:&lt;br /&gt;
  --local            Local network interface&lt;br /&gt;
  --world            Global/public network interface&lt;br /&gt;
  --address          Service Locator address&lt;br /&gt;
  --password         Service account password&lt;br /&gt;
  --mysql_address    MySQL server address&lt;br /&gt;
  --mysql_username   MySQL username&lt;br /&gt;
  --mysql_password   MySQL password&lt;br /&gt;
  --mysql_schema     MySQL schema name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script calls each server's individual setup script with appropriate parameters, ensuring consistent configuration across the platform.&lt;br /&gt;
&lt;br /&gt;
=== start.sh ===&lt;br /&gt;
The &amp;lt;code&amp;gt;start.sh&amp;lt;/code&amp;gt; script starts all servers in dependency order:&lt;br /&gt;
&lt;br /&gt;
# Service Locator&lt;br /&gt;
# Uid Server&lt;br /&gt;
# Definitions Server&lt;br /&gt;
# Administration Server&lt;br /&gt;
# Market Data Server&lt;br /&gt;
# Market Data Relay Server&lt;br /&gt;
# Charting Server&lt;br /&gt;
# Compliance Server&lt;br /&gt;
# Order Execution Server&lt;br /&gt;
# Risk Server&lt;br /&gt;
# Web Portal&lt;br /&gt;
# Market Data Feed Client&lt;br /&gt;
&lt;br /&gt;
After starting all servers, the script automatically runs &amp;lt;code&amp;gt;reset_risk_states.py&amp;lt;/code&amp;gt; to initialize risk state for the trading session.&lt;br /&gt;
&lt;br /&gt;
=== stop.sh ===&lt;br /&gt;
The &amp;lt;code&amp;gt;stop.sh&amp;lt;/code&amp;gt; script gracefully stops all servers in reverse dependency order, ensuring that dependent services shut down before the services they depend on.&lt;br /&gt;
&lt;br /&gt;
=== check.sh ===&lt;br /&gt;
The &amp;lt;code&amp;gt;check.sh&amp;lt;/code&amp;gt; script verifies that all servers are running and reports the status of each service. It exits with a non-zero status if any server is not running, making it suitable for monitoring and health check automation.&lt;/div&gt;</summary>
		<author><name>Kamal</name></author>
		
	</entry>
</feed>