Articles

In this guide, we provide an introduction to the world of design patterns. For each pattern, we further understand the pattern and the context in which it is applicable, with real-world examples.

In this post, you will learn:

Source de l’article sur DZONE

C10K problem is a term that stands for ten thousand concurrently handling connections. To achieve this, we often need to make changes in the settings of created network sockets and default settings of Linux kernel, monitor the usage of the TCP Send/Receive Buffers and Queues, and, in particular, adjust our application to be a good candidate for solving this problem.

In today’s article, I’m going to discuss common principles that need to be followed if we want to build a scalable application that can handle thousands of connections. I will refer to Netty Framework, TCP, and Socket internals and some useful tools if you want to get some insights from your application and underlying system.

Source de l’article sur DZONE

Spring, work your magic!

Auto-configuration is probably one of the most important reasons why you would decide to use frameworks like Spring Boot. Thanks to that feature, it is usually enough just to include an additional library and override some configuration properties to successfully use it in your application.

Source de l’article sur DZONE

AWS Lambdas provide a convenient environment in which to run short-lived applications without having to worry about provisioning the underlying hardware or manage operating systems. In this post, we’ll look at a simple Java application that can run as a Lambda.

The source code for this application is available on GitHub.

Source de l’article sur DZONE

What a cache!

Introduction

LRU (or Least Recently Used) is a cache eviction strategy, wherein if the cache size has reached the maximum allocated capacity, the least recently accessed objects in the cache will be evicted. Also, the objects in the cache could be accessed by multiple threads in an application so is very important that the cache has a good synchronization mechanism in-built. This article describes the implementation of a Java-based cache with LRU eviction strategy, but fundamentally, this applies to any programming language.

You may also like: Introducing Caching for Java Applications

Source de l’article sur DZONE


Intro

BULL (Bean Utils Light Library) is a Java-bean-to-Java-bean transformer that recursively copies data from one object to another. It is generic, flexible, reusable, configurable, and incredibly fast.
It’s the only library able to transform Mutable, Immutable, and Mixed beans without any custom configuration.

This article explains how to use it, with a concrete example for each feature available.

Source de l’article sur DZONE

Do you want to implement an HTTP server, but do you not want to take any risk of writing a full-fledged HTTP server? Developing an HTTP server with full capability is not a trivial task. But Java has got a solution to this kind of problem. Java supports an in-built HTTP server. By just writing 100 lines of code, we can develop a somewhat-decent HTTP server that can handle HTT$$anonymous$$ET and POST requests. We can also leverage it to handle other HTTP commands as well.

HTTPServer class

Java SDK provides an in-built server called HttpServer. This class belongs to com.sun.net   package. 

Source de l’article sur DZONE

Happy New Year! As we enter the new decade, I decided it was time to write my now annual blog post giving my thoughts on what this year might hold for Java. I’ll also look back on my predictions in the last post to see how accurate (or not) I was.

Obviously, the most significant thing this year will be the celebration of a whole quarter of a century since Java was launched. I plan to write a lengthy missive about the last 25 years of Java closer to the time.

Source de l’article sur DZONE

I work as a DevOps engineer for a large public-facing application, which has around 90+ microservices (Java-based). Consistently, we are hit by scenarios that we’d discover in the field, which were not caught in any of our testing. Despite improving our test strategies and code coverage assessments, we were unable to assess the "strength" of our test cases.

We looked around for options and solutions that could help us to be more sure about our test cases and the code we develop. As a DevOps engineer, my responsibility was to identify options and trial them to fix this problem and include it as part of our automated build process.

Source de l’article sur DZONE


Learn how to develop a custom Spring Cloud Stream binder from scratch.

Spring Cloud Stream is a framework built on top of Spring Boot and Spring Integration that is designed to build event-driven microservices communicating via one or more shared messaging systems.

The core Spring Cloud Stream component is called Binder,” a crucial abstraction that’s already been implemented for the most common messaging systems (e.g. Apache Kafka, Kafka Streams, Google PubSub, RabbitMQ, Azure EventHub, and Azure ServiceBus).

Source de l’article sur DZONE