Skip to content
GigaSpaces Logo GigaSpaces Logo
  • Products
    • Our Products
      • eRAG
        • GenAI Catalyst
        • Instant Data
        • Respond Proactively
        • Act Autonomously
      • Smart DIH
      • XAP
    • Solutions for
      • Pharma
      • Procurement
    • vid-icon

      Conventional RAG Falls Short with Enterprise Databases

      Watch the Webinaricon
  • Solutions
    • Business Solutions
      • Digital Innovation Over Legacy Systems
      • Integration Data Hub
      • API Scaling
      • Hybrid / Multi-cloud Integration
      • Customer 360
      • Industry Solutions
      • Retail
      • Financial Services
      • Insurance Companies
    • vid-icon

      Massimo Pezzini, Gartner Analyst Emeritus

      5 Top Use Cases For Driving Business With Data Hub Architecture

      Watch the Webinaricon
  • How it Works
    • eRAG Technology Overview
      • AI-Ready, IT-Friendly
      • Semantic Reasoning
      • Questions to SQL Queries
      • Asked & Answered in Natural Language
      • Multiple Data Sources
      • Proactive AI Governance
    • vid-icon

      Ensure GenAI compliance and governance

      Read the Whitepapericon
  • Case Studies
    • By Use Case
      • Procurement
      • Operations
      • Budget Management
      • Sales Operations
    • By Industry
      • Logistics
      • Pharma
      • Education
      • Retail
      • Shipping
      • Energy
      • Hospitality
    • vid-icon

      Monkey See, AI Do - All about CUA

      Watch Webinaricon
  • Resources
    • Content Hub
      • Case Studies
      • Webinars
      • Q&As
      • Videos
      • Whitepapers & Brochures
      • Events
      • Glossary
      • Blog
      • FAQs
      • Technical Documentation
    • vid-icon

      Taking the AI leap from RAG to TAG

      Read the Blogicon
  • Company
    • Our Company
      • About
      • Customers
      • Management
      • Board Members
      • Investors
      • News
      • Press Releases
      • Careers
    • col2
      • Partners
      • OEM Partners
      • System Integrators
      • Technology Partners
      • Value Added Resellers
      • Support & Services
      • Services
      • Support
    • vid-icon

      GigaSpaces, IBM & AWS make AI safer

      Read Howicon
  • Book a Demo
  • Products
    • Our Products
      • eRAG
        • GenAI Catalyst
        • Instant Data
        • Respond Proactively
        • Act Autonomously
      • Smart DIH
      • XAP
    • Solutions for
      • Pharma
      • Procurement
    • vid-icon

      Conventional RAG Falls Short with Enterprise Databases

      Watch the Webinaricon
  • Solutions
    • Business Solutions
      • Digital Innovation Over Legacy Systems
      • Integration Data Hub
      • API Scaling
      • Hybrid / Multi-cloud Integration
      • Customer 360
      • Industry Solutions
      • Retail
      • Financial Services
      • Insurance Companies
    • vid-icon

      Massimo Pezzini, Gartner Analyst Emeritus

      5 Top Use Cases For Driving Business With Data Hub Architecture

      Watch the Webinaricon
  • How it Works
    • eRAG Technology Overview
      • AI-Ready, IT-Friendly
      • Semantic Reasoning
      • Questions to SQL Queries
      • Asked & Answered in Natural Language
      • Multiple Data Sources
      • Proactive AI Governance
    • vid-icon

      Ensure GenAI compliance and governance

      Read the Whitepapericon
  • Case Studies
    • By Use Case
      • Procurement
      • Operations
      • Budget Management
      • Sales Operations
    • By Industry
      • Logistics
      • Pharma
      • Education
      • Retail
      • Shipping
      • Energy
      • Hospitality
    • vid-icon

      Monkey See, AI Do - All about CUA

      Watch Webinaricon
  • Resources
    • Content Hub
      • Case Studies
      • Webinars
      • Q&As
      • Videos
      • Whitepapers & Brochures
      • Events
      • Glossary
      • Blog
      • FAQs
      • Technical Documentation
    • vid-icon

      Taking the AI leap from RAG to TAG

      Read the Blogicon
  • Company
    • Our Company
      • About
      • Customers
      • Management
      • Board Members
      • Investors
      • News
      • Press Releases
      • Careers
    • col2
      • Partners
      • OEM Partners
      • System Integrators
      • Technology Partners
      • Value Added Resellers
      • Support & Services
      • Services
      • Support
    • vid-icon

      GigaSpaces, IBM & AWS make AI safer

      Read Howicon
  • Book a Demo
  • Products
    • Our Products
      • eRAG
        • GenAI Catalyst
        • Instant Data
        • Respond Proactively
        • Act Autonomously
      • Smart DIH
      • XAP
    • Solutions for
      • Pharma
      • Procurement
  • Solutions
    • Digital Innovation Over Legacy Systems
    • Integration Data Hub
    • API Scaling
    • Hybrid/Multi-cloud Integration
    • Customer 360
    • Retail
    • Financial Services
    • Insurance Companies
  • How it Works
    • eRAG Technology Overview
      • AI-Ready, IT-Friendly
      • Semantic Reasoning
      • Questions to SQL Queries
      • Asked & Answered in Natural Language
      • Multiple Data Sources
      • Governance
  • Case Studies
    • By Use Case
      • Procurement
      • Operations
      • Budget Management
      • Sales Operations
    • By Industry
      • Logistics
      • Pharma
      • Education
      • Retail
      • Shipping
      • Energy
      • Hospitality
  • Resources
    • Webinars
    • Videos
    • Q&As
    • Whitepapers & Brochures
    • Customer Case Studies
    • Events
    • Glossary
    • FAQs
    • Blog
    • Technical Documentation
  • Company
    • About
    • Customers
    • Management
    • Board Members
    • Investors
    • News
    • Press Releases
    • Careers
    • Partners
      • OEM Partners
      • System Integrators
      • Technology Partners
      • Value Added Resellers
    • Support & Services
      • Services
      • Support
  • Pricing
  • Book a Demo

