Spring

Modeling a chat application message structure with Kotlin and Cassandra

7 minute read Published:

A little implementation for cassandra backed messages, users, and app metadata
This Application Needs Data This sort of application will provide data seek and storage access by implementing the chat messages and chat services interfaces in order to compoase a Cassandra-based data-backend to our application. We will use Reactive extensions to make maximum flexability of program flow-control and threading behaviour among other concerns.. Thinking of Data Shape This part of the tutorial will focus on chat topicMessage data shaping, and access/retrieve operations that espouse the Cassandra design techniques.

Testing Reactive Apps with SpringBoot

13 minute read Published:

Use Spring-boot 2.x to verify test stages of your WebFlux and Reactive Data Apps
The Producer Environment In the world of testing critical business funcationality, we dont need much inspiration to get the job done. However, when it comes to what to use, you may be left wandering whether you’ll hit all of the right frameworks and tools to validate your business code. Also likely, you’ll also need to figure out how to cross validate a producer app with a consumer app(s) that you may not even own!

Testing Reactive Apps with SpringBoot - The Consumer

7 minute read Published:

Use Spring-boot 2.x to verify test stages of your WebFlux and Reactive Data Apps
The Producer/Consumer exchange In the producer side, we setup a service that will let us query a database of teams. This article will focus on the consumer side of the communication chain - namely how to extract tests out of situations where the comunication chain is asymetrical. We will then dive into Spring Cloud Contract to aleviate this issue and produce a working producer/consumer contract. To start, we’ll need a data object for client state.

Configuring Authorization with Reactive Spring Security 5

3 minute read Published:

It takes just a few minutes to bring a compromised system to it's knees. Help fight this by securing your application with Spring Security
Configuring Authorization against a Webflux App Effective security can insulate our applications from ill effects of malicious, and accidental intent in many aspects of programming. Things like network security can only go so far in isolating harm to distributed computing applications. Prevent malicious hackers from gaining access to your systems by ensuring the tools meet the standards for your appcation. Spring Security WebFlux is the framework that lets us declare security constructs to our ordinary WebFluxapplications.

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.