Nanosai Mem Ops (Java): Memory Manager/Allocator for Highly Resilient Distributed Systems
Tags: Technology, Distributed Systems, Java, Programming, Open Source

What Is Mem Ops?

Mem Ops (Java) is a small toolkit for allocating and deallocating byte arrays for use in software that requires steady state memory consumption. By steady state, we mean that the total amount of memory stays either constant, or very near constant, and where there are as few and short garbage collection pauses as possible.

Typical use cases for Mem Ops are inside a server that receives and sends thousands of messages per second, or inside a data streaming engine that needs to process gigabytes of data per second — both of which are use cases we intend the Nanosai ecosystem to support.

Mem Ops works by allocating one big byte array from which you can allocate smaller blocks (sections) for storing a block of bytes, e.g. an incoming or outgoing message, or a data block from a disk, etc.

When you are done using the block you explicitly free it again so Mem Ops knows that this section can now be reused. Mem Ops is capable of defragmenting the big byte array, either immediately when blocks are freed, or you can trigger the defragmentation (garbage collection) when your system has time available.

The reason we’re releasing Mem Ops before any of our other (probably more exciting building blocks) is that getting memory management right is crucial for a high performance, high resilience system. So crucial that we have even taken memory management into consideration when designing the core binary data format for our ecosystem.

What Next For Nanosai?

Just over two years ago we made a bold statement about democratizing distributed systems in this post. Well that was Nanosai 1.0!:) After years of challenging and exciting distributed systems research, proof of concept prototyping, evaluation of use cases, and a longer period in private beta — we are finally gearing up with Nanosai 2.0 and ready to start sharing our results with the open source community, starting with Mem Ops.

The goal of our research has been to create a highly coherent, high performance, high resilience, high flexibility, high versatility distributed systems ecosystem. We have now reached a point where the core of this ecosystem has stabilized so much that we can start releasing it. By “stabilized” we mean that the core of the ecosystem meets our requirements for high performance, resilience, flexibility, versatility, usability, testability, etc. — within the first use cases we have decided to focus on.

Additionally, we can see how this core can be extended naturally to support many other existing use cases, and many future new, exciting use cases we have come up with during this research. We have made enough half-kept promises in the past already. Therefore, rather than listing a long set of use cases our ecosystem will support in the future, we will focus on releasing one building block at a time and explain in detail what this building block does, which need it addresses, and why it is designed the way it is.

As we release more building blocks, the vision behind the ecosystem will become more and more clear to you. Once you start “getting it”, we feel confident you will get as excited as we are. Until then, please bear with us. It takes a while to create documentation that properly conveys our ideas. It takes time to polish the prototypes enough for them to be ready for production use. But we are willing to bet our time and effort that it will be worth the wait!:)

In future posts, we’ll share more concrete examples of how our fintech project Kähler AI (in — semi-stealth) is bringing real-time intelligence to the OTC equity-linked derivatives market with the help of Mem Ops and other open source toolkits from Nanosai.com.

Posted by Bambordé Baldé, Co-Founder | Twitter: @cloudbalde | LinkedIn: linkedin.com/in/bambordé|