Skip to product information
Cloud Native Java
Cloud Native Java
Description
Book Introduction
A must-read survival guide for enterprise Java developers who want to evolve into full-cycle developers in the cloud era!

Through various examples using Spring Boot, Spring Cloud, and Cloud Foundry, we teach you how to design a highly scalable microservices architecture and how to truly practice DevOps and agile development.

"This is a must-read for any developer building cloud-native applications in the Java ecosystem.
This book covers everything from building resilient services, managing data flows with REST and asynchronous events, testing, deployment, and core tasks related to observability."
- Daniel Bryant / CTO, SpectoLabs

"Anyone embarking on their cloud-native journey will benefit from the refined insights and experiences contained in this book."
- Dr. Dave Sire / Spring Framework contributor, co-founder of Spring Boot and Spring Cloud

How do companies like Amazon, Netflix, and Etsy differ from traditional conglomerates? Amazon and Netflix have been able to stay competitive and ahead by building and operating their services in a cloud-native manner.
This book provides a practical guide for Java developers to develop better software faster using Spring Boot, Spring Cloud, and Cloud Foundry.
Many companies are already shifting their software development practices to cloud computing, test-driven development, microservices, and continuous integration and delivery.
As you read this book, you'll naturally become immersed in the tools and methodologies that help you transform legacy applications into cloud-native applications.

* Basics: Learn the benefits of a cloud-native mindset.
Describes how to set up and test a Spring Boot application and how to migrate legacy applications to the cloud.
* Microservice: Create an HTTP-based RESTful service using Spring.
Learn how to properly route requests to a distributed system and build an edge service that acts as a gateway.

* Data Integration: Learn how to manage data using the Spring Data Framework and integrate distributed services using Spring's event-driven, messaging-centric architecture.
* Deployment and Operations: Learn how to build observable systems.
Connect to a stateful service using a service broker and understand the true meaning of continuous delivery.

Supplementary materials, including example code and exercises, are available at http://github.com/Cloud-Native-Java.
  • You can preview some of the book's contents.
    Preview

index
[Part 1: Basics]
Chapter 1 Cloud-Native Applications
Amazon case
Platform Promise
pattern
Scalability
Reliability
Agility
Netflix case
__Microservices
__Integral splitting
__Netflix OSS
__Cloud Native Java
12-Element Methodology
__codebase
__dependency
__Settings __Support Service
__Build, Release, Run
__process
__port binding
__simultaneity
__Disposability
__Development/Operations Matching
__log
__Management Process
organize

Chapter 2 Bootcamp: Introduction to Spring Boot and Cloud Foundry
Spring Boot
Spring Initializer
Getting Started with Spring Tool Suite
__Installing SpringTool Suite
__Create a new project with Spring Initializer
Spring Guide
__Following the Spring Guide in STS
setting
Cloud Foundry
organize

Chapter 3, 12-Element Application Settings
Confusing settings
Spring Framework configuration support
__PropertyPlaceholderConfigurer class for understanding configuration information
__Environment abstraction and @Value
__Profile
Spring Boot style configuration
Using Centralized Configuration with Spring Cloud Configuration Server
__SpringCloud Configuration Server
__SpringCloud Configuration Client
__security
Refreshable settings
organize

Chapter 4 Test
Test composition
Testing Spring Boot Applications
Integration testing
__TestSlice
__Use of simulation techniques
__@SpringBootTest servlet container configuration
__sliced
Full-range test
__Distributed System Testing
__Consumer-led contract testing
__SpringCloud Contract
organize

5. Application Migration
contract
Application Environment Migration
__Ready-to-use build pack
__Custom Build Pack
__Containerized Applications
Light refactoring to move applications to the cloud
__Support service integration
__Service pairing using Spring
organize

[Part 2 Web Service]
Chapter 6 REST API
Leonard Richardson's maturity model
Simple REST API using Spring MVC
Content negotiation
__Reading and writing binary data
__Google Protocol Buffer
Error handling
hypermedia
__Media types and schemas
API versioning
RESTAPI Documentation
client
__Convenient REST client product
__RestTemplate
organize

Chapter 7 Routing
DiscoveryClient abstraction
Cloud Foundry Route Service
organize

