Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On High Performance with Spring 5

You're reading from   Hands-On High Performance with Spring 5 Techniques for scaling and optimizing Spring and Spring Boot applications

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788838382
Length 408 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (5):
Arrow left icon
Subhash Shah Subhash Shah
Author Profile Icon Subhash Shah
Subhash Shah
Chintan Mehta Chintan Mehta
Author Profile Icon Chintan Mehta
Chintan Mehta
Dinesh Radadiya Dinesh Radadiya
Author Profile Icon Dinesh Radadiya
Dinesh Radadiya
Pritesh Shah Pritesh Shah
Author Profile Icon Pritesh Shah
Pritesh Shah
Prashant Goswami Prashant Goswami
Author Profile Icon Prashant Goswami
Prashant Goswami
+1 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Exploring Spring Concepts FREE CHAPTER 2. Spring Best Practices and Bean Wiring Configurations 3. Tuning Aspect-Oriented Programming 4. Spring MVC Optimization 5. Understanding Spring Database Interactions 6. Hibernate Performance Tuning and Caching 7. Optimizing Spring Messaging 8. Multithreading and Concurrent Programming 9. Profiling and Logging 10. Application Performance Optimization 11. Inside JVM 12. Spring Boot Microservice Performance Tuning 13. Other Books You May Enjoy

Spring projects

The Spring Framework provides different kinds of projects for different infrastructure needs, and also helps to explore solutions to other problems in the enterprise application: deployment, cloud, big data, and security, among others.

Some of the important Spring projects are listed as follows:

  • Spring Boot
  • Spring Data
  • Spring Batch
  • Spring Cloud
  • Spring Security
  • Spring HATEOAS

Let's discuss them in detail.

Spring Boot

Spring Boot provides support to create standalone, production-grade, Spring-based applications that you can just run.

Spring Boot also provides some of the following features out of the box, by taking an opinionated view of how applications have to be developed:

  • Provides support for developing standalone Spring applications
  • Embeds Tomcat, Jetty, or Undertow directly, with no need to deploy WAR files
  • Allow us to externalize configuration to work in different environments with the same application code
  • Simplifies Maven configuration by providing opinionated starter POMs
  • Eliminates the need for code generation and the requirement for XML configuration
  • Provides support for production features like metrics, health checks, and application monitoring

We will look at Spring Boot in depth in Chapter 12, Spring Boot Microservice Performance Tuning.

Spring Data

The main goal of the Spring Data project is to provide an easy and consistent Spring-based model to access data and other special features, to manipulate SQL-and NoSQL-based data stores. It also tries to provide an easy way to use data access technologies, map-reduce frameworks, relational and non-relational databases, and cloud-based data services.

Some of the important features are as follows:

  • Provides support for integration with custom repository code
  • Provides repository and object-mapping abstractions by deriving dynamic queries using repository method names
  • Advanced integration support with Spring MVC controllers
  • Advanced support for transparent auditing features such as created by, created date, last changed by, and last changed date
  • Experimental integration support for cross-store persistence

Spring Data provides integration support for the following data sources:

  • JPA
  • JDBC
  • LDAP
  • MongoDB
  • Gemfire
  • REST
  • Redis
  • Apache Cassandra
  • Apache Solr

Spring Batch

Spring Batch facilitates essential processing for large volumes of records, including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource management, by providing reusable functions. It also provides more advanced technical services and features that will enable extremely high-volume and high-performance batch jobs using optimization and partitioning techniques.

Important features of Spring Batch are as follows:

  • The ability to process data in chunks
  • The ability to start, stop and restart jobs, including the ability to restart, in the case of failed jobs, from the point where they failed
  • The ability to retry steps or to skip steps on failure
  • Web-based administration interface

Spring Cloud

It is not an overstatement to say the world is moving to the cloud.

Spring Cloud provides tools for developers to build common patterns in distributed systems. Spring Cloud enables developers to quickly build services and applications that implement common patterns to work in any distributed environment.

Some of the common patterns implemented in Spring Cloud are as follows:

  • Distributed configuration
  • Service registration and discovery
  • Circuit breakers
  • Load balancing
  • Intelligent routing
  • Distributed messaging
  • Global locks

Spring Security

Authentication and authorization are the essential parts of enterprise applications, both web applications and web services. Spring Security is a powerful and highly customizable authentication and access control framework. Spring Security focuses on providing declarative authentication and authorization to Java applications.

Important features in Spring Security are as follows:

  • Comprehensive support for both authentication and authorization
  • Good support for integration with servlet APIs and Spring MVC
  • Module support for integration with Security Assertion Markup Language (SAML) and Lightweight Directory Access Protocol (LDAP)
  • Providing support for common security attacks such as Cross-Site Forgery Request (CSRF), session fixation, clickjacking, and so on

We will discuss how to secure web applications with Spring Security in Chapter 4, Spring MVC Optimization.

Spring HATEOAS

The main purpose of Hypermedia As The Engine Of Application State (HATEOAS) is to decouple the server (the service provider) from the client (the service consumer). The server provides the client with information on other possible actions that can be performed on the resource.

Spring HATEOAS provides a HATEOAS implementation, especially for the REpresentational State Transfer (REST) services implemented with Spring MVC.

Spring HATEOAS has the following important features:

  • A simplified definition of links pointing to service methods, making the links less fragile
  • Support for JSON and JAXB (XML-based) integration
  • Support for hypermedia formats such as Hypertext Application Language (HAL)

In the next section, we will understand the mechanism of Spring's IoC container.

You have been reading a chapter from
Hands-On High Performance with Spring 5
Published in: Jun 2018
Publisher: Packt
ISBN-13: 9781788838382
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime