Publishing the Facts to the Server
The Service Performance Manager provides a set of Client APIs to publish facts to the server.
Procedure
-
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);
-
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();
-
Create an instance for this measurement as follows:
RtaSchema schema = session.getSchema("AMX-Schema"); Fact fact = schema.createFact();
-
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);
-
Publish the fact:
session.publishFact(fact);
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.