JavaPoet
JavaPoet is a Java API for generating .java source files. Source file generation can be useful when doing things such as annotation processing or interacting with metadata files (e.g., database schemas, protocol formats).
JavaPoet is a Java API for generating .java source files. Source file generation can be useful when doing things such as annotation processing or interacting with metadata files (e.g., database schemas, protocol formats).
In this blog entry I would like to explain how to write an annotation processor. First, I am going to explain to you what annotation processing is, what you can do with that powerful tool and finally what you cannot do with it.
Kubernetes Traffic Engineering with BGP July 23, 2018 Turns out you can use good old BGP to power your Kubernetes network! In this post Iβll cover how to build your Kubernetes network with BGP and how to use it for traffic engineering in your Kubernetes clusters! My hope is that this post gives yo
The snmp_exporter is one of the trickier Prometheus components to set up because thereβs a few moving parts involved in a full configuration and because of the need to run an extra tool to generate the snmp.yml config file from the ever-mysterious βMIBSβ.
What is k3d?ΒΆ k3d is a lightweight wrapper to run k3s (Rancher Labβs minimal Kubernetes distribution) in docker. k3d makes it very easy to create single- and multi-node k3s clusters in docker, e.g. for local development on Kubernetes.
K3s is a highly available, certified Kubernetes distribution designed for production workloads in unattended, resource-constrained, remote locations or inside IoT appliances.
Besides the criticism of Serverless computing [1], it is quite popular these days especially the AWS lambda functions. In this blog, we will deploy OpenWhisk one of the popular opensource serverless computing platforms along with Kubernetes to create a serverless computing environment.
Sealed types, switch expressions, and record types. Here are just a few new features introduced in the latest Groovy 4.0 release. In this video, I want to show you ten things that make Groovy 4.0 amazing. And to keep this video short, weβre not going to dive deep into each of them.
Remote procedure call (RPC) systems, including Java RMI, are synchronous -- the caller must block and wait until the called method completes execution, and thus offer no potential for developing loosely coupled enterprise applications without the use of multiple threads.
As projects grow in size and complexity and otherwise mature, they tend to accumulate a large collection of automated tests. Testing your software at multiple levels of granularity is important to surface problems quickly and to increase developer productivity. In Gradle 7.
JCL is a configurable, dynamic and extensible custom classloader that loads java classes directly from Jar files and other sources. The motivation was to create isolated classloaders, which can be easily integrated with IoC frameworks like Spring and with web applications.
To load calsses in runtime java uses ClassLoader mechanism which is based on next core principles: delegation - by default uses parent-first delegation, - child ClassLoader will be used if parent is not able to find or load class.
Null dereferencing is a common type of programming error in Java. On Android, NullPointerException (NPE) errors are the largest cause of app crashes on Google Play.
Schema-org-java is a library for creating schema.org entities. The entities can be easily generated with the maven plugin, programmatically, or in command line.
I recently needed a simple example of an SPI implementation I could send around as copy and paste template. After some looking around I found some tutorials, but most of them were rather heavy in the implementation and are thereby loosing the point of being a simple extension system within the JDK.
In this blog post, Iβm going to explain how you can make use of the Micronaut framework to organize your project code in such a way that you can externalize and modularize some of your @Beans. These beans can be used as βcommonβ and can be shared between several projects.
In this article, we are going to talk about Javaβs Service Provider Interface (SPI). We will have a short overview of what the SPI is and describe some cases where we can use it. Then we will give an implementation of an SPI for a practical use case.
Using openssl, the command is... However, I will need to do this often and have written a Java class that handles this and more (my application is mostly .jsp with Tomcat and Apache). When I try run the same command from Java using Runtime.
In this tutorial, weβll learn how to transform a Java Object to JSON-LD and vice versa. Also learn how to verify the schema of JSON-LD. JSON-LD is a JSON-based format which is used to represent structured data and linked data. Schema of JSON-LD can be found in documentation of schema.org.
This is a Java implementation of the JSON-LD 1.0 specification and the JSON-LD-API 1.0 specification. The Options specified by the JSON-LD API Specification are accessible via the com.github.jsonldjava.core.JsonLdOptions class, and each JsonLdProcessor.
This is going to be a look at my philosophy and views on ActivityPub and why I believe the solutions to ActivityPub criticisms must come from communities. I believe there needs to be a clear way for communities to form and build upon the ActivityPub specification.
Java 16 introduces Records. While this version of records is fantastic, it's currently missing some important features normally found in data classes: a builder and "with"ers. This project is an annotation processor that creates: Hat tip to Benji Weber for the Withers idea.
If you have data for which a digital signature was generated, you can verify the authenticity of the signature. To do so, you need In this example you write a VerSig program to verify the signature generated by the GenSig program.
A A mock ActivityPub server to use in testing code
Frameworks Bonfire: An extensible framework with a big focus on customisation and flexibility. Can be used to build new federated apps while focusing on a specific use case rather than reimplementing lots of boilerplate AGPL-3.
Today weβll be looking at how to connect the protocols powering Mastodon in the simplest way possible to enter the federated network.
Recently I contributed an addition to the Bookwyrm social reading software to enable "remote following". Bookwyrm uses the ActivityPub protocol for decentralised online social interaction.
Testing asynchronous systems is hard. Not only does it require handling threads, timeouts and concurrency issues, but the intent of the test code can be obscured by all these details.
Gradle plugin for managing Docker images and containers using via its remote API. The heavy lifting of communicating with the Docker remote API is handled by the Docker Java library.
In a recent update to my site, I decided to show a helpful notice in my footer that timestamps my build, writes the abbreviated commit hash from Git, and links to the changeset on my GitHub repo for ease of reference.
Today weβll experiment some more with the adjacent and general sibling combinator and the :checked pseudo-class. Using hidden inputs and labels, we will create an accordion that will animate the content areas on opening and closing.
JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties. JWT.IO allows you to decode, verify and generate JWT.
Designed to be small, yet full featured, Lunr enables you to provide a great search experience without the need for external, server-side, search services. Add powerful language processors to give more accurate results to user queries, or tweak the built-in processors to better fit your content.
I recently came back from connect.tech (one of my favorite conferences). I had the honor of giving not one, but two different talks. One of them was on static sites, or the JAMstack. This is a topic I've covered many times in the past, but it had been a while since I gave a presentation on it.
Last week I implemented a search functionality for a static website with Lunr.js. The way I implemented the search system, depends on 2 files to work, the pagesData.json and the searchIndex.json.
At fleetster, we have our own instance of GitLab and we rely a lot on GitLab CI.
NHM is a fast HTML to markdown converter, compatible with both node and the browser. We had a need to convert gigabytes of HTML daily very quickly. All libraries we found were too slow with node.
Amazon Cognito is a managed service that provides federated identity, access controls, and user management with multi-factor authentication for web and mobile applications.
Discover jenv, the command line Java manager
Read this guide on the four golden signals for distributed systems monitoring and how to effectively monitor your distributed systems.
Learn how to create true Java unit tests by mocking all external dependencies in your unit tests with the Spock testing framework.
Summary of unit test mocking capabilites and syntax of Spock test framework
Recently, in one of my pet projects, I decided to try writing tests using Spock framework. It was a great experience, I enjoyed it a lot. Except for the part of setting it up, which was somewhat annoying.
The Java volatile keyword guarantees variable visibility across threads, meaning reads and writes are visible across threads.
An interesting project which provides bindings to manage containers within your tests
Looking at implementing AWS lambda functions to update blog content, for which git access would be a prerequisite
When Java 8 introduced the Optional type many years ago, I was happy like a bird. I already knew about the Optional type from variousβ¦