{"repo":"grandecola/bigqueue","free":true,"listed":false,"github":"https://github.com/grandecola/bigqueue","clone":"git clone https://github.com/grandecola/bigqueue.git","description":"Embedded, Fast and Persistent bigqueue implementation","language":"Go","stars":453,"topics":["queue","golang","persistence","bigqueue","embedded"],"license":"MIT","category":"dev-tools","readme_excerpt":"bigqueue bigqueue provides embedded, fast and persistent queue written in pure Go using memory mapped ( mmap ) files. bigqueue is now thread safe as well. Installation Requirements Only works for linux and darwin OS Only works on Little Endian architecture Usage Standard API Create or open a bigqueue: bigqueue persists the data of the queue in multiple Arenas. Each Arena is a file on disk that is mapped into memory (RAM) using mmap syscall. Default size of each Arena is set to 128MB. It is possible to create a bigqueue with custom Arena size: Bigqueue also allows setting up the maximum possible memory that it can use. By default, the maximum memory is set to [3 x Arena Size]. In this case, bigqueue will never allocate more memory than 4KB 10=40KB . This memory is above and beyond the memory used in buffers for copying data. Bigqueue allows to set periodic flush based on either elapsed time or number of mutate (enqueue/dequeue) operations. Flush syncs the in memory changes of all memory mapped files with disk. This is a best effort flush . This is how we can set these options: In this case, a flush is done after every two mutate operations. In this case, a flush is done after one minute elapses and an Enqueue/Dequeue is called. Write to bigqueue: bigqueue allows writing string data directly, avoiding conversion to []byte : Read from bigqueue: we can also read string data from bigqueue: Check whether bigqueue has non zero elements: Advanced API bigqueue allows reading data from","default_branch":null,"files":null,"tree":[],"storefront":"/r/grandecola","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/grandecola/bigqueue/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}