use custom ring buffer type instead of javascript arrays for underlying buffer storage