Client-Threads Proposal

  1. userinteraction: (may be split into input and output thread) input from and output to the user:

    • Input is parsed by the ui-elements (buttons, menus, viewport....) which post messages to the global event queue.

    • Screen-output is constantly refreshed (is needed for client-side-animation)

    • Data is read from the local database

  2. player:

    Logs in to WorldForge-server, stores player-id to disk...., interprets userinput from global event queue, sends action commands to the server (or client-agent)

  3. database:

    Refreshes and sorts game-data, which it receives from the server (or client-agent) takes user-commands from the event queue.

  4. media-cache (or media-provider)

    Tries to get stuff from the media-server, meanwhile it supports default-media (is asked from db to get new grafx, sounds, is asked by the userinteraction-thread to provide grafx- and sound-data)

  5. main-loop

    • Fire up everything in given order.
    • Exception handling ?
    • Shut down cleanly.
    • Provide event queue

    Integrating CORBA should not be too hard, since it is already multi-threaded.

Karsten