Spring Boot 2.0 Projects
eBook - ePub

Spring Boot 2.0 Projects

Build production-grade reactive applications and microservices with Spring Boot

Mohamed Shazin Sadakath

  1. 336 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Spring Boot 2.0 Projects

Build production-grade reactive applications and microservices with Spring Boot

Mohamed Shazin Sadakath

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Develop diverse real-life projects including most aspects of Spring Boot

Key Features

  • Run production-grade based applications using the Spring WebFlux framework
  • Learn to develop high performance, asynchronous applications with Spring Boot
  • Create robust microservice-based applications with Kotlin using Spring Boot

Book Description

Spring is one of the best tools available on the market for developing web, enterprise, and cloud-ready software. The goal of Spring Boot is to provide a set of tools for quickly building Spring applications that are easy to configure, and that make it easy to create and run production-grade Spring-based applications. Spring Boot 2.0 Projects will get you acquainted with important features of the latest version of this application-building tool and will cover basic, as well as advanced topics.

The book starts off by teaching you how to create a web application using Spring Boot, followed by creating a Spring Boot-based simple blog management system that uses Elasticsearch as the data store. As you make your way through the chapters, you'll build a RESTful web services application using Kotlin and the Spring WebFlux framework. Spring WebFlux is a new framework that helps in creating a reactive application in a functional way. Toward the end of the book, you will build a taxi-hailing API with reactive microservices using Spring Boot and a Twitter clone with a Spring Boot backend. Finally, you'll learn how to build an asynchronous email formatter.

What you will learn

  • Learn the fundamental features of Spring Boot 2.0
  • Customize Spring Boot 2.0 applications
  • Build a basic web application
  • Use Redis to build a taxi-hailing API
  • Create a simple blog management system and a Twitter clone
  • Develop a reactive RESTful web service with Kotlin using Spring Boot

Who this book is for

This book is for competent Spring developers who wish to understand how to develop complex yet scalable applications with Spring Boot. You must have a good knowledge of Java programming and be familiar with the basics of Spring.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Spring Boot 2.0 Projects als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Spring Boot 2.0 Projects von Mohamed Shazin Sadakath im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in Java. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2018
ISBN
9781789134223

Building an API with Reactive Microservices

This chapter will help readers get started on developing reactive microservices using Spring Boot 2.0. It will enable experts as well as beginners in Spring Boot web application development to understand the concepts behind a microservice and how easy it is to use Spring Boot 2.0 to develop a microservice application. It will explain these concepts by walking the reader through the process of developing two microservices related to a Taxi Hailing System, where one will be for the Taxi Service, including functions such as getting available taxis, finding the status of a taxi, updating taxi location, and registering taxis, and the other one will be for the Taxi Booking Service, which will allow users to book a taxi, cancel a taxi, and so on. These two microservices will be running inside a container platform named Docker and will use a Redis instance for persistence, Spring Data Redis Reactive for the model and repository, and Spring WebFlux for controllers.
The following topics will be covered in this chapter:
  • Using Spring Data Redis for persistence
  • Using Spring WebFlux for controllers
  • Using asynchronous data transfer for cross-microservice communication
  • Using Docker to support microservices
  • Demonstrating Saber

Technical requirements

In order to implement the web application using Spring Boot, the following build tools need to be downloaded and installed:
  • To install Java Development Kit (JDK) 8, download it from its official page at http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  • To install Maven 3, download it from its official page at https://maven.apache.org/download.cgi
  • To install IntelliJ IDEA, download it from its official page at https://www.jetbrains.com/idea/download/
  • To install Spring Tool Suite (STS), download it from its official page at https://spring.io/tools
  • To install Docker, download it from its official page at https://www.docker.com/get-docker
The source code for this chapter can be found at https://github.com/PacktPublishing/Spring-Boot-2.0-Projects-Fundamentals-of-Spring-Boot-2.0, under the Chapter06 directory.

Getting started

In this section, the reader will get an overview of the reactive microservices being developed. The requirements, design, and implementation details will be discussed in brief.

Microservices architecture

Microservices architecture has become a buzzword within the last five years with the emergence of cloud-based hosting services. There is no fixed definition of this architecture, but in general terms, microservices architecture is a way of designing and implementing software as a collection of independently deployable services that are highly coherent and loosely coupled. Each of these services will be designed, implemented, deployed, and maintained by a team of usually 5 to 10 members with complete ownership and accountability. Each microservice will address a particular domain of a system (user, sales, and others), can be developed using different programming languages, and can have its own persistence and an API to enable synchronous communication and/or a publisher/subscriber model for asynchronous communication.
Microservices architecture was preceded by monolithic architecture, where all the functionality was grouped into a single application that loaded and ran inside a single process. This monolithic software was really heavy and took a lot of time to load, and scaling required the entire application to be scaled by replicating it in multiple servers. There was no way to scale a particular functionality alone. This is depicted in the following diagram:
Microservices architecture addressed these pain points by enabling us to run small, highly cohesive applications that do one functionality really well. This could load fast and require fewer resources to function. Scaling of a microservice can be done by distributing it across servers and by replicating it as and when needed. Consider the following diagram:
There are some characteristics that can be found in any Microservices architecture-based software application, which are as follows:
  • Service components: The components in a microservice architecture are services that can communicate via a web request, RPC call, and so on. Unlike library components in a monolithic application where communication happens between library components via in-memory, in-process calls internally without an external API.
  • Organized by business domain: In a monolithic application, l...

Inhaltsverzeichnis

Zitierstile für Spring Boot 2.0 Projects

APA 6 Citation

Sadakath, M. S. (2018). Spring Boot 2.0 Projects (1st ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/778073/spring-boot-20-projects-build-productiongrade-reactive-applications-and-microservices-with-spring-boot-pdf (Original work published 2018)

Chicago Citation

Sadakath, Mohamed Shazin. (2018) 2018. Spring Boot 2.0 Projects. 1st ed. Packt Publishing. https://www.perlego.com/book/778073/spring-boot-20-projects-build-productiongrade-reactive-applications-and-microservices-with-spring-boot-pdf.

Harvard Citation

Sadakath, M. S. (2018) Spring Boot 2.0 Projects. 1st edn. Packt Publishing. Available at: https://www.perlego.com/book/778073/spring-boot-20-projects-build-productiongrade-reactive-applications-and-microservices-with-spring-boot-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Sadakath, Mohamed Shazin. Spring Boot 2.0 Projects. 1st ed. Packt Publishing, 2018. Web. 14 Oct. 2022.