Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Microservices for the Masses
with Spring Boot and JHipster
March 20, 2018
+ =
Matt Raible | @mraible
Photo by Analise Zoch...
Agenda
1. Introduction to Microservices
2. Microservices with JHipster
3. Deploy to the Cloud
4. Developing Mobile Apps wi...
Part 1
Introduction to Microservices
History of Microservices
Microservices Architecture Philosophy
Why Microservices?
Dem...
Microservices Visionaries
“Any organization that designs a system
(defined broadly) will produce a design
whose structure is a copy of the
organizat...
“Do one thing and do it well.”
The Future?
“You shouldn't start with a microservices
architecture. Instead begin with a
monolith, keep it modular, and split it
into ...
start.spring.io
Microservices with Spring Boot
https://developer.okta.com/blog/2017/06/15/build-microservices-architecture-spring-boot
Demo
Using start.spring.io, create:
A service registry
A gateway
A catalog service
Create an endpoint in the catalog servi...
Microservices with JHipster
What is JHipster?
Installing and Using JHipster
JHipster’s Microservice Features
Progressive W...
What is JHipster?
+ =
A powerful workflow to build your
application with Yeoman, Webpack/
Gulp and Maven/Gradle
JHipster Goals
A sleek, modern, ...
How to Use JHipster
Install JHipster and Yeoman, using npm:
npm install -g yo generator-jhipster
Create a directory and cd...
http://www.jhipster.tech/microservices-architecture/
Validate ID
Token
Token Endpoint
Authorization Endpoint
/.well-known/

openid-configuration
JWKS Endpoint
UserInfo Endpoin...
Monolith Examples
JHipster 4 Demo
https://github.com/mraible/jhipster4-demo
https://www.youtube.com/watch?v=XRREt1KB4Y8
21...
Progressive Web Apps
Originate from a secure origin, load while offline, and reference a
web app manifest.
Progressive Web Apps
Can be installed on your mobile device, look and act like a native
application, but are distributed t...
Progressive Web Apps
Are fast!
“We’ve failed on mobile.”
Alex Russell
https://youtu.be/K1SFnrf4jZo
Use your browser’s network
& CPU throttling
Mobile Hates You!
Get a ~$150-200 unlocked
Android (e.g. Moto G4)
Implement th...
Lazy-load and create
remaining routes on demand
The PRPL Pattern
Render initial route
Push critical resources for
the init...
https://developer.okta.com/blog/2017/07/20/the-ultimate-guide-to-progressive-web-applications
Demo
Download and start JHipster Registry
Using JHipster, create:
A gateway
A store microservices app
A blog microservices...
Part 3
Deploy to the Cloud
Options for Deploying JHipster
Heroku
Cloud Foundry
AWS
Google Cloud
For monoliths:
jhipster heroku
For microservices:
Deploy JHipster Registry
Build and deploy microservice
Build and deploy ...
For monoliths:
jhipster cloudfoundry
For microservices:
Deploy JHipster Registry
Build and deploy microservice
Build and d...
jhipster aws
Uses Elastic Beanstalk
http://www.jhipster.tech/aws/
Boxfuse
http://www.jhipster.tech/boxfuse/
Future
https:/...
$ mvn package -Pprod dockerfile:build
$ jhipster kubernetes
$ kubectl apply -f <app-name>
https://developer.okta.com/blog/...
Demo Build Your JHipster App for Production
Deploy with Kubernetes and Minikube
Deploy to Google Cloud
https://github.com/...
Part 4
Developing Mobile Apps with JHipster
What is Ionic?
Why?
Ionic Module for JHipster
JWT and OIDC Support
Entity Gene...
Ionic
Ionic Framework
Develop Hybrid & PWA
Apps
https://ionicframework.com
Stencil
Vanilla Web
Components
https://stencilj...
Why?
The first version of 21-Points Health I wrote with JHipster 2.x was
painful to use on a mobile device. The 4.x versio...
How is a mobile app for JHipster
different from its Angular UI?
Run it!
yo jhipster-ionic
Ionic Module for JHipster
Because Ionic Apps need some JHipster 💙 too!
https://github.com/oktade...
Create an app:
ignite new myapp --boilerplate ignite-jhipster
Ignite JHipster
https://github.com/ruddell/ignite-jhipster
I...
Demo
Create an Ionic app for JHipster
Generate entities that exist on gateway
Deploy to emulator
Deploy to phone
https://g...
Part 5 JHipster Roadmap
What You Learned
What’s Next for JHipster
What You Learned
What’s Next for JHipster?
💥 JHipster v5.0
Spring 2018
start.jhipster.techSpring Boot 2 Support
Blueprint Support
React Sup...
JHipster Conf
JHipster Conf is the first conference on JHipster, the most widely-used
Java application generator in the wor...
Demo
Create a React project with JHipster
The JHipster Mini-Book



