SlideShare a Scribd company logo
Exploring Stateful Microservices
in the
Cloud Native World
Mary Grygleski & Grace Jansen
@mgrygles April 2022 @gracejansen27
Who is Grace Jansen?
• Developer Advocate at IBM
• Java, Cloud-Native, Reactive,
MicroProfile, Open Source
• A Biologist turned software engineer
• Passionate about encouraging more WIT
• Love traveling and trying new activities
Who is Mary Grygleski?
• Senior Developer Advocate at DataStax
• Streaming, Event-Driven, NoSQL, Open Source
• Java Champion
• Over 25 years of software engineering experience that
span a wide spectrum from product development to
enterprise applications and beyond
• Previously a Senior Developer Advocate at IBM
• President of Chicago Java Users Group (CJUG)
• Active church volunteer and religious education
teacher
Stateful
Vs
Stateless
“Computing” Life used
to be simpler
Stateless Computing
• State of the data does not get recorded between
transactions
A communication protocol that does not
retain any session information
• Scaling the system is easier
• Recoverability from system failure is easier
Architecture, design and
implementation is simpler
Realistically,
we live in a
Stateful
world
Stateful Computing
• State of the data gets recorded
at every step across all
transactions
A communication
protocol that would
retain all session
information
• Scaling the system is difficult
• Recoverability from system
failure involves a lot of efforts
Architecture,
design and
implementation is
complex
The States of Data
3 fundamental state of data:
● Data at rest
● Data in motion
● Data in use
The role of Microservices for the Data
● Microservices is a place where we “operate” on the data
● READ/WRITE: fetch from/place into the “data source”
● Data source: disk, in-memory, “cloud”
● Where I/O gets triggered to happen!
● Where transformation/remediation occur
Statefulness in the
“cloud-less” days…
Client-Server
Systems
Stateful database
systems on the
server side
Database-styled
transactions
2-Phase Commit
(2PC)
Java
Enterprise Java
Beans – Stateful EJB
(Session vs Entity
Beans)
Servlet –
HTTPSession
Client-side
caching of server
responses
Cookie-based
authentication
Token-based
authentication
(JWT)
Stateful
Microservices
in Cloud Native
environments
Cloud Native:
Stateless
containers?
Cloud Native Computing: An
overarching approach
► Essentially an “extension” to Cloud Computing by addressing the true
needs of enterprise-level distributed business application systems.
► What are the true needs? Netflix coined the term Cloud Native in the
early 2010’s and essentially they wanted to leverage on the cloud to
meet their goals for their systems to be:
► Highly available
► Scalable
► Performant
2022-Devnexus-StatefulMicroservices.pptx.pdf
The 12 Factor Application
A methodology that was drafted by developers at Heroku.
A set of guidelines or best practices for portable and resilient applications that
are well suited to be in cloud environments.
One of the factors indicates the need for self-contained services which are
to be deployed as stateless processes. Microservices architecture (so far) is
one that can satisfy such a requirement.
It does not enforce the tools and libraries that the applications must use, but it
provides the solid concepts that the applications must follow.
The 12 Factor Application
• VII. Port binding
• Export services via port binding
• VIII. Concurrency
• Scale out via the process model
• IX. Disposability
• Maximize robustness with fast startup and
graceful shutdown
• X. Dev/prod parity
• Keep development, staging, and production as
similar as possible
• XI. Logs
• Treat logs as event streams
• XII. Admin processes
• Run admin/management tasks as one-off
processes
• I. Codebase
• One codebase tracked in revision control,
many deploys
• II. Dependencies
• Explicitly declare and isolate dependencies
• III. Config
• Store config in the environment
• IV. Backing services
• Treat backing services as attached resources
• V. Build, release, run
• Strictly separate build and run stages
• VI. Processes
• Execute the app as one or more stateless
processes
HOW to preserve state
across session, transaction,
and network boundaries?
Techniques / Mechanisms
Cache
Database-style
transactions Cookies
Sessions Tokens
Leader Election
(etcd) StatefulSets PersistentVolume
Cookie/Session
affinity (sticky
session)
Cloud Native Infrastructure:
Containers/Kubernetes
This Photo by Unknown Author is licensed under CC BY This Photo by Unknown Author is licensed under CC BY-SA-NC This Photo by Unknown Author
is licensed under CC BY-SA
This Photo by Unknown Author is licensed under CC BY-SA-NC
Programming Design Pattern
Saga
Transactions spanning across multiple services
Concept of compensation – no ”rollbacks”
(forward strategy)
2 ways of coordination sagas:
•Choreography
•Orchestration
Long-Running Action / Saga
Interaction Pattern
“Compensator” model
Example Library implementing LRA:
•MicroProfile LRA (1.0 – May 13, 2021)
An example of a SAGA (choreography)
What
about
Reactive?
Reactive Systems and the Reactive Manifesto
Resilient
Elastic
Message-Driven
Responsive
Code
samples
Open Liberty session persistence labs
Interactive Lab version:
https://openliberty.io/guides/#persistence
Apache Pulsar and Pulsar Functions
Free-Tier Astra Cloud: https://astra.datastax.com
● Separation of Compute and Data Storage (Apache
BookKeeper)
● Native from the start as a cloud-native provider
○ Multi-tenancy
○ Geo-replication
Resources
and Links
Resources (Code samples, Design Patterns, Open Source Libraries)
● Code samples:
○ Open Liberty session persistence using JCache & Hazelcast
https://openliberty.io/guides/sessions.html
○ A Stateful Open Liberty application in Kubernetes
https://github.com/mgrygles/stateful-kube-demo
Saga Design Pattern: https://microservices.io/patterns/data/saga.html
MicroProfile LRA 1.0:
https://download.eclipse.org/microprofile/microprofile-lra-1.0/microprofile-lra-spec-
1.0.html
LRA Blog: MicroProfile Long Running Actions in Open Liberty
● Open Liberty: https://openliberty.io/
○ Free tutorials/Guides: https://openliberty.io/guides
● MicroProfile: http://microprofile.io/
● Jakarta EE: https://jakarta.ee/
Resources (Cloud, Cloud-Native, DevOps)
● IBM Developer (all topics): https://developer.ibm.com
● IBM Developer (Cloud): https://developer.ibm.com/depmodels/cloud/
● IBM Developer (Cloud DevOps): https://www.ibm.com/cloud/devops
● IBM Developer (Cloud Native): https://www.ibm.com/cloud/cloud-native/
● IBM Developer (Saga Pattern):
https://developer.ibm.com/articles/use-saga-to-solve-distributed-transaction-management-pr
oblems-in-a-microservices-architecture/
● Programming with Java on IBM Cloud (IBM Cloud Docs):
https://cloud.ibm.com/docs/java?topic=cloud-native-overview
● Cloud Native Computing Foundation (CNCF): https://github.com/cncf/
● The 12 Factor App (Cloud Native Best Practices): https://12factor.net/
Resources (Apache Pulsar, Cassandra, AstraDB, Astra Streaming)
Astra Streaming:
https://www.datastax.com/products/astra-streaming
Luna Streaming:
https://www.datastax.com/products/luna-streaming
Astra Cloud (free-tier Managed Cassandra on the Cloud):
https://astra.datastax.com/
https://pulsar.apache.org/
https://bookkeeper.apache.org/
https://zookeeper.apache.org
Managed Cassandra on the IBM Cloud
https://www.ibm.com/cloud/databases-for-datastax
Other Great Devnexus Sessions:
Join our community meetups & free trainings
IBM Expert TV: https://techtv.bemyapp.com/
IBM Developer on Meetup.com (includes all IBM Developer meetup groups in cities all over the world!)
https://www.meetup.com/pro/ibmdeveloper/
DataStax YouTube Channel: https://www.youtube.com/c/DataStax
Highly recommended also:
Chicago Java Users Group (CJUG) https://www.meetup.com/ChicagoJUG/
Follow Mary’s Twitch Stream
(Different topics: Java, Open Source, Distributed Messaging, Event-Streaming, Cloud, DevOps, etc)
Wednesday at 2pm-US/Central
https://twitch.tv/mgrygles
Join Pulsar at the ‘hood
https://www.meetup.com/pro/apache-pulsar-neighborhood
https://pulsar-neighborhood.github.io/
Join Mary on
Discord
https://discord.gg/RMU4Juw
Thank You!
@mgrygles
https://linkedin.com/in/mary-grygleski
https://github.com/mgrygles
https://dev.to/mgrygles
@gracejansen27
https://linkedin.com/in/grace-jansen
https://github.com/GraceJanse
https://developer.ibm.com/profiles/grace.jansen1/

