Modules are custom code that can be deployed inside Union Server. There are two types of modules: server modules and room modules.
Server modules add functionality to the entire server and are not associated with a specific room. For example, a server module might send an email to an administrator if the server's CPU usage exceeds 75%. Server modules are active for as long as the server is running. When the server is started, all server modules are also started; when the server is shut down, all server modules are destroyed.
Room modules add functionality to a room, and typically implement the logic for a particular application. For example, in a game of trivia a room module might advance questions and calculate scores. Each room module is associated with with a specific instance of a room, and is bound to that room's life cycle. When a room is created, its associated room modules are started; when a room is destroyed, its associated modules are also destroyed.