# sudo init 5 - beta

Spring Reactive WebSocket Hot Publisher

2 minute read Published:

Web-Socket that utilizes the Reactive Hot-Publisher pattern.
This Demo This is the multi-casting Flux variation of the standard WebSocket Service seen here WebSocket Server Spring’s reactive [WebSocket] API is a part of Spring 5’s WebFlux API which bring reactive flow control to our projects via project reactor. We will introduce a single WebSocket handler, and show whats needed to get started using Spring’s WebSocketServer support. You’ll want to start a new Spring project using start.spring.io[this link] to autogenerate a maven based POM.

Spring Reactive WebSocket Cold Publisher

3 minute read Published:

Web-Socket that utilizes the Reactive Cold-Publisher pattern.
This Demo This demo will stand up Spring application service that exposes a WebSocket service through the Spring 5’s reactive WebSockets API. Typically, for inter-service comms, use a more traditional messaging system to deliver and expect events between services for example - messaging brokers such as Kafka, RabbitMq, etc.. WebSockets is an IETF standard and W3C API that provides a convenient way to issue and consume data streams across the Internet.

Reactive Websocket Client with Spring

3 minute read Published:

Demonstrating the Spring WebSocket Client
This Demo This demo client will connect and receive events from any URL that emits an open websocket stream. We have an existing server to stand up that can supply the socket events. A reactive client means that we can respond to backpressure, and weild the Observer pattern to our client connections. The Client (SANS web) We can use our favorite Spring Application Initializr start dot spring dot io to generate the application.

Configuring Zipkin Tracing with Spring Boot

11 minute read Published:

Demonstrates how to trace a Spring Boot application that includes multiple hop services.
Tracing Motivation The more distributed a system the harder it is to debug errors, find latency, and to understand the potentially cascading impact of a bug. External monitoring only tells you the overall response time and number of invocations but doesn’t give us a way to understand internal invocations. Structured log entries can be correllated, eventually, to paint a picture of the movement of a request through a system, but structured logs are not easy to query.

Sending and consuming messages with Spring and KafKa

5 minute read Published:

This demonstration explains how to craft classical (not reactive) consumer/producer componentS within you Spring apps
Spring Kafka Writer and Readers What is Kafka Apache Kafka is an open-source stream-processing software platform developed by the Apache Software Foundation written in Scala and Java. You’ll find more information about Kafka at it’s Homepage. Intro to Spring For Apache Kafka The Spring for Apache Kafka (spring-kafka) project applies core Spring concepts to the development of Kafka-based messaging solutions. It provides a “template” as a high-level abstraction for sending messages.

Spring Test Slices

5 minute read Published:

Simplify and deepen confidence in functional tests with Spring Test Slices.
Spring Test Slices Simplify testing by isolating the logical layers above and below that thing under test. These are the invariants. In a Spring Boot application, autoconfiguration produces a large monolithic application context. Test slices allow us to segment the application context in terms of logical layers. As an example, the @WebMvcTest slice only includes components related to the web tier, like @Controller-annotated components. The Basic Test As an example, let’s look at the structure of a unit test that looks something like the default unit test generated by the Spring Initializr.

Intro to RIFF Is For Functions

5 minute read Published:

RiFF allows you to create ephermeral services that respond to demand!
Motivation of Functions Functions as a Service are a new paradigm for application composition and deployment. Functions are a smaller deployable unit than microservices and especially traditional monoliths. Project Riff is a new Pivotal project that runs functions in a cloud environment like Pivotal Container Services (Kubernetes). Lets get started by setting up a new Riff environment and then creating some functions. Preparing the environment minikube is the tool that we’ll use to run Kubernetes locally.