Was wondering what would be the most effcient in memory data strucuture would be for a Theater seating plan and rendering that in a graphical form on screen for the user.
This came up as a converstation at work as we are looking at booking systems and there is a type of booking that we need to cater for that is outside of the rest of the type of booking that we need to do.
So - take for granted that the data is a database and that is the persitant store. The discussion is based on the need to efficient display this on screen as a coherant seating plan and record the state of the seat after payment for that seat within the organisation.
300+ in company user environment with the need for Public webSite for self booking.
Concurrency would be catered for in the website side - like checking the current state and timeout if reservation not continued or payment failed.
Scenario
So a customer calls the agent loads the seating plan. The page gets the information form the database and then draws the state of each seat according to the plan on screen. After some discussion about what is available the customer askes to book and pay for j56,j57,j58.
Looks like some form of Array made of Bytes, if drawn each time. ? Would this be efficient?
Alternatives looking at is static WPF app with these seating plan already and populating that from the data.
But thought that I would ask here just for sanity.
Rules.
- The main plan is 26 rows of 100 seats
- Each row is alphabetical
- Each set is sequential from 1 through to 100
- The seat has the following states
- Empty
- Reserved Not paid
- Reserved Not paid by member
- Paid
- Paid member rate