Written with Asciidoctor
Quick and to the point, 130 pages
Developed a Real World App:
www.21-po...
Learn More
stackoverflow.com
Spring Boot
spring.io/guides
JHipster
www.jhipster.tech
Okta APIs
developer.okta.com
developer.okta.com/blog
Thanks!
Keep in Touch
raibledesigns.com
@mraible
Presentations
speakerdeck.com/mraible
Code
github.com/oktadeveloper
devel...
Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018
Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018
Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018
Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018
Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018
Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018
Upcoming SlideShare
Loading in …5
×

10

Share

Download to read offline

Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018

Download to read offline

Microservices are all the rage and being deployed by many Java Hipsters. If you're working with a large team that needs different release cycles for product components, microservices can be a blessing. If you're working at your VW Restoration Shop and running its online store with your own software, having five services to manage and deploy can be a real pain. Share your knowledge and experience about microservices in this informative and code-heavy talk.

You'll learn how to use JHipster (a Yeoman generator) to create Angular + Spring Boot apps on separate instances with a unified front-end. I'll also show you options for securing your API gateway and individual applications using JWT. Heroku, Kubernetes, Docker, ELK, Spring Cloud, Okta; there will be plenty of interesting demos to see!

Tutorials demoed:

* Build a Microservices Architecture for Microbrews with Spring Boot: https://developer.okta.com/blog/2017/06/15/build-microservices-architecture-spring-boot
* Develop a Microservices Architecture with OAuth 2.0 and JHipster: https://developer.okta.com/blog/2018/03/01/develop-microservices-jhipster-oauth
* Deploy JHipster to Google Cloud with Kubernetes: https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster#deploy-to-google-cloud
* Use Ionic for JHipster to Create Mobile Apps with OIDC Authentication: https://developer.okta.com/blog/2018/01/30/jhipster-ionic-with-oidc-authentication

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Microservices for the Masses with Spring Boot and JHipster - Seattle JUG 2018

  1. 1. Microservices for the Masses with Spring Boot and JHipster March 20, 2018 + = Matt Raible | @mraible Photo by Analise Zocher https://www.flickr.com/photos/analisezocher/34929403653
  2. 2. Agenda 1. Introduction to Microservices 2. Microservices with JHipster 3. Deploy to the Cloud 4. Developing Mobile Apps with JHipster 5. JHipster Roadmap
  3. 3. Part 1 Introduction to Microservices History of Microservices Microservices Architecture Philosophy Why Microservices? Demo: A Microservices Architecture with Spring Boot and Spring Cloud
  4. 4. Microservices Visionaries
  5. 5. “Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.” Conway’s Law Melvin Conway 1967
  6. 6. “Do one thing and do it well.”
  7. 7. The Future?
  8. 8. “You shouldn't start with a microservices architecture. Instead begin with a monolith, keep it modular, and split it into microservices once the monolith becomes a problem.” Martin Fowler March 2014
  9. 9. start.spring.io
  10. 10. Microservices with Spring Boot https://developer.okta.com/blog/2017/06/15/build-microservices-architecture-spring-boot
  11. 11. Demo Using start.spring.io, create: A service registry A gateway A catalog service Create an endpoint in the catalog service Create a filtered endpoint in the gateway Show failover capabilities Show Spring Security OAuth https://github.com/oktadeveloper/spring- boot-microservices-example
  12. 12. Microservices with JHipster What is JHipster? Installing and Using JHipster JHipster’s Microservice Features Progressive Web Applications Overview Part 2
  13. 13. What is JHipster? + =
  14. 14. A powerful workflow to build your application with Yeoman, Webpack/ Gulp and Maven/Gradle JHipster Goals A sleek, modern, mobile-first front- end with Angular and Bootstrap A high-performance and robust Java stack on the server side with Spring Boot A robust microservice architecture with JHipster Registry, Netflix OSS, Elastic Stack, and Docker
  15. 15. How to Use JHipster Install JHipster and Yeoman, using npm: npm install -g yo generator-jhipster Create a directory and cd into it: mkdir newapp && cd newapp Run it! jhipster
  16. 16. http://www.jhipster.tech/microservices-architecture/
  17. 17. Validate ID Token Token Endpoint Authorization Endpoint /.well-known/
 openid-configuration JWKS Endpoint UserInfo Endpoint OAuth 2.0 Authorization Server & OpenID Connect Provider (OP) OAuth 2.0 Resource Server Client (Relying Party) 1 3 2 54 1 Discover OpenID Provider Metadata 2 Perform OAuth flow to obtain a ID token and/or access token 3 Get JSON Web Key Set (JWKS) for signature keys 4 Validate ID token
 (JSON Web Token) 5 Get additional user attributes with access token from UserInfo endpoint OAuth 2.0 and OIDC
  18. 18. Monolith Examples JHipster 4 Demo https://github.com/mraible/jhipster4-demo https://www.youtube.com/watch?v=XRREt1KB4Y8 21-Points Health https://github.com/mraible/21-points https://infoq.com/minibooks/jhipster-4-mini-book
  19. 19. Progressive Web Apps Originate from a secure origin, load while offline, and reference a web app manifest.
  20. 20. Progressive Web Apps Can be installed on your mobile device, look and act like a native application, but are distributed through the web.
  21. 21. Progressive Web Apps Are fast!
  22. 22. “We’ve failed on mobile.” Alex Russell https://youtu.be/K1SFnrf4jZo
  23. 23. Use your browser’s network & CPU throttling Mobile Hates You! Get a ~$150-200 unlocked Android (e.g. Moto G4) Implement the PRPL pattern Test with Lighthouse
  24. 24. Lazy-load and create remaining routes on demand The PRPL Pattern Render initial route Push critical resources for the initial URL route Pre-cache remaining routes
  25. 25. https://developer.okta.com/blog/2017/07/20/the-ultimate-guide-to-progressive-web-applications
  26. 26. Demo Download and start JHipster Registry Using JHipster, create: A gateway A store microservices app A blog microservices app Generate entities in apps and on gateway Convert gateway to be a PWA Run everything in Docker https://github.com/oktadeveloper/okta- jhipster-microservices-oauth-example
  27. 27. Part 3 Deploy to the Cloud Options for Deploying JHipster Heroku Cloud Foundry AWS Google Cloud
  28. 28. For monoliths: jhipster heroku For microservices: Deploy JHipster Registry Build and deploy microservice Build and deploy gateway http://bit.ly/heroku-jhipster-microservices
  29. 29. For monoliths: jhipster cloudfoundry For microservices: Deploy JHipster Registry Build and deploy microservice Build and deploy gateway http://www.jhipster.tech/cloudfoundry/
  30. 30. jhipster aws Uses Elastic Beanstalk http://www.jhipster.tech/aws/ Boxfuse http://www.jhipster.tech/boxfuse/ Future https://github.com/jhipster/generator-jhipster/ pull/7035
  31. 31. $ mvn package -Pprod dockerfile:build $ jhipster kubernetes $ kubectl apply -f <app-name> https://developer.okta.com/blog/2017/06/20/ develop-microservices-with-jhipster
  32. 32. Demo Build Your JHipster App for Production Deploy with Kubernetes and Minikube Deploy to Google Cloud https://github.com/oktadeveloper/ jhipster-microservices-example
  33. 33. Part 4 Developing Mobile Apps with JHipster What is Ionic? Why? Ionic Module for JHipster JWT and OIDC Support Entity Generator
  34. 34. Ionic Ionic Framework Develop Hybrid & PWA Apps https://ionicframework.com Stencil Vanilla Web Components https://stenciljs.com PWA Toolkit Lightning fast PWAs https://github.com/ionic- team/ionic-pwa-toolkit
  35. 35. Why? The first version of 21-Points Health I wrote with JHipster 2.x was painful to use on a mobile device. The 4.x version is better, but still not great. I want to develop the best user experience. Native apps are painful to distribute, but work better than PWAs (on iOS).
  36. 36. How is a mobile app for JHipster different from its Angular UI?
  37. 37. Run it! yo jhipster-ionic Ionic Module for JHipster Because Ionic Apps need some JHipster 💙 too! https://github.com/oktadeveloper/ionic-jhipster-starter Install Ionic and the Ionic Module for JHipster, using npm: npm install -g ionic generator-jhipster-ionic Profit! 🤑
  38. 38. Create an app: ignite new myapp --boilerplate ignite-jhipster Ignite JHipster https://github.com/ruddell/ignite-jhipster Install Create React Native App and Ignite CLI, using npm: npm install -g create-react-native-app ignite-cli Ignite! 🔥 A React Native boilerplate for JHipster apps
  39. 39. Demo Create an Ionic app for JHipster Generate entities that exist on gateway Deploy to emulator Deploy to phone https://github.com/oktadeveloper/ okta-ionic-jhipster-example
  40. 40. Part 5 JHipster Roadmap What You Learned What’s Next for JHipster
  41. 41. What You Learned
  42. 42. What’s Next for JHipster? 💥 JHipster v5.0 Spring 2018 start.jhipster.techSpring Boot 2 Support Blueprint Support React Support
  43. 43. JHipster Conf JHipster Conf is the first conference on JHipster, the most widely-used Java application generator in the world. The conference will be 100% in English! https://jhipster-conf.github.io
  44. 44. Demo Create a React project with JHipster
  45. 45. The JHipster Mini-Book
 
 Written with Asciidoctor Quick and to the point, 130 pages Developed a Real World App: www.21-points.com Free Download from InfoQ: infoq.com/minibooks/jhipster-mini-book
  46. 46. Learn More stackoverflow.com Spring Boot spring.io/guides JHipster www.jhipster.tech Okta APIs developer.okta.com
  47. 47. developer.okta.com/blog
  48. 48. Thanks! Keep in Touch raibledesigns.com @mraible Presentations speakerdeck.com/mraible Code github.com/oktadeveloper developer.okta.com
  • QuiTran7

    Jun. 3, 2018
  • joobn

    Apr. 21, 2018
  • AndreasChristoforide

    Apr. 4, 2018
  • williamrey8

    Mar. 31, 2018
  • PatricioVergara11

    Mar. 26, 2018
  • DenisMiorandi

    Mar. 22, 2018
  • PedroBurglin

    Mar. 21, 2018
  • simongaudillet

    Mar. 21, 2018
  • RichardYhip

    Mar. 21, 2018
  • AnbuSampath2

    Mar. 21, 2018