More Related Content

Similar to 2022-Devnexus-StatefulMicroservices.pptx.pdf (20)

PDF
Data Engineer, Patterns & Architecture The future: Deep-dive into Microservic...
Igor De Souza
 
PPTX
12 Factor App Methodology
laeshin park
 
PDF
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Chris Jang
 
PDF
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB
 
PDF
Optimizing the Ops in DevOps
Gordon Haff
 
PDF
A Tight Ship: How Containers and SDS Optimize the Enterprise
Eric Kavanagh
 
PPTX
CNCF Introduction - Feb 2018
Krishna-Kumar
 
PPTX
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Demi Ben-Ari
 
PDF
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Atlassian
 
PPTX
Executive Briefing: The Why, What, and Where of Containers
NVISIA
 
PPTX
OGCE SC10
marpierc
 
PPTX
{code} and containers
{code} by Dell EMC
 
PDF
Microservices - opportunities, dilemmas and problems
Łukasz Sowa
 
PPTX
Webinar: How and Why to Containerize Your Legacy Applications
Storage Switzerland
 
PPTX
The Last Frontier- Virtualization, Hybrid Management and the Cloud
Kellyn Pot'Vin-Gorman
 
PDF
8base Hyperledger Miami Meetup 20180719
Oscar Perez
 