Chapter 8 Edge Service
Greetings Service
Simple Edge Service
Netflix Pain
Filtering and proxying through Netflix Juul
__Custom Joule Filter
Security of Edge Services
OAuth
__Service-side application
__HTML5 and JavaScript single-page application
__Userless application
__Trusted Client
Spring Security
Spring Cloud Security
__Spring Security OAuth Authorization Server
__Greetings Resource Server Security Measures
__Creating a single-page application with OAuth security
organize

[Part 3 Data Integration]
Chapter 9 Data Management
Data Modeling
__Relational Database Management System
__NoSQL
Spring Data
__Structure of a Spring Data application
__domain class
__Repository
__Configuring Java Packages for Domain Data
Getting started with RDBMS access using JDBC
Spring's JDBC support
Spring Data Example
Spring Data JPA
__Account Service
__Integrated Testing
Spring Data MongoDB
__Order service
__Integrated Testing
Spring Data Neo4J
__Inventory Service
__Integrated Testing
Spring Data Redis
__caching
organize

Chapter 10: Messaging
Event-Driven Architecture with Spring Integration
__messaging endpoint
__From simple components to complex systems
Message broker, bridge, competitive consumer pattern, event sourcing
__Publish-Subscribe
__point to point
Spring Cloud Stream
__Stream Producer
__Stream Consumer
organize

Chapter 11: Batch Processing and Tasks
Batch jobs
Spring Batch
__First batch job
Scheduling
Remote Partitioning of Spring Batch Jobs Using Messaging
Task Management
Process-centric workflow integration
Distributed using messaging
organize

Chapter 12 Data Integration
Distributed Transactions
Isolation of failures and gradual degradation of performance
Saga pattern
CQRS
__Complaints API
Complaints Statistics API
Spring Cloud Data Flow
__stream
__task
__RESTAPI
__Dataflow Client
organize

[Part 4 Operating Environment]
13 possible systems for ministers
If you make it, you can operate it
Microservices Murder Mystery
12-element operation
new contract
Observability
Differences and Analysis of Push- and Pull-Based Observability
Collecting the current state of your application using Spring Boot Actuator
Metric
Identifying services using the /info endpoint
Check normal operation status
Thank you event
Application Logging
__Specification of log output
__Specifying log level
Distributed tracing
__Finding Clues with Springcloud Sleuth
__How much data is sufficient?
__OpenZipkin: A single photo is worth a thousand traces.
__Other platforms and technologies
Dashboard
__Service Monitoring Using the Hystrix Dashboard
__CodeCentricSpringBoot Admin
__Odina Microservices Dashboard
Pivotal Cloud Foundry's Apps Manager
cure
organize

Chapter 14 Service Broker
Lifecycle of Support Services
Perspective as a Platform
Implementing a Custom Service Broker with Spring Cloud Cloud Foundry Service Broker
__Simple Amazon S3 Service Broker
__Service Catalog
__Managing service instances
__Service Binding
__Protection of Service Brokers
distribution
__Release using Bosch
__Release using Cloud Foundry
Registering an Amazon S3 Service Broker
Creating an Amazon S3 Service Instance
__Using service instances
S3 client application
Check the overall operation
organize

Chapter 15: Continuous Delivery
Beyond continuous integration
John Alspaugh of Flickr and Etsy
Netflix's Adrienne Cockcroft
__Amazon's Continuous Delivery
pipeline
test
Continuous Delivery in Microservices Environments
equipment
__Concourse
__container
Continuous Delivery of Microservices
__Concourse Installation
__Basic pipeline design
__Continuous Integration
Consumer-led contract testing
__User Microservice Pipeline
data
To the operating environment!

[Part 5 Appendix]
Appendix A Java EE and Spring Boot
Appendix B [Korean Special Appendix] Preparing and Utilizing the Cloud Foundry Environment

Detailed image
Detailed Image 1

