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 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Spring Boot 2.0 Projects

Build production-grade reactive applications and microservices with Spring Boot

Mohamed Shazin Sadakath

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Spring Boot 2.0 Projects è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Spring Boot 2.0 Projects di Mohamed Shazin Sadakath in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Programming in Java. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781789134223
Edizione
1

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...

Indice dei contenuti

Stili delle citazioni per 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.