Building a Real-Time Trading Platform: Why GigaSpaces Outperforms Redis

151

Subscribe for Updates
Close
Back

BLOG

Building a Real-Time Trading Platform: Why GigaSpaces Outperforms Redis

Tal Doron
November 20, 2024 /
7min. read

The world of trading moves faster than ever, with millions of transactions occurring in fractions of a second. The entry of retail investors has added volatility to the markets, placing enormous demands on trading platforms to deliver real-time data access, process vast quantities of transactions, and provide uninterrupted service. During events like the GameStop frenzy of January 2021, platforms that could not meet this demand faltered, resulting in delayed portfolio updates, investor frustration, and lost trust.

While Redis Enterprise has been used to meet some real-time challenges, it falls short when platforms need high scalability, low-latency performance, and dynamic, complex data models. GigaSpaces’ Data Hub and XAP offer a superior alternative, combining a space-based architecture with in-memory data processing to ensure both technical excellence and business impact. Let’s explore why GigaSpaces is the better choice for building a resilient and high-performance trading platform.

Meeting Market Volatility and User Expectations

Modern trading platforms face twin challenges: high market volatility and evolving user expectations. When stock prices change every second and investors flood the platform, slowdowns or outages can erode trust and result in significant financial losses.

Investors expect real-time access to portfolio data, including:

  • Instant Portfolio Valuation: Reflecting up-to-the-second changes in security prices.
  • Real-Time Gain/Loss Calculations: Providing accurate insights into performance for timely decision-making.

To meet these expectations, platforms must handle:

  1. Continuous streams of real-time data from exchanges with high-speed updates.
  2. Concurrent access by millions of users checking and trading across diverse portfolios simultaneously.

Redis, a popular in-memory data store, is often promoted as a solution for real-time workloads. However, it struggles to manage the scale and complexity of modern trading applications:

  • Flat Data Models: Redis uses basic key-value, hash, and set data structures, limiting the ability to model complex financial relationships, such as nested portfolios or multiple trades within a security.
  • Manual Sharding and Scaling: Redis requires careful planning to manage sharding and partitioning, which becomes cumbersome as data volumes grow.
  • Network Overheads: Redis systems often involve multiple network hops for data retrieval, impacting latency in high-frequency trading environments.

Let's take a look at how a basic portfolio model would be implemented in Redis and compare it to the same model in GigaSpaces. In Redis, a portfolio with multiple securities must be split across several keys, each representing different attributes. For example:

# Adding securities to a portfolio
SADD portfolio:123 lot1 lot2

# Creating hashes for each lot
HMSET lot:lot1 ticker AAPL quantity 100 price 145.30
HMSET lot:lot2 ticker TSLA quantity 50 price 800.10

# Fetching all securities in the portfolio
SMEMBERS portfolio:123

# Retrieving details of each lot
HGETALL lot:lot1
HGETALL lot:lot2

This approach works but introduces several challenges:

  1. Multiple network hops: Fetching all lots and their attributes requires several operations.
  2. Data inconsistency risks: Operations across multiple keys can result in inconsistencies.
  3. Performance bottlenecks: Redis struggles with large-scale queries that span many keys.

With GigaSpaces, we can model the portfolio holdings with complex objects, meaning that the same portfolio can be modeled as a single object stored within the in-memory data grid. Here's how you can implement it:

@SpaceClass
public class Portfolio 

@SpaceClass
public class Security 

// Storing a portfolio in GigaSpaces
Portfolio portfolio = new Portfolio();
portfolio.setHoldings(List.of(
    new Security("AAPL", 100, 145.30),
    new Security("TSLA", 50, 800.10)
));
space.write(portfolio);

// Querying a portfolio from GigaSpaces
Portfolio result = space.readById(Portfolio.class, "123");

