Architecture
Overview of the Architecture
The Build architecture consists of a centralized server and distributed agents. The server provides a data store, user interface, and coordinates agents among other things. All build activities occur on agents, and agents act only when the server tells them to.
The Build server consists of a service tier and a data tier. The service tier consists of a central server that provides a web server front-end and core services, such as workflow, agent management, security, and others. A service can be thought of as a self-contained mechanism for hosting a piece of processing logic. The server orchestrates builds with agents that are distributed throughout the network. The server exposes several interfaces. The first is a web user interface that is exposed through HTTP or HTTPS and is primarily used by users with browsers. Web services use HTTP or HTTPS and are primarily used by agents for some types of communications, and for integrations with external tools. The last interface is used for server-agent communication and is done with JMS (discussed later) and uses TCP/IP.
Architectural overview

JMS server-agent communication and associated web services are stateless forms of communication. "Stateless," as used here, means that the server retains little session information between requests and each request contains all the information that is required to handle it. With this setup, the communication system performs well without a lot of resource overhead.
Server-agent communication is used to send work to agents and the results back to the server. Because JMS connections are persistent and are not based on a request-response protocol, Build does not have to continually open and close connections. With persistent connections, the server can communicate with agents at any time while it remains secure and scalable. The server listens on a port for agents to connect to it. For added security, agents do not listen on ports and make connections to the server only to provide two-way communication. This arrangement simplifies firewall configuration because all connections are initiated in one direction, from the agent to the server.
Many services in Build are exposed as REST-type (representational state transfer) web services. These services are used to send and receive information over HTTP or HTTPS. The information can be formatted in XML or JavaScript Object Notation (JSON). The REST-style services are stateless and ensure that requests include all the data that the server requires to respond coherently.
The data tier stores information in a relational database and on the file system. The
data tier's relational database stores configuration and run time data. The data tier's file store
contains log files and build artifacts. Artifacts are stored in a system that is called CodeStation,
which is also a dependency management system. CodeStation stores the build artifacts in a
content-addressable storage format that minimizes storage requirement by not storing the same files
multiple times. By default, file storage is contained in the var directory of the
server installation. The location of this storage can be changed with the server configuration, or
you can map the directory to a network addressable storage location.