1. A server for exchanging messages over a distributed system, comprising: a message broker configured for encapsulating and exchanging messages among a plurality of clients and servers using incompatible protocols; a storage device for storing a resource, said resource containing markup source and at least one instruction for calling a message broker to communicate the message to an application at an application server; and a preprocessor configured for preprocessing the resource in response to a communication from a user agent specifying the resource, said preprocessing including: in response to executing the at least one instruction, calling the message broker based on the communication to communicate the message to the application at the application server in a protocol not supported by the user agent; generating markup based on the markup source contained in the resource; and sending the generated markup to the user agent.