Into the book
We are in the midst of a major shift that could have the most far-reaching impact in the history of the software industry.
The change is the shift from legacy architecture to the cloud, and from the traditional separation of development and operations to DevOps, which aims for integration.
This book addresses this transition head-on, explaining how to build cloud-native applications and providing clear guidance to ensure a successful transition.
Transitions don't happen overnight.
One of the book's greatest strengths is its focus on helping you leverage your own experience to transition to the cloud, within your current environment.
In particular, Chapter 5, "Service Pairing with Spring," contains excellent material to help you transition from legacy enterprise system conventions to cloud-friendly conventions.
This book strikes a wonderful balance between theory and practice, covering both the architectural principles of modern applications and proven, efficient implementation methods.
Because modern applications are built on proven open source solutions that offer comprehensive solutions to complex problems, the choice of open source framework to use, as well as the programming language itself, is crucial for practical use.
If you use Java as your primary language, or if you're open to being language agnostic, this book is for you.
“Reports of my death have been greatly exaggerated.” - Mark Twain
A few years ago, there was widespread speculation about the end of Java.
Java is still thriving today, and this book explains why.
Java is experiencing renewed vitality as it drives modern cloud-based application development, fueled by two key success factors: Netflix's open source projects and Spring.
This book clearly explains these two key success factors in an easy-to-understand way.
Spring was initially born to simplify the complexities of the old Java EE, but its core ideas have remained strong over the years, providing a solid and complete foundation for cloud application development.
For over a decade, we've been talking about the "Spring triangle": Dependency Injection, Portable Service Abstraction, and Aspect-Oriented Programming (AOP).
These three are still necessary today, when a clear separation between business logic and its surrounding environment is more important than ever.
The central focus of this book is Spring Boot.
Spring Boot is a new way to use Spring in the microservice era, and its adoption in development settings is rapidly increasing.
It also makes it easy to create Spring services of various sizes and shapes, and to deploy them in modern, containerized environments.
While traditional 'enterprise' Java applications still run monolithically on one massive application server, Spring Boot allows them to be broken down into smaller pieces for simplicity and efficiency.
Services are structured to focus on a single unit of work, and are deployed and run on servers of an appropriate size that are just right for that service.
This book includes cutting-edge examples of recent work from the Spring development team, including advanced integration with Netflix open source projects, as well as improvements to integration testing support with Spring Cloud Stream.
As the founder of Spring, I'm excited to see how Spring continues to innovate and focus on making life easier for developers.
For the past five years, I've been interacting with Spring solely from a user perspective, and it's been truly exciting to see it flourish and continue to conquer new complexities.
I'm on a mission to simplify things at Atomist, a company that does for developers and their development processes what Spring used to do for Java applications, by providing the ability to automate everything that matters.
Spring provides simple, productive structures and abstractions for all the tasks Java developers need to worry about.
Similarly, Atomist provides a simple, productive structure and abstractions over project source code, build systems, issue trackers, and deployment environments, enabling powerful deployment automation that spans everything from new project creation to team collaboration, including Slack and deployment event monitoring.
The fundamental building block that underpins automation is testing.
One of the things I particularly liked about the book's ongoing focus on testing is its focus on the challenging issues and solutions you encounter when testing microservices.
I also really enjoyed the rich, well-written, and concise commentary that is typical of O'Reilly, with a wealth of example code and the authors' helpful additions.
I'm so excited to write a recommendation for a book my friends wrote about a technology topic I love.
As many who have had the good fortune to hear Josh speak will tell you, Josh is a truly gifted communicator.
Josh has incorporated his proficiency in live coding into his book.
Josh and Kenny are passionate, curious, and knowledgeable.
I learned a lot and had a lot of fun on my journey to cloud nativeness with them.
Now it's your turn to have some fun.
- Rod Johnson / Founder of Spring Framework, CEO of Atomist
--- From the "Preface"

Publisher's Review
[Structure of this book]
Part 1 'Basics'
Chapter 1, "Cloud-Native Applications," and Chapter 2, "Bootcamp: Introducing Spring Boot and Cloud Foundry," explore the need for cloud-native thinking and introduce Spring Boot and Cloud Foundry.
Chapter 3, "Configuring a 12-Element Application," covers how to configure a Spring Boot application.
This theme continues throughout the book.
Chapter 4, "Testing," covers how to test Spring applications, from the simplest components to distributed systems.
Chapter 5, "Application Migration," will briefly explore the refactoring required to migrate a typical, standard application to a cloud platform like Cloud Foundry, helping you get the value you need from the cloud platform.