PDF
8base Hyperledger Miami Meetup Presentation
8base
 
PDF
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
PDF
UI Dev in Big data world using open source
Tech Triveni
 
PPTX
Technology insights: Decision Science Platform
Decision Science Community
 
Data Engineer, Patterns & Architecture The future: Deep-dive into Microservic...
Igor De Souza
 
12 Factor App Methodology
laeshin park
 
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Chris Jang
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB
 
Optimizing the Ops in DevOps
Gordon Haff
 
A Tight Ship: How Containers and SDS Optimize the Enterprise
Eric Kavanagh
 
CNCF Introduction - Feb 2018
Krishna-Kumar
 
Kubernetes, Toolbox to fail or succeed for beginners - Demi Ben-Ari, VP R&D @...
Demi Ben-Ari
 
Your Journey to Cloud-Native Begins with DevOps, Microservices, and Containers
Atlassian
 
Executive Briefing: The Why, What, and Where of Containers
NVISIA
 
OGCE SC10
marpierc
 
{code} and containers
{code} by Dell EMC
 
Microservices - opportunities, dilemmas and problems
Łukasz Sowa
 
Webinar: How and Why to Containerize Your Legacy Applications
Storage Switzerland
 
The Last Frontier- Virtualization, Hybrid Management and the Cloud
Kellyn Pot'Vin-Gorman
 
8base Hyperledger Miami Meetup 20180719
Oscar Perez
 
8base Hyperledger Miami Meetup Presentation
8base
 
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
UI Dev in Big data world using open source
Tech Triveni
 
Technology insights: Decision Science Platform
Decision Science Community
 

More from Grace Jansen (20)

PPTX
JPrime_JITServer.pptx
Grace Jansen
 
