Design Air traffic control system


  • 1
    S

    You need to design an Air traffic control system with the use of object oriented concepts


  • 4
    S

    How to answer such questions pass the interview?

    I am not sure about above but I'd probably work from top to down and try to organize as much info as I can however time is limit in basically refining a design.

    Basically there're two main players

    1. airplane in the sky
    2. air traffic control unit on the ground

    Airplane -
    It has many components, but important one here are two

    1. pilot - one who is displacing the plane or changing its position
    2. air traffic control unit - the one that communicates with air traffic control system on the ground

    Pilot -
    It has couple of actions

    1. register - sends initial message to new air traffic control on the ground
    2. deregister - send final message to old air traffic control on the ground
    3. steer - move plane (but not relevant to this i suppose)

    Air Traffic Control Communication -

    1. updates its location - this happens either in loop continuously
    2. send message to air traffic control unit on ground - this happens again periodically in loop
    3. receive messages from air traffic control unit and send those back to pilot - happens periodically in loop (messages are either simple pings or some message)

    On the ground -

    Controller

    1. subscribes for registration / deregistration / urgent messages on global queue
    2. receive registration, send registration ack
    3. receive de-registration, send re-registration ack
    4. In response to registration spawn plane specific thread handling object

    ( one can discuss thread pool, database/data structure to maintain location and other info of plane)

    Worker:

    1. subscribes to messages on plane's queue
    2. subscribes to messages on a global queue
    3. update location database in response to periodic location update
    4. notifies registration message and exit

    Communication:

    1. A backend of radio. Implements message passing
    2. Receives and collects all messages and distributes them
    3. Messages are either registration, deregistration, urgent and location update
    4. Messages are put in different queues , each worker thread create its own queue when it registers for messages and subscribes for it.

    Control Unit on Plane

    1. subscribes for urgent messages from controller
    2. periodically sends location update
    3. Urgent messages directed to Pilot class
    4. unsubscribe from controller

    Pilot

    1. Sends registration, in response to ack, trigger Control Unit on Plane subscribe to new Controller
    2. Sends deregistration, in response to ack, trigger Control Unit on Plane unsubscribe from old Controller

    One can discuss message queue, subscription mechanism of IPC etc, DB, interfaces to GUI (if that counts)


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.