Spring and Functions - Implement Once Execute Anywhere!
Functions are everywhere and they’ve been around since the beginning of computing. They’re obviously not going anywhere, especially in today’s world with the advent of distributed cloud-native architectures, microservices and serverless platforms full of FAAS and PAAS vendors, how can one stay vendor-neutral when it comes to implementing, deploying and executing your business use cases? As always, Spring comes to the rescue and in this mostly hands-on workshop, we'll uncover not only the under-appreciated value of java functional support (i.e., Supplier, Function, and Consumer), we will also dive deep into Spring Cloud Function framework and value it adds in ensuring your implementation stays clean and neutral, yet ready and capable of executing in the run-time environment of your choice. We'll cover a variety of use cases (e.g., messaging, streaming, REST, reactive, etc.), demonstrating their applicability using popular runtimes and products as an example (e.g., Spring Cloud Stream, RabbitMQ, Microsoft Azure, and more).
What you'll learn-and how you can apply it
By the end of this workshop, you'll understand:
- The benefits of using and thinking in terms of functions
- The benefits of Spring adds to the functional support provided by JVM
- The benefits using functions in streaming use cases
And you will be able to:
- Implement functions and interact with them in the context of Spring
- Understand and feel comfortable working with Spring Cloud Function
- Integrate your functional code with other Spring and non-Spring projects.
This training course is for you because...
- You want to learn the importance of functional programming
- You want to learn how you can benefit from the application of Spring Cloud Function framework
- You want to learn from the source where the instructor is the also a key developer of the presented technology
- Basic understanding of Spring core concepts (i.e., managed bean)
- Basic Spring Boot knowledge
- Familiarity with start.spring.io - Spring Initializr
- Attendees must be Java developers and have Maven capable development environment configured on their machines. This could be Eclipse, IntelliJ, etc. The instructor will use Eclipse and some command line utilities.
- Familiarity with Spring Cloud Function project site - https://spring.io/projects/spring-cloud-function
- Building Microservices with Spring Boot (video) - https://www.oreilly.com/library/view/building-microservices-with/9780134192468/
About your instructor
Oleg is an open source practitioner with over 18 years of experience in software engineering across multiple disciplines including software architecture and design, consulting, business analysis and application development. Speaker who presented seminars at dozens of conferences worldwide (i.e. SpringOne, JavaZone, Hadoop Summit,, JavaOne, Scala Days, Oredev etc.), Oleg is currently the tech lead for Spring Cloud Function and Spring Cloud Stream projects of Spring Cloud portfolio.
The timeframes are only estimates and may vary according to how the class is progressing
Segment 1: Functions, why do I care? Length (60 min)
When you say functions what exactly do you mean? (10 min, slides only)
- The goal of this section is to set the scope for the rest of this workshop. We’ll touch on the meaning of functions and functional programming with the goal of emphasizing the specific areas relevant to this workshop.
So why Functions? (10 min, slides and live code)
- In this section we’ll cover the benefits of using functions specifically in the context of JVM-based languages (e.g., Java). We’ll discuss the concepts such as portability, testing and more. We will also touch on some of the limitations.
Why/What/How Spring Cloud Functions? (35 min, slides and live code)
- Building on previous sections, this section will introduce audiences to Spring Cloud Function by further explaining the need for addressing some of the limitations of functional support currently available in JVM-based languages. Function composition, routing and type conversion are just a few concepts that will be covered in this section.
- 5 min BREAK
Segment 2: Spring Cloud Function - under the hood Length (60 min)
In this section we will look at the details behind core features of Spring Cloud Function (55 min, mostly live code).
- Function Composition
- Reactive function support
- Transparent type conversion
- Function Routing
- POJO functions
- Function Deployment
- Web Support
- 5 min BREAK
Segment 3: Spring Cloud Function and serverless platforms Length (30 min)
- In this section we will cover the benefits of using Spring Cloud Function in a serverless environments such as Amazon AWS and Microsoft Azure (25 min, mostly live code).
- 10 min BREAK
Segment 4: Streaming with Spring Cloud Function Length (85 min)
So, what is streaming and how can Spring Help? (10 min, slides only)
- Quick intro to Spring Cloud Stream. Here we will briefly cover core features of the framework such as Binder and Bindings relevant to the topic of functions. (10 min, slides only)
Finally we will see how to:
- Bind functions to binder destinations and binding configuration relevant to functions. (20 min, mostly live code)
- Use functions as sources. This is where we’ll talk at length about Supplier and various ways it could be triggered (i.e., event, poll and hybrid) (20 min, mostly live code)
- Stream data with Reactive Functions. Here we will cover simple one-to-one style reactive functions as well as many-to-one, one-to-many and many-to-many where ‘one’ and ‘many’ implies inputs and outputs. (25 min, mostly live code)