Part 2 'Web Services'
In Chapter 6, 'REST API', we will create a RESTful HTTP service using Spring.
The topics covered in this chapter are widely used in API development and domain-driven development.
Chapter 7, 'Routing', explores common methods for controlling the entry and exit of requests in distributed systems.
In Chapter 8, "Edge Services," we'll learn how to create a service that acts as the first gateway to accepting requests from outside.

Part 3: Data Integration
Chapter 9, "Data Management," explores how to use Spring Data to manage data in Spring applications.
What we cover here forms the foundation of domain-driven thinking.
Chapter 10, "Messaging," explores how to integrate distributed services and data using Spring's event-driven, messaging-centric architecture.
Chapter 11, "Batch Processes and Tasks," explores how to leverage the scalability of cloud platforms like Cloud Foundry to handle long-running workloads.
Chapter 12, "Data Integration," explores several ways to manage state in distributed systems.

Part 4: Operating Environment
Chapter 13, "Observable Systems," explores how to build systems that support observability and operations.
Chapter 14, "Service Broker," explores how to build a service broker that supports platforms like Cloud Foundry.
Service brokers connect stateful services, such as message queues, databases, and caches, to the cloud platform.
Chapter 15, "Continuous Delivery," explores the key concepts behind continuous delivery.
Although this is the final chapter in the book, it's a starting point for your journey toward cloud nativeness.

Part 5 'Appendix'
Appendix A, "Java EE and Spring Boot," explores how to integrate Spring Boot applications into a Java EE environment.

Finally, in the Korean special appendix B, "Preparing and Leveraging the Cloud Foundry Environment," we learn how to prepare Cloud Foundry, deploy applications, and prepare services.

[For whom this book is intended]
This book is primarily aimed at Java/JVM developers who want to build better software faster using Spring Boot, Spring Cloud, and Cloud Foundry.
If you've heard of the term microservices, noticed the skyrocketing popularity of Spring Boot, and wondered why most enterprises today are using Cloud Foundry, this book is for you.

