Skip to content
This repository has been archived by the owner on Apr 15, 2018. It is now read-only.
/ catalyst Public archive

Networking and buffer APIs and implementations for use in Copycat and Atomix

License

Notifications You must be signed in to change notification settings

atomix/catalyst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catalyst

Build Status Maven Central

Catalyst is an I/O and serialization framework designed for use in Atomix, Copycat and related projects. It provides high-level abstractions for common storage and networking facilities.

I/O

Catalyst provides a buffer abstraction over on-heap and off-heap memory, memory mapped files, and RandomAccessFile:

Buffer buffer = HeapBuffer.allocate(128);
buffer.writeLong(1).writeByte(2);

Messaging

Catalyst provides an abstraction for asynchronous message-based networking that allows different frameworks to be substituted for communication in Copycat and Atomix:

Transport transport = NettyTransport.builder()
  .withThreads(4)
  .build();

Client client = transport.client();
client.connect(new Address("localhost", 8888)).thenAccept(connection -> {
  connection.send("Hello world!");
});

Serialization

Catalyst provides a binary serialization abstraction designed to support a variety of frameworks and use cases. Serializers include support for primitives, collections, Serializable, Externalizable, and Kryo and Jackson serializers.

Serializer serializer = new Serializer();
serializer.register(MyJacksonSerializable.class, GenericJacksonSerializer.class);

Buffer buffer = serializer.writeObject(new MyJacksonSerializable());
buffer.flip();
MyJacksonSerializable object = serializer.readObject(buffer);

For more extensive documentation see the website

About

Networking and buffer APIs and implementations for use in Copycat and Atomix

Resources

License

Stars

Watchers

Forks

Packages

No packages published