Publishing the Facts to the Server

The Service Performance Manager provides a set of Client APIs to publish facts to the server.

Procedure

  1. First, the client applications connect to the server for defining the schema model and for submitting facts. The server then performs aggregations based on user-defined schema or cubes.

    To acquire a connection to the server from the factory, the client applications use the following well-defined properties:

    RtaConnectionFactory connectionFac = new
    RtaConnectionFactory();
    Map<ConfigProperty, PropertyAtom<?>> configurationMap = new HashMap<ConfigProperty, PropertyAtom<?>>(); // put all the client properties in this map
    RtaConnection connection = connectionFac.getConnection("server_url","user_name", "password", configurationMap);
  2. RtaSession is a logical layer for interacting with the server. It provides Query service and FACT submission service

    To get a session, set the well-defined properties using the ConfigProperty, and create a session from the connection.

    RtaSession session = connection.createSession("session_name", configurationMap);
    session.init();
    Note: If a session operation is called before init() is successfully completed, the caller thread is blocked.
  3. Create an instance for this measurement as follows:
    RtaSchema schema = session.getSchema("AMX-Schema");
    Fact fact = schema.createFact();
    
  4. Set various attribute values that map to the defined dimensions as follows:
    fact.setAttribute(“Environment", "ENV1");
    fact.setAttribute(“Application", "BookingService");
    fact.setAttribute(“ServiceName", "SeatAvialibility");
    fact.setAttribute(“HitCount", 1);
  5. Publish the fact:
    session.publishFact(fact);