Microservices are all the rage and being deployed by many Java Hipsters. If you're working with a large team that needs different release cycles for product components, microservices can be a blessing. If you're working at your VW Restoration Shop and running its online store with your own software, having five services to manage and deploy can be a real pain. Share your knowledge and experience about microservices in this informative and code-heavy talk. You'll learn how to use JHipster (a Yeoman generator) to create Angular + Spring Boot apps on separate instances with a unified front-end. I'll also show you options for securing your API gateway and individual applications using JWT. Heroku, Kubernetes, Docker, ELK, Spring Cloud, Okta; there will be plenty of interesting demos to see! Tutorials demoed: * Build a Microservices Architecture for Microbrews with Spring Boot: https://developer.okta.com/blog/2017/06/15/build-microservices-architecture-spring-boot * Develop a Microservices Architecture with OAuth 2.0 and JHipster: https://developer.okta.com/blog/2018/03/01/develop-microservices-jhipster-oauth * Deploy JHipster to Google Cloud with Kubernetes: https://developer.okta.com/blog/2017/06/20/develop-microservices-with-jhipster#deploy-to-google-cloud * Use Ionic for JHipster to Create Mobile Apps with OIDC Authentication: https://developer.okta.com/blog/2018/01/30/jhipster-ionic-with-oidc-authentication

Views

Total views

1,949

On Slideshare

0

From embeds

0

Number of embeds

106

Actions

Downloads

46

Shares

0

Comments

0

Likes

10

×