Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Spring I/O 2023 - Spring Boot in a Cloud-Native Polyglot World

Spring I/O 2023 - Spring Boot in a Cloud-Native Polyglot World

Salaboy

May 19, 2023
Tweet

More Decks by Salaboy

Other Decks in Technology

Transcript

  1. @salaboy - Spring I/O - Barcelona 2023
    Spring Boot in a Polyglot Cloud-
    Native World
    With Dapr

    View Slide

  2. Agenda
    • Our Spring Boot Cloud-Native Applications

    • Common patterns and abstractions

    • The relationship betwee apps and infra

    • Kubernetes = Deploy + Run

    • Platform Building in the Cloud-Native Space

    • Platform Capabilities

    • Dapr on K8s

    • Dapr and TestContainers

    View Slide

  3. MAURICIO SALATINO / WWW.SALABOY.COM
    @SALABOY

    View Slide

  4. PLATFORMS ON K8S
    40% DISCOUNT: SALATINO40

    View Slide

  5. PLATFORMS ON K8S
    SALATINO40 😢 😢 😢 😢 😢 😢

    View Slide

  6. #1: How many Java
    Developers are in
    the room?
    Time: 10

    View Slide

  7. #1: How many Java
    Developers are in
    the room?
    Time: 8

    View Slide

  8. #1: How many Java
    Developers are in
    the room?
    Time: 5

    View Slide

  9. #1: How many Java
    Developers are in
    the room?
    Time: 3

    View Slide

  10. #1: How many Java
    Developers are in
    the room?
    Time Out!

    View Slide

  11. Fetching results

    View Slide

  12. Fetching results….

    View Slide

  13. Fetching results………

    View Slide

  14. Fetching results………..…

    View Slide

  15. Fetching
    results………………

    View Slide

  16. Java Developers
    Java/Spring Developers: 80%
    Others (WASM, C (””,#,++), Go, Flash): 20%

    View Slide

  17. #2: Do you have
    more than one
    Application?

    View Slide

  18. Applications
    One App -> 30%
    More than one -> 70%
    No Apps -> ??

    View Slide

  19. #3: Does your
    applications read or
    write data?
    (From storage, db, files, buckets)

    View Slide

  20. Data? Or no Data?
    Most of them -> 70%
    Nope -> 20%
    I don’t understand the question -> 10%

    View Slide

  21. #4: Does your
    applications consume or
    emit events/messages?

    View Slide

  22. Async Messages
    Some of them -> 30%
    Nope -> 50%
    I don’t understand the question -> 20%

    View Slide

  23. #5: Does your
    applications to talk
    to each other?

    View Slide

  24. Chatty apps
    Yes using REST -> 40%
    Yes using GRPC -> 40%
    Other -> 30%
    No / I don’t understand the question -> 30%

    View Slide

  25. Facts / Results
    App A App B App C

    View Slide

  26. View Slide

  27. INFRASTRUCTURE

    View Slide

  28. DATA
    Spring Boot Data
    JPA
    Redis
    MongoDB
    Oracle
    PostgreSQL
    MySQL
    MongoDB Client
    Redis Client
    Drivers / CIients
    JOOQ
    JBDC
    Abstractions

    View Slide

  29. MESSAGING
    Spring Boot Integration
    JMS
    RabbitMQ
    Kafka Client
    RabbitMQ Client
    CIients
    AMQP
    Kafka
    Rsocket
    Pulsar Pulsar Client
    AMQP Clients
    Abstractions/Protocols

    View Slide

  30. 12-factor /
    Cloud-Native
    Envrionment Variables
    Development Testing Staging Production

    View Slide

  31. Upgrading
    App A 1.5.0
    V3.4.X
    V1.2.X
    Redis Client V3.4.3
    Kafka Client V1.2.3
    App B 3.4.0
    Redis Client V3.5.1
    Kafka Client V2.2.3

    View Slide

  32. [Apps + Deps ]
    <==>
    Infra

    View Slide

  33. [Apps + Framework + Deps]
    <==>
    Infra

    View Slide

  34. Polyglot?
    App A 1.5.0 (Java)
    V3.4.X
    V1.2.X
    Redis Client V3.4.3
    Kafka Client V1.2.3
    App B 3.4.0 (Go)
    Redis Client V3.4.3
    Kafka Client V1.2.3
    Abstractions / Frameworks Abstractions / Frameworks

    View Slide

  35. KUBERNETES

    View Slide

  36. DEPLOY AND RUN

    View Slide

  37. WHY?

    View Slide

  38. YAML
    {

    View Slide

  39. Demo #1
    Let’s do it!

    View Slide

  40. YAML
    {

    View Slide

  41. We will need
    some tools! 🛠🪓

    View Slide

  42. 🤯

    View Slide

  43. THE PLATFORM
    ENGINEERING BUZZ


    🤔

    View Slide

  44. 👷🔧


    🪓👷
    Devs
    Infra SREs
    Data
    Scientists
    {
    }
    THE PLATFORM TEAM

    View Slide

  45. My


    Platform
    Platform
    APIs
    Self Service
    Golden
    Paths
    THE PLATFORM

    View Slide

  46. CNCF TAG APP DELIVERY
    https://tag-app-delivery.cncf.io/whitepapers/platforms/

    View Slide

  47. Apps APIs
    Exchanging
    Messages/
    Events
    Storing and
    Reading Data
    Observability
    Resiliency
    Dynamic
    Scaling
    Release
    Strategies
    Feature Flags
    Work
    f
    lows Traf
    f
    ic
    Management
    PLATFORM CAPABILITIES
    Tools
    Capabilities

    View Slide

  48. https://www.aviransplace.com/post/platform-as-a-runtime-paar-beyond-platform-engineering

    View Slide

  49. View Slide

  50. DISCLAIMER

    View Slide

  51. View Slide

  52. ->

    View Slide

  53. App A 1.5.0 (Java) App B 3.4.0 (Go)
    Abstractions / Frameworks Abstractions / Frameworks
    Dapr Sidecar Dapr Sidecar
    Local HTTP/GRPC Local HTTP/GRPC
    Dapr StateStore Component
    Dapr PubSub Component Dapr Resiliency Policies

    View Slide

  54. Read App
    Write App Subscribe App
    Frontend App
    Dapr StateStore Component
    Dapr PubSub Component Dapr Resiliency Policies
    Dapr Service Discovery

    View Slide

  55. Demo #2

    View Slide

  56. Read App
    Write App
    Subscribe App
    Frontend App
    Dapr StateStore Component
    Dapr PubSub Component
    Dapr Resiliency Policies
    Dapr Service Discovery
    Do Some SQL
    5%
    95%

    View Slide

  57. View Slide

  58. 💻🤔

    View Slide





  59. ❤❤




    🥳

    View Slide

  60. Read App
    Write App Subscribe App
    Dapr StateStore
    Dapr PubSub
    Dapr Resiliency Policies
    Dapr Service Discovery
    Dapr PubSub
    Dapr Resiliency Policies
    Dapr StateStore
    🪄

    View Slide

  61. Demo #3

    View Slide

  62. Takeaways

    View Slide

  63. Use the right abstractions
    to enable teams to go faster

    View Slide

  64. Break dependencies
    from infra

    View Slide

  65. For language-agnostic
    application level APIs

    View Slide

  66. Wire cloud native apps
    locally

    View Slide

  67. Thanks
    @Salaboy

    View Slide

  68. PLATFORMS ON K8S
    40% DISCOUNT: SALATINO40

    View Slide