PPTX
SwissJUG_15_factor_app.pptx
Grace Jansen
 
PPTX
SwissJUG_Bringing the cloud back down to earth.pptx
Grace Jansen
 
PPTX
ThroughTheLookingGlass_EffectiveObservability.pptx
Grace Jansen
 
PPTX
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
Grace Jansen
 
PPTX
Javaland_JITServerTalk.pptx
Grace Jansen
 
PPTX
JavaLand_To InstantOn and Beyond.pptx
Grace Jansen
 
PPTX
Jfokus_Bringing the cloud back down to earth.pptx
Grace Jansen
 
PPTX
FooConf23_Bringing the cloud back down to earth.pptx
Grace Jansen
 
PPTX
JCON_15FactorWorkshop.pptx
Grace Jansen
 
PPTX
JCON_Adressing the transaction challenge in a cloud-native world.pptx
Grace Jansen
 
PPTX
JavaZone_Addressing the transaction challenge in a cloud-native world.pptx
Grace Jansen
 
PPTX
JavaZone_Mother Nature vs Java – the security face off.pptx
Grace Jansen
 
PPTX
Boost developer productivity with EE, MP and OL (Devoxx Ukraine 22).pptx
Grace Jansen
 
PPTX
Addressing the transaction challenge in a cloud-native world Devoxx Ukraine 2022
Grace Jansen
 
PPTX
JBCNConf_Addressing_The_Transaction_Challenge_LRA.pptx
Grace Jansen
 
PPTX
How to become a superhero without even leaving your desk!
Grace Jansen
 
PPTX
Devoxx Ukraine - Going beyond the 12 factors
Grace Jansen
 
PPTX
BuildStuffConf Going beyond the 12 factors
Grace Jansen
 
PPTX
JBCN_Testing_With_Containers
Grace Jansen
 
JPrime_JITServer.pptx
Grace Jansen
 
SwissJUG_15_factor_app.pptx
Grace Jansen
 
SwissJUG_Bringing the cloud back down to earth.pptx
Grace Jansen
 
ThroughTheLookingGlass_EffectiveObservability.pptx
Grace Jansen
 
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
Grace Jansen
 
Javaland_JITServerTalk.pptx
Grace Jansen
 
JavaLand_To InstantOn and Beyond.pptx
Grace Jansen
 
Jfokus_Bringing the cloud back down to earth.pptx
Grace Jansen
 
FooConf23_Bringing the cloud back down to earth.pptx
Grace Jansen
 
JCON_15FactorWorkshop.pptx
Grace Jansen
 
JCON_Adressing the transaction challenge in a cloud-native world.pptx
Grace Jansen
 
JavaZone_Addressing the transaction challenge in a cloud-native world.pptx
Grace Jansen
 
JavaZone_Mother Nature vs Java – the security face off.pptx
Grace Jansen
 
Boost developer productivity with EE, MP and OL (Devoxx Ukraine 22).pptx
Grace Jansen
 
Addressing the transaction challenge in a cloud-native world Devoxx Ukraine 2022
Grace Jansen
 
JBCNConf_Addressing_The_Transaction_Challenge_LRA.pptx
Grace Jansen
 
How to become a superhero without even leaving your desk!
Grace Jansen
 
Devoxx Ukraine - Going beyond the 12 factors
Grace Jansen
 
BuildStuffConf Going beyond the 12 factors
Grace Jansen
 
JBCN_Testing_With_Containers
Grace Jansen
 
Ad

Recently uploaded (20)

PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Tally software_Introduction_Presentation
AditiBansal54083
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
Ad

