Insanely fast key value in memory store supporting local and shared remote caches on a server featuring a binary protocol for fast and effective access.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
client Rearrange code to meet default style. Jul 25, 2017
commons
example
server Rearrange code to meet default style. Jul 25, 2017
.gitignore
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#1) Jul 4, 2018
LICENSE
README.md
pom.xml

README.md

Seraphim

A simple and lightweight key-value in memory store built on top of https://github.com/D3adspaceEnterprises/skylla - Seraphim uses https://github.com/D3adspaceEnterprises/hawkings for local consumer management. The intention is to provide an easy to use in memory store for little network applications. You can also take a look at https://github.com/D3adspaceEnterprises/reincarnation if youre searching for a pub sub service.

Installation / Usage

  • Install Maven
  • Clone this repo
  • Install: mvn clean install

Maven dependencies

Client:

<dependency>
    <groupId>de.d3adspace</groupId>
    <artifactId>seraphim-client</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Server:

<dependency>
    <groupId>de.d3adspace</groupId>
    <artifactId>seraphim-server</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Commons:

<dependency>
    <groupId>de.d3adspace</groupId>
    <artifactId>seraphim-commons</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Example:

package de.d3adspace.seraphim.example;

import de.d3adspace.seraphim.server.SeraphimServer;

/**
 * @author Felix 'SasukeKawaii' Klauke
 */
public class SeraphimServerExample {
	
	public static void main(String[] args) {
		SeraphimServer seraphimServer = SeraphimServerFactory.createServer("localhost", 1337);
		seraphimServer.start();
	}
}


package de.d3adspace.seraphim.example;

import de.d3adspace.seraphim.CacheFactory;
import de.d3adspace.seraphim.cache.Cache;
import java.util.UUID;

/**
 * @author Felix 'SasukeKawaii' Klauke
 */
public class SeraphimClientExample {
	
	public static void main(String[] args) {
		Cache<UUID, UUID> cache = CacheFactory.connectToRemoteCache("localhsost", 1337);
		
		UUID uniqueIdKey = UUID.randomUUID();
		UUID uniqueIdValue = UUID.randomUUID();
		
		cache.put(uniqueIdKey, uniqueIdValue);
		
		System.out.println(cache.get(uniqueIdKey));
		
		cache.get(uniqueIdKey, new Consumer<UUID>() {
    			@Override
    			public void accept(UUID uuid) {
    				System.out.println(uuid);
    			}
    });	
	}
}