A simple ring buffer