Friday, June 25, 2021
You can think about the granularity, try to fix the consistency with sagas,
evaluate various communication protocols, think about partial failures or ...just ignore the CAP and ship a nice monolith, save time and take vacations.
In this session, I would create the smallest possible Java monolith (actually a microlith) from scratch, discuss the design choices, tradeoffs and patterns.
At the end, I will discuss the killer use cases for microservices and how to break the microlith into several nanoliths.
Questions are highly appreciated!
The idea of limited work-in-progress (WIP) is coming from Lean methodologies. At its core, it means that new tasks should only be started when the current piece of work is done and delivered. Finding the right work-in-progress limit can increase overall system (organization) throughput. This idea can be applied on many levels including writing code. In this live coding session, I will write FizzBuzzWoof code kata in Kotlin showcasing software development workflows that can be used for limiting work-in-progress. In particular: change size notifications, auto-revert, TDD, TCR (test && commit || revert).
What is a monad? Do I need a Ph.D. to write in a functional style? How do I do that in Kotlin? And other questions that you were afraid to ask.
In this talk, we'll walk through Arrow Core, the functional companion to the Kotlin standard library. We'll cover both the concepts that every software engineer may add to their project right now and more advanced structures, starting from the non-empty list, going over Validated, and Either followed by monad comprehension.
Applications in a microservices architecture can communicate with each other in different ways. Adopting an event-driven paradigm based on asynchronous messaging provides services a way of communicating while reducing runtime coupling. Functions are a natural way of implementing event-driven business logic in terms of suppliers, processors, and consumers. Furthermore, when going serverless, we aim at executables with instant startup and efficiency. Enter Spring.
Spring Cloud Function favors using the functional programming paradigm to implement your business logic and provides useful features to build data pipelines, including type conversion and function composition. Functions can be exposed through different options (like web endpoints or message channels), and adapters are available to run them on platforms like Knative, AWS Lambda, Azure Functions, and GCP Functions. Spring Cloud Stream integrates your functions with messaging systems like RabbitMQ and Kafka without requiring any change to your code. Finally, Spring Native lets you compile your applications as native executable using GraalVM and providing instant startup, instant peak performance, and reduced memory consumption.
Your project has reached that stage when it's a good idea to post binaries, but new questions appear such as where should they be posted? How do make it easier for users to install and discover your binaries? Where should releases be announced? Most importantly, can answers to these questions be automated? Enter JReleaser, a tool that provides answers to these questions and more. Come to this session to learn how JReleaser can help you release, publish, and announce binaries with ease, and fast!
Despite the "micro" in the name, real world microservices tend to use a lot of technologies like data persistence, log facades, IoC which aren't always included in the chassis. Hence, Java architects tend to repeat themselves assembling projects with microservices chassis+libraries trying struggling to find the balance between "usefully bloated" and "heavily bloated".
In this presentation I present our(my company's) experience while curating a set of libraries that complement MicroProfile chassis to manage microservices, data migrations and data persistence like:
* Eclipse JKube
Explaining why these libraries are useful and play well in the context of MicroProfile/Jakarta EE and Microservices patterns like those in microservices.io
Later I describe how everyone could curate their libraries and create their archetypes, and how we did it obtaining as product Kukulkan EE:
Saturday, June 26, 2021
Types are a programmer's best friend. In the pursuit of a perfect world, we try to model our domains in such a way that the type system makes incorrect data impossible. In Scala 2, we have tools like type aliases, value classes, or Refined Types. In Scala 3, there's something new for this purpose - opaque type aliases. What do they bring to the table? Will they make our life easier? Do they have any drawbacks? Join this live demo to learn all that and add this new tool to your modeling toolbox!
picoCLI is a small library that can be used to create JVM based command line interface applications.
Within 30 minutes, we’ll look at how to setup a project, create a small application and package it for others to use.
picoCLI is nice for several reasons : CLIs are a great way to automate some commands we run every day. And because it supports Java and Kotlin, we can keep using our main language of choice rather than having to dive into bash or node. Finally, pico applications can be turned into native images using GraalVM, which allows for a nice end-user experience.
This talk is a third introduction to the topic, a third live-coding in the IDE, and a third best practices when creating CLI applications, especially in Java or Kotlin.
By the end of this talk, you’ll have a basic knowledge of what picoCLI can do, how to set it up, and should have ideas of use cases to run it with!
Runtime code generation is widely used by many state-of-the-art Java frameworks for implementing POJO-centric APIs, but it also opens the door to assembling more modular applications. This presentation offers an introduction to runtime code generation and its use on the Java platform. Furthermore, it discusses the upsides and downsides of several code generation libraries such as ASM, Javassist, cglib, and Byte Buddy.
In this talk, I talk about Java instrumentations and my recent work with Byte Buddy and how to apply code instrumentation. An older version of the talk can be found here: https://www.youtube.com/watch?v=80wCytGEY1g&t=2639s
Kubernetes enables possibilities to develop cloud-native microservices or decompose traditional applications making them more technologically advanced with the help of containers. Currently, most of the Kubernetes solutions are offered on top of VMs and there is room for further improvements. Implementing nested architecture of application containers running inside system containers opens additional flexibility of resource allocation and management, accelerates provisioning of the clusters and pods, as well as cuts the overall costs. During this session, we’ll review the possibilities of running a Java-based application inside the Kubernetes cluster with nested container architecture, what configurations should be taken into account, and how to overcome the barriers on the way to more efficient Kubernetes hosting.
When writing tests from scratch or especially when migrating them from one JVM language to another (or even framework), the modern IDEs (especially IntelliJ IDEA) are very handy, as there are a lot of inspections out of the box. The thing is, sometimes, they are not enough or not suggesting idiomatic replacements.
In this talk, we are going to cover the following:
- Definition of idiomatic pattern of a library/framework/language
- Usage of structural search and replace in IntelliJ IDEA
- Creating inspections using structural search and replace
- Sharing your inspections with everyone
Examples will be demonstrated in Kotlin
Java, or JVM, has well-deserved fame as a hardware-unfriendly platform, and thus nobody sane will build database system or solutions where "mechanical sympathy" is crucial. using Java, except Apache Kafka, Elastic, Cassandra and Neo4j ;) ).
Garbage collector, speculating JIT, lack of control over "object layout", terrible support (mainly due to lack of abstraction) for functions of modern processors and operating systems.
And also JNI (who was there, I know what I'm talking about). Complex, slow, no major update since the day of release. Project Panama promises to change it. Simple, fast, safe. This talk will take a look at the state of Project Panama, focusing mainly on the foreign linker, our new interface to C world. Of course, you can expect running examples, core dumps, segfaults and other fancy things.
I will focus on two examples calling C code (from POSIX spec) from Java, and calling Java code from C. We will also touch on the topic of foreign memory as these to specs are tightly coupled together.
How does one choose to architect a system that has a Microservice / REST API endpoints? There are many solutions out there. Some are better than others. Should state be held in a server side component, or externally? Generally, we are told this is not a good practice for a Cloud-Native system, when the 12-factor guidelines seem to be all about stateless containers, but is it? It’s unclear and this confusion may lead to poor technology stack choices that are impossible or extremely hard to change later on as your system evolves in terms of demand and performance.
While stateless systems are easier to work with, the reality is that we live in a stateful world, so we have to handle the state of data accordingly to ensure data integrity beyond securing it.
We will examine and demonstrate the fundamentals of a Cloud Native system with Stateful Microservices that’s built with Open Liberty in Kubernetes:
- Microservices/REST API – Options to use when running your apps in the JVM
- Concurrency – how to take advantage of multi-core CPUs and clustered distributed systems
- Stateful vs Stateless - while stateless apps are easier to implement, the bulk of the apps in production are stateful which involve a higher level of complexity and risk, especially when data would need to travel across multiple machines and network boundaries
- Deployment – how about containerization and orchestration using Kubernetes?
Let's be very honest, cloud computing cannot be learned in one day. There are several architectural challenges to deploying your application, such as which framework to choose, reflection or reflectionless, native or non-naive. We also have the operational challenges such as backups, CI/CD, and much more.
This presentation explains how to make some of these design choices and the tradeoffs to consider when building applications to run in a virtual cloud environment.