A song and ad scheduler supporting clip-based and stream-based scheduling
of multimedia items generates several hours of schedule in advance.
Having multiple channel capability, the scheduler uses as inputs: the
channel, associated playlists associated, rotation pattern for the
channel, and associated programming rules to produce a schedule of
multimedia items for the channel. Initially, the scheduler produces a
schedule for each channel of predetermined length; then it periodically
revisits the channel to add more songs, keeping the schedule to the
desired length. Length of the initial playlist is configurable. The
scheduler uses a producer-consumer model for distributing work. Producer
threads periodically scan the system for work to be done. When a producer
thread encounters work to be done, e.g. adding to the schedule of a
channel, the producer thread places a work request into a queue. Worker
threads consume the work requests by fulfilling the requested work.