fixed-length-queue This is just modularizing about the gist by Ben Nadel. If you want more details about implementation, check this post. Thank you, Ben.