Skip to content

Architecture

Robert Ferris edited this page Apr 18, 2014 · 3 revisions

Bytefrog is comprised of two major components: the tracing agent (referred to as 'Agent') and the data collection and processing component (referred to as 'HQ'). There is a third component (referred to as 'common') that contains functionality shared by the entire system.

Agent

Agent is what actually performs the code tracing and instrumentation. It is purposefully kept as small as possible, since it is loaded into the application being traced as a Java agent, and as such, is written in Java only. Third party dependencies are kept to a minimum.

Agent is responsible for:

  • Handle communication with HQ
  • Instrument the requested classes with tracing calls, as they are loaded (Agent Instrumentation)
  • Handle sending trace data upstream to HQ
  • Send periodic heartbeats to give current status
  • Allow for basic execution and trace control

HQ

HQ is the component that handles collecting trace data from Agent, as well as keeping tabs on what is going on (via the heartbeats sent by Agent). Since HQ runs on its own JVM instance, there are fewer restrictions focused on keeping an extremely small footprint. HQ is written in Scala.

HQ is responsible for:

  • Handling communication with Agent
  • Sending various control messages to Agent to influence execution and trace state
  • Collecting trace data
  • Efficiently sorting and providing a framework for processing trace data in real time (Data Processing)
  • Monitoring the various components involved to make sure everything is functioning correctly

Common

Common is the shared component containing common functionality used by both Agent and HQ. Since Agent uses it, the restrictions we've placed on Agent are inherited here - namely keeping a small footprint with minimal third party dependencies and being written in Java.

Common provides the following shared functionality:

  • Configuration objects
  • Simple connection abstraction for connections between Agent and HQ
  • Message protocol implementations (Message Protocol)
  • Common message queueing/buffering APIs
Clone this wiki locally