|
Search Solutions & Best Practices
Browse Solutions & Best Practices
|
OverviewThe Mirror Service is an essential component when persisting your data into the enterprise database. The Mirror Service delegates the IMDG activities into the database in a reliable asynchronous manner, allowing the application to access the data stored in-memory without having the database as part of the critical path of the transaction. When using the Mirror Service, the database performance and availability would not impact the application response time. The Mirror Service behavior is important for the stability of the application and the consistency of the data within the Database. With large scale application, you might want to monitor the Mirror Service behavior in real time. This means reacting in a timely fashion in case there is a need to intervene with its activity or related components that interacts with the Mirror Service (IMDG, Database). How the Mirror Monitor works?The Mirror Monitor utility gathers statistics about the Mirror Service behavior and exposes these via standard JMX Mbean. You may access this collected data using standard JMX viewers such as the JConsole utility comes with the JVM. The Mirror Monitor extends the built-in openspaces DefaultHibernateExternalDataSource, and collects statistics about the activities the mirror performs. You may log these statistics into a log file or/and access these by using the JMX API. The Mirror Monitor using the GigaSpaces Administration and Monitoring API to receive information about the current status of the replication redo log size of all the IMDG primary instances. When having multiple partitions for the IMDG, the redo log value exposed is a sum of all the IMDG primary instances current replication redo log size. This utility collecting stats about:
The Mirror Monitor includes the following:
How to use the Mirror Monitor?In order to use the Mirror Monitor with your application you should: <bean id="hibernateDataSource" class="com.gigaspaces.util.mirror.monitor.Mirror"> <property name="sessionFactory" ref="sessionFactory"/> <property name="spaceName" value="mySpace" /> <property name="ide" value="false"/> <property name="debug" value="false"/> <property name="displayStats" value="false"/> </bean> <os-core:space id="mirror" url="/./mirror-service" schema="mirror" external-data-source="hibernateDataSource" /> Properties List:
Viewing the Mirror StatisticsTo view the Statistics gathered by the Mirror monitor: 2. Move into the MBeans Tab and select the com.gigaspaces.util.mirror.monitor: 3.Select the Mirror Stats->Attributes: Double clicking any of the values, will display a graph that will be refreshed automatically. Without having the graph displayed, you will have to click the Refresh button manually to see the most updated values for each statistic. |
Additional resources: XAP Application Server | XAP Data Grid | XAP for Cloud Computing | XAP J2EE Support