2022-Devnexus-StatefulMicroservices.pptx.pdf

  • 1. Exploring Stateful Microservices in the Cloud Native World Mary Grygleski & Grace Jansen @mgrygles April 2022 @gracejansen27
  • 2. Who is Grace Jansen? • Developer Advocate at IBM • Java, Cloud-Native, Reactive, MicroProfile, Open Source • A Biologist turned software engineer • Passionate about encouraging more WIT • Love traveling and trying new activities
  • 3. Who is Mary Grygleski? • Senior Developer Advocate at DataStax • Streaming, Event-Driven, NoSQL, Open Source • Java Champion • Over 25 years of software engineering experience that span a wide spectrum from product development to enterprise applications and beyond • Previously a Senior Developer Advocate at IBM • President of Chicago Java Users Group (CJUG) • Active church volunteer and religious education teacher
  • 6. Stateless Computing • State of the data does not get recorded between transactions A communication protocol that does not retain any session information • Scaling the system is easier • Recoverability from system failure is easier Architecture, design and implementation is simpler
  • 7. Realistically, we live in a Stateful world
  • 8. Stateful Computing • State of the data gets recorded at every step across all transactions A communication protocol that would retain all session information • Scaling the system is difficult • Recoverability from system failure involves a lot of efforts Architecture, design and implementation is complex
  • 9. The States of Data 3 fundamental state of data: ● Data at rest ● Data in motion ● Data in use
  • 10. The role of Microservices for the Data ● Microservices is a place where we “operate” on the data ● READ/WRITE: fetch from/place into the “data source” ● Data source: disk, in-memory, “cloud” ● Where I/O gets triggered to happen! ● Where transformation/remediation occur
  • 12. Client-Server Systems Stateful database systems on the server side Database-styled transactions 2-Phase Commit (2PC) Java Enterprise Java Beans – Stateful EJB (Session vs Entity Beans) Servlet – HTTPSession Client-side caching of server responses Cookie-based authentication Token-based authentication (JWT)
  • 15. Cloud Native Computing: An overarching approach ► Essentially an “extension” to Cloud Computing by addressing the true needs of enterprise-level distributed business application systems. ► What are the true needs? Netflix coined the term Cloud Native in the early 2010’s and essentially they wanted to leverage on the cloud to meet their goals for their systems to be: ► Highly available ► Scalable ► Performant
  • 17. The 12 Factor Application A methodology that was drafted by developers at Heroku. A set of guidelines or best practices for portable and resilient applications that are well suited to be in cloud environments. One of the factors indicates the need for self-contained services which are to be deployed as stateless processes. Microservices architecture (so far) is one that can satisfy such a requirement. It does not enforce the tools and libraries that the applications must use, but it provides the solid concepts that the applications must follow.
  • 18. The 12 Factor Application • VII. Port binding • Export services via port binding • VIII. Concurrency • Scale out via the process model • IX. Disposability • Maximize robustness with fast startup and graceful shutdown • X. Dev/prod parity • Keep development, staging, and production as similar as possible • XI. Logs • Treat logs as event streams • XII. Admin processes • Run admin/management tasks as one-off processes • I. Codebase • One codebase tracked in revision control, many deploys • II. Dependencies • Explicitly declare and isolate dependencies • III. Config • Store config in the environment • IV. Backing services • Treat backing services as attached resources • V. Build, release, run • Strictly separate build and run stages • VI. Processes • Execute the app as one or more stateless processes
  • 19. HOW to preserve state across session, transaction, and network boundaries?
  • 21. Leader Election (etcd) StatefulSets PersistentVolume Cookie/Session affinity (sticky session) Cloud Native Infrastructure: Containers/Kubernetes This Photo by Unknown Author is licensed under CC BY This Photo by Unknown Author is licensed under CC BY-SA-NC This Photo by Unknown Author is licensed under CC BY-SA This Photo by Unknown Author is licensed under CC BY-SA-NC
  • 22. Programming Design Pattern Saga Transactions spanning across multiple services Concept of compensation – no ”rollbacks” (forward strategy) 2 ways of coordination sagas: •Choreography •Orchestration Long-Running Action / Saga Interaction Pattern “Compensator” model Example Library implementing LRA: •MicroProfile LRA (1.0 – May 13, 2021)
  • 23. An example of a SAGA (choreography)
  • 25. Reactive Systems and the Reactive Manifesto Resilient Elastic Message-Driven Responsive
  • 27. Open Liberty session persistence labs Interactive Lab version: https://openliberty.io/guides/#persistence
  • 28. Apache Pulsar and Pulsar Functions Free-Tier Astra Cloud: https://astra.datastax.com ● Separation of Compute and Data Storage (Apache BookKeeper) ● Native from the start as a cloud-native provider ○ Multi-tenancy ○ Geo-replication
  • 30. Resources (Code samples, Design Patterns, Open Source Libraries) ● Code samples: ○ Open Liberty session persistence using JCache & Hazelcast https://openliberty.io/guides/sessions.html ○ A Stateful Open Liberty application in Kubernetes https://github.com/mgrygles/stateful-kube-demo Saga Design Pattern: https://microservices.io/patterns/data/saga.html MicroProfile LRA 1.0: https://download.eclipse.org/microprofile/microprofile-lra-1.0/microprofile-lra-spec- 1.0.html LRA Blog: MicroProfile Long Running Actions in Open Liberty ● Open Liberty: https://openliberty.io/ ○ Free tutorials/Guides: https://openliberty.io/guides ● MicroProfile: http://microprofile.io/ ● Jakarta EE: https://jakarta.ee/
  • 31. Resources (Cloud, Cloud-Native, DevOps) ● IBM Developer (all topics): https://developer.ibm.com ● IBM Developer (Cloud): https://developer.ibm.com/depmodels/cloud/ ● IBM Developer (Cloud DevOps): https://www.ibm.com/cloud/devops ● IBM Developer (Cloud Native): https://www.ibm.com/cloud/cloud-native/ ● IBM Developer (Saga Pattern): https://developer.ibm.com/articles/use-saga-to-solve-distributed-transaction-management-pr oblems-in-a-microservices-architecture/ ● Programming with Java on IBM Cloud (IBM Cloud Docs): https://cloud.ibm.com/docs/java?topic=cloud-native-overview ● Cloud Native Computing Foundation (CNCF): https://github.com/cncf/ ● The 12 Factor App (Cloud Native Best Practices): https://12factor.net/
  • 32. Resources (Apache Pulsar, Cassandra, AstraDB, Astra Streaming) Astra Streaming: https://www.datastax.com/products/astra-streaming Luna Streaming: https://www.datastax.com/products/luna-streaming Astra Cloud (free-tier Managed Cassandra on the Cloud): https://astra.datastax.com/ https://pulsar.apache.org/ https://bookkeeper.apache.org/ https://zookeeper.apache.org
  • 33. Managed Cassandra on the IBM Cloud https://www.ibm.com/cloud/databases-for-datastax
  • 34. Other Great Devnexus Sessions:
  • 35. Join our community meetups & free trainings IBM Expert TV: https://techtv.bemyapp.com/ IBM Developer on Meetup.com (includes all IBM Developer meetup groups in cities all over the world!) https://www.meetup.com/pro/ibmdeveloper/ DataStax YouTube Channel: https://www.youtube.com/c/DataStax Highly recommended also: Chicago Java Users Group (CJUG) https://www.meetup.com/ChicagoJUG/
  • 36. Follow Mary’s Twitch Stream (Different topics: Java, Open Source, Distributed Messaging, Event-Streaming, Cloud, DevOps, etc) Wednesday at 2pm-US/Central https://twitch.tv/mgrygles
  • 37. Join Pulsar at the ‘hood https://www.meetup.com/pro/apache-pulsar-neighborhood https://pulsar-neighborhood.github.io/
  • 38. Join Mary on Discord https://discord.gg/RMU4Juw Thank You! @mgrygles https://linkedin.com/in/mary-grygleski https://github.com/mgrygles https://dev.to/mgrygles @gracejansen27 https://linkedin.com/in/grace-jansen https://github.com/GraceJanse https://developer.ibm.com/profiles/grace.jansen1/