Abstraction Builder

Building simple and elegant programming abstractions

Big Array Tutorial

| Comments

This is a tutorial to show the basic API usage of big array, the source of this tutorial is here.

Big array is a building block of big queue, since big array is also a valuable data struture with unique feature, I decided to write a separate tutorial for it.

The interface of big array is here, basically, it’s simple and similar to a typical indexed array except that big array is an append only array, you can’t randomly append data in big array like typical array after allocation, you can only append data on head of the array, although you can randomly read data by index in big array after you append data to it.

You can create(initialize) a new big array in just on statement:

1
2
// create a new big array
IBigArray bigArray = new BigArrayImpl("d:/bigarray/tutorial", "demo");

the first parameter is a directory you want to store the array data file, the second parameter is the array name. Now you have a reference to an empty array.

Big Queue Tutorial

| Comments

This is a tutorial to show the basic API usage of big queue, the source of this tutorial is here.

The interface of big queue is here, basically, it’s as simple as the queue interface we learned in data structure course in college, if you want to refresh the concept of queue ADT, here is the wikipeida link.

You can create(initialize) a new big queue in just one statement:

1
2
// create a new big queue
IBigQueue bigQueue = new BigQueueImpl("d:/bigqueue/tutorial", "demo");

the first parameter is a directory you want to store the queue data file, the second parameter is the queue name. Now you have a reference to an empty queue.

The Design of a Big, Fast, and Persistent Queue

| Comments

Why a Big Queue?

This is a big data era, we are always facing challenge to find insights in big data. Last time, I have worked on the architecture and design of a large scale logging, tracing, monitoring and analytics platform, the core of the platform is a log collecting system and the core of the collector is a big queue, see figure below: