Craig Walls is a Principal Engineer, Java Champion, Alexa Champion, and the author of Spring AI in Action, Spring in Action, and Build Talking Apps. He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring. When he's not slinging code, Craig is planning his next trip to Disney World or Disneyland and spending as much time as he can with his wife, two daughters, 1 bird and 2 dogs.
At its core, Spring is built on a dependency injection framework that enables (among other things) loose coupling of application components. But dependency injection is not the only way to achieve loose-coupling. Event-driven design, as its name implies, enables components to react to events, not knowing where they came from, process those events, and then publish new events not knowing who (if anybody) will be handling those events.
In this session, we’re going to explore how to apply events in Spring applications to achieve looser coupling of components. We’ll start by looking at some fundamental abilities that the core framework offers for handling events. Then we'll quickly move into a higher-level form of event-driven architecture where events aren’t just handled within a single deployment, but span across multiple microservices by employing Spring Cloud Stream and Spring Cloud DataFlow. And then we’ll see how, when paired with serverless functions based on Spring Cloud Function, we can achieve not only loose-coupling of microservices, but also an efficient yet scalable use of resources in our event-driven architecture.
Although Java originally promised write once, run anywhere, it failed to fully deliver on that promise. As developers, we can develop, test, and build our applications into WAR or executable JAR files and then toss them over the wall to a Java application server and Java runtime that we have no control over, giving us zero confidence that the application will behave the same as when we tested it.
Containers fulfill the write-once, run anywhere promise that Java wasn't able to, by packaging the runtime and even the operating system along with our application, giving greater control and confidence that the application will function the same anywhere it is run. Additionally, containers afford several other benefits, including easy scaling, efficiency in terms of resource utilization, and security by isolating containers from their host system and from other containers.
While deploying Spring applications in containers has always been possible, Spring Boot makes it easier to containerize our applications and run them in container architectures such as Kubernetes. Spring Boot's support for containerization includes two options: Creating containers based on buildpacks or using layers as a means of modularizing and reducing the size of our application deployments. Moreover, new components in the Spring ecosystem can make your Spring applications Kubernetes-savvy so that they can take advantage of what a containerized architecture has to offer.
In this example-driven session, we're going to look at how to create and deploy Spring applications as container images and deploy them into a Kubernetes cluster. Along the way, we'll also get to know a few of the most useful tools that a Spring developer can employ in their development workflow when building containerized Spring applications. We'll also see how to apply patterns of Spring Cloud–such as configuration, service discovery, and gateways–using native Kubernetes facilities instead of Spring Cloud components. And we'll look at how components of the Spring ecosystem can work with your Spring applications to enable them to thrive in a Kubernetes cluster.
In a microservice architecture, the API Gateway pattern plays an important role, providing several benefits. It prevents clients from knowing anything about how the application is broken up into microservices or needing to know where those microservices can be accessed. It can optimize interactions with the backend services, by reducing the number of requests required to complete a task. It can act as the front line of security, ensuring that only authorized clients are able to access services. It can address service level requirements such as rate-limiting. And those are just a few benefits of an API gateway.
In this session, we’ll look at how to add an API gateway to you microservice architecture with Spring Cloud Gateway. Spring Cloud Gateway is a fully-featured implementation of API gateway that supports a variety of protocols in addition to HTTP and is fundamentally reactive. You’ll see how standing up a gateway in front of several backend services can simplify a client, optimize request, and more.
The human-computer interface has changed a lot over the years. Keyboards, mice, and touchscreens to interact with desktop, web, and mobile applications. While all of these forms of UI are commonplace, they require that the human interact with the computer on the computer's terms.
Humans interact with each other by talking and listening to each other. What if you could interact with applications the same way?
The good news is that you can! Voice user interfaces do not aim to replace other forms of UI, but offer another choice that's natural and lends itself to moments when typing and tapping aren't as convenient or possible.
In this example-driven session, we'll explore ways to integrate Alexa voice applications with backend applications, with an emphasis on Spring in the backend. We'll see how to leverage support that both platforms offer for connected applications to connect with OAuth2-secured services. And we'll see how Spring web applications can be outfitted with code to handle voice requests.
Spring Framework has been making Java developers more productive and successful for over a dozen years, and it shows no signs of slowing down!
Spring in Action, 5th Edition is the fully-updated revision of Manning's bestselling Spring in Action. This new edition includes all Spring 5.0 updates, along with new examples on reactive programming, Spring WebFlux, and microservices. Readers will also find the latest Spring best practices, including Spring Boot for application setup and configuration.
Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.