资源算法catalyst

catalyst

2020-01-06 | |  61 |   0 |   0

Catalyst

Build StatusMaven Central

WebsiteGoogle GroupJavadocAtomixCopycat

Catalyst is an I/O and serialization framework designed for use in Atomix, Copycatand 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 andJackson 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


上一篇:catalyst-runtime

下一篇:Capsule-Networks-Chinese-Tutorial

用户评价
全部评价

热门资源

  • TensorFlow-Course

    This repository aims to provide simple and read...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • mxnet_VanillaCNN

    This is a mxnet implementation of the Vanilla C...

  • vsepp_tensorflow

    Improving Visual-Semantic Embeddings with Hard ...

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...