Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (206)
games submitted by our members
Games in WIP (781)
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 2425 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: 346
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

« JGO Bitwise Duke »

Medals: 914
Projects: 4
Exp: 8 years

« 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.

Galdo (255 views)
2017-01-12 13:44:09

Archive (423 views)
2017-01-02 05:31:41

0AndrewShepherd0 (882 views)
2016-12-16 03:58:39

0AndrewShepherd0 (820 views)
2016-12-15 21:50:57

Lunch (955 views)
2016-12-06 16:01:40

ral0r2 (1188 views)
2016-11-23 16:08:26

ClaasJG (1288 views)
2016-11-10 17:36:32

CoffeeChemist (1316 views)
2016-11-05 00:46:53

jay4842 (1400 views)
2016-11-01 19:04:52

theagentd (1214 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!