Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Introducing SpaceBase and Galaxy  (Read 2895 times)
0 Members and 1 Guest are viewing this topic.
Offline pron

Junior Devvie

Medals: 4

« Posted 2012-08-11 01:08:58 »

Hi! I'm a long-time lurker and a very occasional poster on these forums, but I'd like to introduce some of the things I've been working
on for the last few years, that I think will be of interest to many here.

The first is a new server-side middleware product for MMO games called SpaceBase ( To MMO games, SpaceBase is two things: a low-latency 2D/3D spatial data store, and a concurrency/parallelization framework.
At the heart of SpaceBase is a state-of-the-art non-degrading and highly concurrent variant of the R-Tree that's the core of the spatial data store. Unlike other spatial databases, SpaceBase is especially designed for tracking objects that are constantly moving. You put your game objects into SpaceBase, update them as they move, and perform region queries or spatial joins (say, for broad-phase collision detection). A single update takes ~15us, and a region query (returning ~5 objects out of 2 million) takes ~1.5us. That's in terms of latency. In terms of throughput, because the underlying data-structure is highly-concurrent, you get nearly linear scalability with the number of threads (depending on how much they trample on each other spatially). In addition, SpaceBase can parallelize even a single query using the fork/join framework.
The other use for SpaceBase is as a concurrency/parallelization framework. If you write your game's server not as a game loop, but in an event-based manner, you can pass your game logic, physics simulation, AI, etc., as callback to SpaceBase transactions/queries, and SpaceBase will execute them in the fork/join threadpool managed by SpaceBase, taking care of all synchronization for you. SpaceBase employs both lock-free techniques to minimize contention and cache-faults, as well as locks especially built to work hand-in-hand with fork/join for long-running transactions. Those locks don't reschedule threads but, rather, reschedule fork/join tasks.
SpaceBase is implemented in Java and is intended to run embedded in the game process. It is proprietary, but we'll gladly send evaluation copies to anyone who wants to try it out.

The other project I'd like to introduce is an open-source in-memory data grid called Galaxy ( In the near future SpaceBase will be able to run on top of Galaxy to scale horizontally in a cluster. But even when used without SpaceBase, Galaxy can be of use to MMO serveres that require horizontal scaling. Unlike all other IMDGs (Ehcache, Gigaspaces, Infinispan, Gemfire, Coherence, Hazelcast) that use a distributed hash-table (DHT) approach, Galaxy employs a software implementation of a cache-coherence protocol similar to the ones used to coordinate L1 caches in CPUs.
DHTs partition their objects based on their key's hash, so for every object they quickly know which node it resides on. They have a worst-case scenario of 1 network hop per object access, but that's the common case as well. Galaxy takes a completely different approach. It migrates objects from node to node as requested. The result is that while the worst case for an object access can be more than 1 network hop, the common case is 0 hops.
Galaxy is meant to serve as a platform for building distributed data-structures. For example, when SpaceBase runs on top of Galaxy, as the objects move in space, they also migrate from one cluster node to another, keeping nearby objects on the same node, while trying to maintain a similar number of objects per node. The result is a dynamically expanding/shrinking "region" nodes.
This blog post explains the reasoning behind Galaxy's architecture:, and this three-part series describes Galaxy's implementation in detail:
Galaxy is distributed under the LGPL, and is still considered experimental. You can find it on GitHub here:

I would love to get your feedback!
Offline Ultroman

JGO Knight

Medals: 25
Projects: 1

Snappin' at snizzes since '83

« Reply #1 - Posted 2012-08-11 15:49:48 »

Both products sound wonderfully adept. I'd love to use them one day when I'm making an MMO. Do you have a company website I can log away for the future?

- Jonas
Offline pron

Junior Devvie

Medals: 4

« Reply #2 - Posted 2012-08-11 20:25:00 »

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ags1

JGO Kernel

Medals: 356
Projects: 7

Make code not war!

« Reply #3 - Posted 2012-08-11 20:29:12 »

That's all a bit too deep for me, but good luck anyway!

Offline pron

Junior Devvie

Medals: 4

« Reply #4 - Posted 2012-08-12 03:53:02 »

That's all a bit too deep for me, but good luck anyway!

 Smiley Thanks!

... and just to make things simpler: SpaceBase lets you track lots of moving objects, query them very quickly, and helps with making your game multithreaded.
(and Galaxy will help scaling MMOs seamlessly in a cluster, but it's a very low-level framework that requires building a lot on top of it).
Offline theagentd
« Reply #5 - Posted 2012-08-12 12:16:22 »

Very interesting. I assume SpaceBase is not free?

To receive an evaluation copy, email: ...

I do not have multiple servers (barely one scavenged). Is SpaceBase (or Galaxy) still suitable for me?

This preview version of SpaceBase is single-node only.
Is that the only limitation? I assume I can't use it for commercial purposes without a license.

Offline pron

Junior Devvie

Medals: 4

« Reply #6 - Posted 2012-08-12 20:26:42 »

I do not have multiple servers (barely one scavenged). Is SpaceBase (or Galaxy) still suitable for me?

SpaceBase absolutely is. Galaxy is only necessary when you want to cluster SpaceBase or any other component of your game (and is not yet production ready).

SpaceBase isn't free, but we do offer startup pricing. As for the evaluation version - it is time-limited.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Ecumene (57 views)
2017-09-30 02:57:34

theagentd (80 views)
2017-09-26 18:23:31

cybrmynd (187 views)
2017-08-02 12:28:51

cybrmynd (185 views)
2017-08-02 12:19:43

cybrmynd (192 views)
2017-08-02 12:18:09

Sralse (203 views)
2017-07-25 17:13:48

Archive (767 views)
2017-04-27 17:45:51

buddyBro (902 views)
2017-04-05 03:38:00

CopyableCougar4 (1452 views)
2017-03-24 15:39:42

theagentd (1328 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!