Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (491)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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 1486 times)
0 Members and 1 Guest are viewing this topic.
Offline pron

Junior Member


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 (http://paralleluniverse.co/product). 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 (http://puniverse.github.com/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: http://blog.paralleluniverse.co/post/26909672264/on-distributed-memory, and this three-part series describes Galaxy's implementation in detail: http://blog.paralleluniverse.co/tagged/galaxy-internals
Galaxy is distributed under the LGPL, and is still considered experimental. You can find it on GitHub here: https://github.com/puniverse/galaxy

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 Member


Medals: 4



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

Sure: http://paralleluniverse.co/
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ags1

JGO Ninja


Medals: 55
Projects: 2
Exp: 5 years


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 Member


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).
Online theagentd
« Reply #5 - Posted 2012-08-12 12:16:22 »

Very interesting. I assume SpaceBase is not free?

Quote
To receive an evaluation copy, email: ...

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


EDIT:
Quote
X. DISTRIBUTING SPACEBASE
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.

Myomyomyo.
Offline pron

Junior Member


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.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (29 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (48 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!