Distributed system for ticket reservation