资源算法catalyst

catalyst

2020-01-06 | |  82 |   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

用户评价
全部评价

热门资源

  • DuReader_QANet_BiDAF

    Machine Reading Comprehension on DuReader Usin...

  • ETD_cataloguing_a...

    ETD catalouging project using allennlp

  • allennlp_extras

    allennlp_extras Some utilities build on top of...

  • allennlp-dureader

    An Apache 2.0 NLP research library, built on Py...

  • honk-honk-motherf...

    honk-honk-motherfucker