[Author's Note]
Software makes everyone equal.
Software also offers people new paths through code.
Software can deliver value to customers and even transform people's lives.
We are honored that the Korean edition of our book, Cloud Native Java, has been published.
I hope this book will contribute, even if only a little, to creating software that opens countless paths for more people and sometimes changes people's lives.
Enjoy your journey through this book to deploy your code into real-world services!
- Josh Long, author of Cloud Native Java and Spring Developer Advocate

Our book, "Cloud Native Java," has been translated into Korean! Thanks to Jin Yoon, Myeongun, Hyeonhee, and the Korean translation team.
The patterns used in cloud applications are both familiar and new.
This book has tried to capture what Java Spring developers need to consider when implementing cloud-based applications.
Scalability doesn't just mean being able to increase the number of servers.
To handle more requests and workloads, we need to use techniques that are appropriate for it.
This approach should be applicable to applications of all sizes, and allows for the collection of flexible applications, each performing its own function, into a single, large-scale service.
I am very pleased to be able to publish the book I presented during my visit to Korea in 2016 in Korean, and I hope it will be helpful to many Spring users.
- Kenny Bastani, author of Cloud Native Java and Spring Developer Advocate

[Translator's Note]
“Maintaining software isn’t about ‘making it work the way it used to.’
“It’s about making things always useful in a changing world,” said Phil Webb of Pivotal, the lead on the Spring Boot project, quoting atomic theorist Jessica Kerr during his SpringOne Platform 2017 presentation (https://youtu.be/MQamx7-bCVI).
For most companies today that offer web- or mobile-based services, their ability to handle software and data is their competitive advantage.
Implementing ideas into working software, delivering this software to customers as quickly as possible, and repeatedly validating its value are crucial to the success of any business.

In his presentation that day, Phil Webb cited the example of the Nokia 6610 phone, which was released the same year that the Spring project and Spring Framework were announced.
The Nokia 6610 is still available on the market today, and is even repairable, but no one uses it today.
Instead, everyone uses the latest smartphones with more features.
Because the world's perception of 'telephones' has changed.
Devices that fail to adapt to change are bound to be shunned by the market.
On the other hand, Spring projects are still used in many service applications and are even gaining more users recently.
Because over the years, Spring has consistently reflected changes in the market.
Phil Webb then gave an example of statistics for Spring Initializer (http://start.spring.io), which is used when starting a Spring Boot application.
Among the various view technologies applied to Spring MVC, Thymeleaf is still widely used by developers, but Velocity's usage gradually decreased and eventually disappeared.
At some point, the usage of this velocity in Spring initializers became zero because the Spring team decided to no longer support velocity.
The Velocity project is no longer active and no longer receives updates, so we excluded Velocity as it could have a negative impact on Spring users in terms of stability, security, etc.

“The journey to the destination we conceptually set is not as straight as we imagine, but is littered with numerous obstacles and difficulties, and even after overcoming all those difficulties, the destination we arrive at may not be the destination we wanted,” said Onsi Fakuhouri, Head of Cloud Foundry R&D at Pivotal, in his SpringOne Platform 2017 presentation (https://youtu.be/_uB5bBsMZIk).
Therefore, rather than taking on such a huge risk, he added, we should repeat the process of observation, selection, and learning.
We can also apply this method when we are trying to find our destination on our first trip.
First, check the map and surrounding terrain on your smartphone, compare them, and then move around.
To reach your desired destination faster, you just need to be able to repeat this process faster.

In the survival of the Spring project, we can see an example of the observe-do-learn iteration that Onsi mentioned.
Spring uses this method to examine the needs of developers in the market, reflect them, and observe the results.
As a result, the Spring Boot project was born, and the Spring Cloud project was born.
The market's demand for cloud-based applications has grown stronger, which has meant that the Spring Framework must accommodate not only higher availability and scalability, but also more frequent changes.
Therefore, many of today's Spring projects have successfully survived, unlike Nokia phones, because they have embraced and adapted to the changing demands of the market.
And today, various Spring projects are repeating this process.

Spring Boot provides a way for us to no longer have to suffer with XML configuration.
The same configuration that needs to be repeated every time is provided by the Spring Boot team, and developers can use the necessary functions in a different way than before through dependency injection.
In addition to this, Spring Boot provides various advantages based on ‘reusability’.
In addition, Spring Cloud allows you to use the technologies used by leading companies like Netflix and Amazon, which are already building leading applications in this field, in a Spring Boot way when you want to implement cloud-based applications.
When solving a difficult problem that someone else has already solved, developers familiar with Spring can almost immediately apply the key concepts Netflix uses.

Additionally, the cloud provides the ability to use tools that existed before and tools that didn't exist before through API exposure.
Relational databases, which have been around for a long time, are no longer prepared by the operations team installing them on the server as they used to be.
Using the API for database creation, developers can get the database they need right away.
In addition to relational databases, it also supports a variety of new tools such as message queues, NoSQL databases, machine learning tools, and data movement between data sources.
It is extremely difficult to install these tools on developers' laptops, desktops, or servers every time.

Netflix recently announced the concept of a Full Cycle Developer on its tech blog (https://bit.ly/2k91j0b).
A full-cycle developer is a developer who can handle the entire life cycle of an application.
The software life cycle refers to the flow of design, development, testing, deployment, operation, and support.
In almost all organizations, each step is organized into teams with specialists covering only their own areas of expertise.
In such an organizational culture, the preceding or subsequent steps are treated as not one's own work, or a culture develops in which no one gets involved because they lack expertise.
Having people and teams working on a common piece of software that are not mutually involved makes the software very expensive to maintain and is, moreover, very detrimental to the software's continued existence.
In contrast, Netflix is ​​creating and implementing a method that allows all of its developers to run the code they create themselves.
In other words, developers directly manage the entire software life cycle.
A key factor in making this possible is providing developers with a variety of easy-to-use platform tools.
It provides easy monitoring for the observations required when operating your own software, supports execution as distribution and connection, and provides tools for learning through logs and log analysis.
And Cloud Foundry is positioned precisely at this point.
By providing monitoring, logging, deployment, and an operating environment for applications, developers will be able to get one step closer to becoming full-cycle developers.
The combination of Spring applications and the Cloud Foundry environment they run in allows you to more quickly execute the "observe-run-learn iterations required to adapt to market changes and remain relevant," as Phil Webb and Onsi Pakuri note.
You could probably set up your own server without Cloud Foundry, but it would probably involve a lot of separate, repeatable work that someone else has already done to make it faster than what Cloud Foundry provides.
I think it would be more helpful for you to focus on the Spring application itself at this time.
This book, "Cloud Native Java," will provide developers accustomed to traditional development methods with the "concepts and technologies needed for the modern era" through the Spring method.
Therefore, I believe that if you are a developer familiar with Spring, it will play a role in helping you acquire modern development techniques at a rapid pace.

This book introduces Spring tools that can accommodate change so that your software is always useful.
If 『Toby's Spring』 by Ilmin Lee was the book that opened the way to Spring for Java developers before the cloud era, then 『Cloud Native Java』 is an introductory book that provides Spring developers with the skills necessary for the cloud era.

Additionally, this book introduces Cloud Foundry and explains how to provide an environment where your Spring applications can run on the benefits of the cloud, while also providing a way to immediately prepare and connect various services required for your Spring applications.
The method of 'binding' used between applications and data services refers to the system providing a connection without the developer needing to know network information or authentication information about the data source.
In other words, the system automatically processes the information required for connection, and provides an environment in which developers can bind and use the data source in their applications by simply knowing the name of the data source they need.
This not only provides development convenience, but also increases scalability and availability by changing how information, which can be created and destroyed at any time in a cloud environment, is handled.

In addition to binding, we also introduce techniques for implementing microservices.
Most of the first questions about microservices are about data separation. Chapter 9, "Data Management," explains how to separate data in a typical retail service based on bounded contexts and how to select the right data store for each data, along with Spring code.
The book's coverage is far broader than you might expect, and the authors' comprehensive explanations cover the full spectrum of what it takes to embrace rapid change and run applications in a cloud-based environment.
With just this one book, readers can cover a vast amount of material that would otherwise require reading and compiling numerous other books, and, if necessary, can consult other books that focus on specific areas of interest.

"There is no need to change it.
"Survival is not an obligation." This paradoxical expression means that survival in the market is an individual's choice and that it fails to adapt to the changing times.
This book is the ultimate gift from Spring experts to enterprise Spring developers interested in adapting and surviving in a changing environment.

- All translators

The development of personal computers and the Internet in the late 1990s and early 2000s simultaneously led to the expansion of the server market and server applications.
The phenomenon known as the mobile explosion occurred with the advent of smartphones, and the emergence of clouds capable of handling the explosive growth in client requests.
Building applications that fit this new environment will enable unprecedented scale and rapid deployment to meet these massive client demands.
This book provides Java Spring developers with the skills they need to build "cloud-native" applications that are suitable for these extensions and faster deployment.
This is a must-read for enterprise Java developers interested in the cloud.

-Jeong Yun-jin

It's been over five years since I last heard the term microservices.
Breaking things down into small pieces, making them quickly, failing quickly, and evolving quickly is not as easy as it sounds, but it has clear advantages, so it is being attempted consistently despite many trials and errors.
Now, we're taking the shift to DevOps one step further, moving our deployment environment to the cloud.
This book is like an A to Z of cloud native development, and will guide you into the world of cloud native development through conceptual organization and detailed examples.

- Oh Myeong-un

Microservices architecture is now becoming a mainstream architecture for developing applications based on cloud-based distributed environments. However, building a proper microservices architecture and developing scalable applications based on it is by no means easy.
I've been developing microservices-based applications in C# for about five years now, but while translating this book, I couldn't help but shudder with envy at Java developers.
If I had been granted an environment with all the platforms necessary to implement microservices, the past five years wouldn't have been so difficult and challenging.
This book is an effective introduction that covers a wide range of information needed to develop and operate cloud-native applications based on a microservices architecture.
Beyond simply introducing the Cloud Foundry platform, this book is packed with techniques and know-how for developing efficient, scalable, reliable, and self-healing distributed applications. It will serve as an essential guide for navigating the seas of microservices.
This book, which brings together the authors' extensive expertise and expertise in cloud and distributed environments, along with the translators' equally impressive experience and capabilities, will help you confidently take your first steps toward microservices architecture.

- Jang Hyun-hee
GOODS SPECIFICS
- Date of publication: June 29, 2018
- Page count, weight, size: 784 pages | 1,462g | 188*240*36mm
- ISBN13: 9791196203733
- ISBN10: 1196203733

You may also like

카테고리