• Stars
    star
    341
  • Rank 123,998 (Top 3 %)
  • Language
    Java
  • License
    GNU Lesser Genera...
  • Created over 12 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A cache-coherent in-memory data grid

Galaxy
A cache-coherent in-memory data grid

Build Status Dependency Status Version License License

Galaxy is an in-memory data-grid. It's main function is to distribute data objects (stored as simple byte arrays) among cluster nodes for distributed processing. It also provides point-to-point messaging with guaranteed delivery and guaranteed ordering, as well as a cluster configuration management service.

Galaxy Features and Architecture

  • RAM storage and code/data co-location Application code runs on the same cluster nodes (called peer nodes), and processes the data objects which are kept in RAM.

    Unlike other IMDGs that partition data items and distribute them in such a way that each object is the responsibility of a single node, Galaxy nodes exchange messages to transfer ownership of objects from one node to another. This means that if the application code in one of the nodes regularly updates some data items, those items will be owned by the node, and will be available for processing and update without any network I/O. As the application runs, items will migrate from one node to another (though items can reside on several nodes at once for read-only access). This gives the application precise control over the location of the data in the cluster for maximum performance.

    This flexibility, however, is suitable when data access patterns can be predicted and so the data can be optimally placed. If data access is random, other IMDGs may be a better choice as they can retrieve or update any item at a cost of one network hop, while Galaxy might need to search the cluster for an unexpected item access.

    Because the application code is co-located with the data, and because all of the data is kept in RAM, Galaxy is suitable for low-latency applications.

  • Consistency Galaxy stores data in a fully consistent manner, meaning that if data item B has been modified after a change to data item A, no node in the cluster will see A's new value but B's old one.

    Galaxy achieves consistency by using a cache-coherence protocol similar to the protocols used to coordinate memory access among CPU cores. However, as Galaxy can guarantee the ordering of coordination messages between nodes no memory-fence operations are requires (as they are in CPUs) to achieve consistency.

  • Disk persistence and server nodes The data items can optionally be persisted to disk on one or more special server nodes.

    However, in order to keep latency low, Galaxy (even when configured to use a persistent server node), is not durable. This means that a failure in one or more of the nodes may result in a permanent loss of some recent updates. However, even in cases of such failures the data remains consistent, meaning the lost updates will be lost to all of the nodes (or to none).

  • High Availability Galaxy can withstand a failure in one or more of the nodes, providing high-availability. This is achieved by either running Galaxy with a server node (which persists all of the grid data to disk) or by running a slave node (or more) for each of the peers, or both.

    If only a server node is used, data is not lost when a peer node fails (except for possibly some recent updates as explained above), and all the data items owned by the failed node are still accessible. However, as the server reads those items from the disk, latency might suffer until all items have been accessed by the peers and kept in RAM.

    Alternately, or in combination with a server, you can run one or more slave-nodes for each of the peers, that mirror the data stored in them, so that upon failure of a peer, one of its slaves will take over, already having all of the necessary data items in RAM.

    A server node may also have slaves that will take over when it fails.

  • Messaging Galaxy provides a point-to-point messaging service that guarantees message delivery and ordering. A message can be sent to a known node or to the unknown (to the application) owner of a given data item. So if Galaxy's data-item migration makes moving data to code simple, Galaxy's messages make moving an operation (code) to data just as simple.

    The application messages are delivered by the same communication channel that delivers Galaxy's internal coherence protocol messages, so messages are also guaranteed to be ordered with data operations. Say that node A updates data item X, and then sends a message to the owner of data item Y (which happens to be node B), as a result of which node B reads the value of X. In this case node B is guaranteed to read the value of X after the update done by A before sending the message.

  • Monitoring All of Galaxy's components are monitored to enable full diagnoses of failure or performance problems.

Galaxy's aim is to give the application full control over data location and processing in the grid, and in-order to provide maximal flexibility with a simple API, it is relatively low-level. It provides no query mechanism whatsoever, imposes no structure on the data (which is kept in memory and on disk as byte arrays), and provides no locking of elements to coordinate complex transactions among different threads on a single node (although each operation is atomic by itself). All of that must be provided by the application.

Documentation

The Galaxy documentation is found here.

Galaxy Internals

A series of blog posts detailing Galaxy's inner workings can be found here: part 1, part 2, part 3. This blog post contains an amortized cost analysis, in terms of network roundtrips, of a B+ tree distributed with Galaxy.

Getting Started

Galaxy releases can be downloaded here.

Mailing List / Forum

Galaxy's mailing list/forum is found on Goolge Groups here.

License

Galaxy is free software published under the following license:

Copyright (c) 2013-2014, Parallel Universe Software Co. All rights reserved.

This program and the accompanying materials are dual-licensed under
either the terms of the Eclipse Public License v1.0 as published by
the Eclipse Foundation
 
  or (per the licensee's choosing)
 
under the terms of the GNU Lesser General Public License version 3.0
as published by the Free Software Foundation.

More Repositories

1

quasar

Fibers, Channels and Actors for the JVM
Java
4,563
star
2

capsule

Dead-Simple Packaging and Deployment for JVM Apps
Java
1,149
star
3

pulsar

Fibers, Channels and Actors for Clojure
Clojure
910
star
4

comsat

Fibers and actors for web development
Java
598
star
5

javafs

Java filesystems as FUSE
Java
105
star
6

spaceships-demo

SpaceBase demo application: a simulation of tens of thousands of spaceships in battle
Java
94
star
7

timewarp

Virtual Time for the JVM
Java
61
star
8

comsat-examples

Comsat Examples
Java
48
star
9

capsule-shield

Container caplet
Java
35
star
10

photon

Java
27
star
11

extended-stacktrace

Enhanced stack traces for the JVM
Java
26
star
12

quasar-mvn-archetype

Java
25
star
13

capsule-maven

Runtime dependency-resolution caplet
Java
19
star
14

capsule-desktop

Make native executables out of capsules
Java
16
star
15

capsule-daemon

A caplet that will run a capsule as a daemon
Java
14
star
16

quasar-gradle-template

Java
13
star
17

capsule-demo

Java
13
star
18

capsule-osv

OSv Caplet
Java
9
star
19

CascadingFailureExample

Java
8
star
20

quasar-intro-jdk8

Groovy
7
star
21

quasar-codeswap-example

Quasar Actors Hot Code Swap Example
Java
7
star
22

comsat-gradle-template

Comsat Gradle template project
Java
6
star
23

capsule-secure

Launches a capsule in a Java sandbox
Java
6
star
24

comsat-mvn-archetype

Java
5
star
25

capsule-avatar-demo

JavaScript
4
star
26

capsule-gui-demo

Java
4
star
27

capsule-runnable-war

A Runnable-WAR Capsule Demo
Java
4
star
28

high-scale-lib

Java
4
star
29

capsule-docker

Docker Caplet
Java
3
star
30

JettyWebActor

Java
2
star
31

spaceships

SpaceBase technology demo
Java
2
star
32

quasar-intro-jdk7

1
star
33

jersey-connectors

Java
1
star
34

NIOQuasarTest

Java
1
star