We made 2 subsystems inside Apache Ignite.
In the article I will tell about their architecture:
- How did the metrics subsystem and the system view subsystem.
- What has been done and what are we going to do?

Hello everyone! My name is Nikolai Izhikov. I work at Sberbank Technologies to develop Open Source products.
Note 1 : βdoneβ means that this functionality is available in master Apache Ignite , you can build and see how everything works. The functionality will be released in the 2.8 Apache Ignite release, which will be released in early 2020.
β¨ 2: , , Apache Ignite.
β¨ 3: 2.8, , - .
Apache Ignite in-memory . API: , , ( ), .
β¨, - . : " , ? , , ." :
- ? β , , .
- ? β , , : , , , . , .
- ? β .
- ? β " " β ?
.
:
- .
- β , .
- . : , .
- : , , , , .
, . , , . :
- API : transaction manager, cache manager, etc.
- .- API: JMX, SQL, Java. API.
:
- : , ? . , , , - . , .
- «» : , API.
- : jmx, sql, http(Prometheus) , , .
- : , .
Open Source community . , Ignite Enhancement Proposal (IEP), , , API, .
:
Ignite : , . , . , . , Ignite . , Ignite β . β . (prometheus, zabbix) .
Ignite . Ignite : jvm, , , . Ignite . , .
: β .
: , data region', .. , , .
: io.dataregion.myregion.TotalAllocatedPages
β Data Region "myregion".
:
Metric
, Gauge
β .MetricRegistry
β (, ) .MetricExporterSpi
β .ReadOnlyMetricRegistry
β , exporterβ-. read only access + listeners.GridMetricManager
β .
:
Metric
β . .
: LongAddterMetric
, DoubleMetricImpl
, ObjectMetricImpl
.Gauge
β . , Supplier. . , , .
: LongGauge
, DoubleGauge
, ObjectGauge
.HistogramMetric
β + . , .
: , 250 , 500 , 1 .HitRateMetric
β X .
: , .
MetricExporterSpi
β , . , . JMX, SQL, Log, OpenCensus.
GridMetricManager mmgr = ...;
MetricRegistry mreg = mmgr.registry("io.dataregion." + name);
LongAdderMetric replacedPages = mreg.longAdderMetric("PagesReplaced",
"Number of pages replaced from last restart.");
replacedPages.increment();
, " ?" .
.
System View β ?
β . system view, SQL. ( JMX).
SystemView
β (). : , , compute task', sql table . .SystemViewExporterSpi
β .ReadOnlySystemViewRegistry
β exporter'. read only access + listeners.GridSystemViewManager
β
:
- . , , - . .
- overhead. .
- . . .
: . java-. :
POJO. , . . . : reflection?
:
:
(SystemViewRowAttributeWalker.java), . . system view . .
ctx.systemView().registerView(CACHES_VIEW, CACHES_VIEW_DESC,
new CacheViewWalker(),
registeredCaches.values(),
CacheView::new);
ctx.systemView().registerView(CACHE_GRPS_VIEW, CACHE_GRPS_VIEW_DESC,
new CacheGroupViewWalker(),
registeredCacheGrps.values(),
CacheGroupView::new);
Reflection β , . dev-list JMH benchmark. reflection . walker . Walker 4 .
, " ?" .
- : , .
. - Β« Β» (prometheus, zabbix)
- . , . β .
- . Oracle , , : , , , .
- β Ignite , . . threshold Β«compute 30 Β», , .
- dev@ignite.apache.org
- user@ignite.apache.org
Come! We have almost a Russian-speaking community, almost all contributors are from Russia, so you can easily join and make a contribution to Open Source.
Material with an asterisk Presentation - https://www.highload.ru/moscow/2019/abstracts/6111
Video: