Mastering Queues