Software Architecture with Spring 5.0
eBook - ePub

Software Architecture with Spring 5.0

Design and architect highly scalable, robust, and high-performance Java applications

René Enríquez, Alberto Salazar

Share book
  1. 372 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Software Architecture with Spring 5.0

Design and architect highly scalable, robust, and high-performance Java applications

René Enríquez, Alberto Salazar

Book details
Book preview
Table of contents
Citations

About This Book

Discover how different software architectural models can help you solve problems, and learn best practices for the software development cycle

Key Features

  • Learn concepts related to software architecture and embrace them using the latest features of Spring 5
  • Discover architectural models and learn when to apply them
  • Gain knowledge of architectural principles and how they can be used to provide accountability and rationale for architectural decisions

Book Description

Spring 5 and its ecosystem can be used to build robust architectures effectively. Software architecture is the underlying piece that helps us accomplish our business goals whilst supporting the features that a product demands. This book explains in detail how to choose the right architecture and apply best practices during your software development cycle to avoid technical debt and support every business requirement. Choosing the right architecture model to support your business requirements is one of the key decisions you need to take when a new product is being created from scratch or is being refactored to support new business demands. This book gives you insights into the most common architectural models and guides you when and where they can be used. During this journey, you'll see cutting-edge technologies surrounding the Spring products, and understand how to use agile techniques such as DevOps and continuous delivery to take your software to production effectively. By the end of this book, you'll not only know the ins and outs of Spring, but also be able to make critical design decisions that surpass your clients' expectations.

What you will learn

  • Understand the key principles of software architecture
  • Uncover the most common architectural models available
  • Analyze scenarios where an architecture model should be used
  • Implement agile techniques to take your software to production
  • Secure the products you are working on
  • Master tricks that will help you build high-performant applications
  • Use cutting-edge technologies to build products

Who this book is for

If you're an experienced Spring developer aspiring to become an architect of enterprise-grade applications, this book is for you. It's also ideal for software architects who want to leverage Spring to create effective application blueprints.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Software Architecture with Spring 5.0 an online PDF/ePUB?
Yes, you can access Software Architecture with Spring 5.0 by René Enríquez, Alberto Salazar in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Programación en Java. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781788996730

Serverless Architectures

Serverless architectures are becoming a popular trend in IT system building. As a consequence, it's quite common to hear people discussing cloud providers such as Amazon Web services (AWS), Google Cloud, and Microsoft Azure, among others.
In this chapter, we will explore the meaning of serverless architecture and how this new way of building systems can help us to address business requirements in shorter amounts of time, thus reducing the effort required to build business solutions. We will also look at how this approach can be used to drastically reduce the time required to reach production by utilizing ready-to-use, third-party services and implementing custom functionalities, thereby creating stateless functions that can be deployed on the cloud.
In this chapter, we will cover the following topics:
  • An introduction to serverless architecture
  • Infrastructure and file storage
  • Benefits and pitfalls
  • Backend as a service
  • Function as a service
  • Concerns about serverless architectures:
    • Vendor lock-in concerns
    • Security concerns
    • Framework support
    • Troubleshooting
  • Examples and commons uses of serverless architecture
  • Implementing applications using serverless architecture:
    • How to write functions with Spring
    • Using adapters for AWS Lambda and Azure

An introduction to serverless architecture

Serverless architecture was born through the initiative of Amazon. The company was looking to promote an environment wherein a development team could be autonomous, small, and self-managed, allowing it to work on the whole software development cycle, from writing the code to shipping and delivering to production environments.
Serverless architecture is sometimes misunderstood as the concept of software systems that are deployed without the need for a physical server. To understand this idea, you can review the definition of serverless in Martin Fowler's blog:
"It's important to understand that a serverless architecture is the approach in which developers code business logic as functions, forgetting about the server's provisioning and scaling concerns where the logic will be executed."
- https://martinfowler.com/articles/serverless.html
Common examples of serverless and FaaS include:
  • Authentication
  • SMS notifications
  • Email services
On the other hand, within a serverless world, it's common to create applications in which third-party services are adopted as a part of the system (rather than creating services from scratch). These services are commonly known as backend as a service (BaaS) or mobile backend as a service (MBaaS).
Following the same approach, we can code our custom business logic in the form of functions that can be deployed on the cloud. These services are known as function as a service (FaaS).
The following diagram illustrates how third-party services and custom functions are created, deployed, and consumed by different software systems:
Third-party services and custom functions

Infrastructure and file storage

Infrastructure and file storage are also considered serverless, because the business (or person) that owns the system does not have to purchase, rent, or provision servers or virtual machines to use them.
As developers, if we take the old-fashioned approach (provisioning all of the infrastructure by using an on-premise environment), we have to set up all of the software and hardware requirements for every environment in which we want to deploy our software systems. This provisioning process has to be repeated for all of the environments, until we get into production, at which point we have to take care of other features, such as scaling and monitoring. In many cases, our infrastructure will be under-utilized, which is a waste of money, since we have purchased powerful servers to deploy applications that don't need many resources.

Benefits and pitfalls

Adopting a serverless architecture approach to creating applications provides us with many benefits, but there are also some pitfalls that we should address. Let's start by reviewing the benefits:
  • Developers using a serverless architecture can focus primarily on the code, and can forget everything related to provisioning servers, which is a task handled by the cloud provider itself.
  • The scaling of the code is ephemeral, meaning that it can be scaled and can spin up or down, based on the number of requests retrieved.
  • By definition, all of the functions used to code the business logic must be stateless, and therefore, loosely coupled. In this way, the tasks are focused on well-defined responsibilities.
  • ...

Table of contents