Basic ring buffer impl