Cluster your MicroProfile Application using CDI and JCache
summary
Builds a clustered MicroProfile service by adding Hazelcast as JCache provider and a small CDI extension and producers to inject javax.cache.Caches directly, turning JAX-RS + CDI endpoints into cached methods via @CacheResult/@CachePut. Demo runs across Dockerized Raspberry Pis with HAProxy, MySQL and TomEE (Tomitribe), pushes metrics to Elasticsearch/Kibana, and serves ~9,372 read requests from cache so DB calls drop, average response ~0.3s and TPS rises. Setup works but demo shows occasional node hiccups and one server intermittently absent.
AI-written summary · about
chapters (13)
- 0:00Introduction and presenters
- 2:55What is MicroProfile?
- 7:54MicroProfile specs overview
- 9:25CDI and JAX-RS explained
- 10:50JSON-P and microservice example
- 13:24Introduction to JCache
- 18:35TomEE server and demo setup
- 22:39Demo: Adding JCache to application
- 34:38JCache annotations and CDI integration
- 43:43Demo metrics and monitoring
- 46:14Live demo: Raspberry Pi cluster
- 50:29Future of MicroProfile metrics
- 51:35Future specs and closing