Advantages of GigaSpaces:

  • Reduced Complexity: All holdings are stored as part of a single portfolio object, eliminating the need for multiple keys and reducing query complexity.
  • Co-located Processing: Data resides where it's processed, reducing network latency and increasing query performance.

Consistency Guaranteed: GigaSpaces ensures atomic writes and updates, avoiding inconsistency risks found in Redis.

Real-Time Event Processing with GigaSpaces vs. Redis

Redis Streams can be used to handle real-time price updates:

# Adding a price update to the stream
XADD prices:stream * ticker AAPL price 145.50

# Reading from the stream
XREAD COUNT 1 STREAMS prices:stream 0

While Redis Streams offer basic event handling, scaling this model across multiple users and securities becomes complex, with network bottlenecks and manual sharding. Redis Streams also lack native support for complex processing logic.

In GigaSpaces, event-driven architecture is built-in, or native, making it easy to trigger real-time updates:

@EventDriven
public class PriceUpdateListener 

GigaSpaces Advantages:

  • Native Event Handling: Built-in support for distributed events simplifies real-time processing.
  • Co-located Data and Logic: Events are processed where the data resides, reducing latency.
  • Automatic Scaling: As more data flows through the system, GigaSpaces scales dynamically without manual intervention

Handling Market Surges: Why GigaSpaces is Ready for the Next GameStop

In an era where milliseconds make the difference between profit and loss, trading platforms cannot afford to rely on solutions that introduce latency, complexity, and inconsistency. Redis may work for simple caching use cases, but it falls short in the demanding, high-performance environment of real-time trading.

Imagine another sudden market surge. With Redis, manual intervention may be required to scale the system, risking service degradation. GigaSpaces, however, provides automated failover, self-healing capabilities, and dynamic scaling to handle such events seamlessly.

  • Tens of thousands of updates per second: GigaSpaces processes market feeds with minimal latency.
  • Uninterrupted service: High availability ensures platforms remain operational, protecting both investor trust and revenue.
  • Effortless scaling: Nodes can be added on the fly to meet demand, without manual configuration or downtime.

GigaSpaces, with its space-based architecture, in-memory data grid, and native event-driven processing, provides a superior alternative. By reducing operational complexity, ensuring seamless scalability, and delivering lightning-fast performance, GigaSpaces empowers trading platforms to meet the demands of today's markets and prepare for tomorrow's challenges.

Tags:

data architecture data hub risk management
Tal Doron

AVP, Head of Presales | Solution Architects Manager | Technical Sales Strategy | Advisory Board

In his current position as AVP Solution Architects at GigaSpaces Technologies, Tal manages a group of presales engineers (SA/SE) covering the Americas. Tal brings a wealth of experience and a proven track record of success in management, integration projects and highly dynamic and complex technical sales. Bridging the gap between business and technology, architecting and strategizing digital transformations from ideas to success with a strong business impact.

All Posts (20)

Share this Article

Subscribe to Our Blog



PRODUCTS & SOLUTIONS

  • Products
    • eRAG
    • Smart DIH
    • XAP
  • Our Technology
    • Semantic Reasoning
    • Natural language to SQL
    • RAG for Structured Data
    • In-Memory Data Grid
    • Data Integration
    • Data Operations by Multiple Access Methods
    • Unified Data Model
    • Event-Driven Architecture

RESOURCES

  • Resource Hub
  • Webinars
  • Q&As
  • Blogs
  • FAQs
  • Videos
  • Whitepapers & Brochures
  • Customer Case Studies
  • Events
  • Use Cases
  • Analyst Reports
  • Technical Documentation

COMPANY

  • About
  • Customers
  • Management
  • Board Members
  • Investors
  • News
  • Careers
  • Contact Us
  • Book A Demo
  • Try GigaSpaces For Free
  • Partners
  • OEM Partners
  • System Integrators
  • Value Added Resellers
  • Technology Partners
  • Support & Services
  • Services
  • Support
Copyright © GigaSpaces 2025 All rights reserved | Privacy Policy | Terms of Use
LinkedInXFacebookYouTube
Manage your privacy

To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.

Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Manage options
  • {title}
  • {title}
  • {title}
Manage your privacy
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Statistics

Marketing

Features
Always active

Always active
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Manage options
  • {title}
  • {title}
  • {title}
Skip to content
Open toolbar Accessibility Tools

Accessibility Tools

  • Increase TextIncrease Text
  • Decrease TextDecrease Text
  • GrayscaleGrayscale
  • High ContrastHigh Contrast
  • Negative ContrastNegative Contrast
  • Light BackgroundLight Background
  • Links UnderlineLinks Underline
  • Readable FontReadable Font
  • Reset Reset
  • SitemapSitemap

Hey
tell us what
you need

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

Hey , tell us what you need

You can unsubscribe from these communications at any time. For more information on how to unsubscribe, our privacy practices, and how we are committed to protecting and respecting your privacy, please review our Privacy Policy.

Oops! Something went wrong, please check email address (work email only).
Thank you!
We will get back to You shortly.