Home » Open Source

Tag Archives: Open Source

KivaKit Microservices

java-interview-questions-answers

KivaKit Microservices   KivaKit is designed to make coding microservices faster and easier. In this blog post, we will examine the kivakit-microservice module. As of this date, this module is only available for early access via SNAPSHOT builds and by building KivaKit. The final release of KivaKit 1.1 will include this module and should happen by the end of October, ...

Read More »

Signaling and waiting for concurrent state changes

java-interview-questions-answers

Java’s concurrency library (java.util.concurrent) provides a mutual-exclusion (mutex) Lock called ReentrantLock. This lock maintains a queue of threads that are waiting to own the lock, allowing access to a protected resource. A thread can be added to the lock’s wait queue by calling lock(). When the lock() method returns, the thread will own the lock. Once the thread obtains the ...

Read More »

Kivakit Build

java-interview-questions-answers

A poor man’s multiple-repository build system Refactoring feature branches across multiple repositories A common use case when working with multiple, dependent repositories is to use git flow to create multiple feature branches: kivakit [feature/simplify-log-api] kivakit-extensions [feature/simplify-log-api] If project(s) in kivakit-extensions here depend on projects in kivakit, refactoring code in kivakit can propagate code changes to kivakit-extensions. Then both feature branches ...

Read More »

KivaKit deployments

java-interview-questions-answers

KivaKit applications can be configured using the settings api, but there is an easier way to configure an application for deployment built right into Application. By default, Application looks for the switch -deployment=[deployment-name]. If the switch is present and deployment settings can be found, KivaKit will load all of the settings objects in the named deployment into the global settings ...

Read More »

KivaKit resources

java-interview-questions-answers

A resource is a stream of data that can be opened, read from or written to, and then closed. KivaKit provides a resource mini-framework that allows easy and consistent access to many types of resources, and it makes it easy to create new resources. Examples of KivaKit resources include: FilesSocketsZip or JAR file entriesS3 objectsPackage resourcesHDFS filesHTTP responsesInput streamsOutput streams ...

Read More »

KivaKit command line parsing

java-interview-questions-answers

The kivakit-commandline module provides the switch and argument parsing used by kivakit-application. Let’s take a look at how this works. When an Application starts up (see KivaKit applications), the Application.run(String[] arguments) method uses the kivakit-commandline module to parse the argument array passed to main(). Conceptually, this code looks like this: public final void run(String[] arguments) { onRunning(); [...] commandLine = ...

Read More »

KivaKit applications

java-interview-questions-answers

The kivakit-application module contains building blocks for creating applications and servers. In the diagram below, we can see that the Application class extends BaseComponent. Server, in turn, extends Application. BaseComponent inherits Repeater functionality from BaseRepeater, and handy default methods from the Component interface. ComponentMixin (shown in the next diagram) also inherits these methods from Component. Application provides command-line parsing (see ...

Read More »

Overhead added by Garbage Collection Logging

Enabling Garbage collection logs on your application has certain advantages. In nutshell, Garbage collection logs will facilitate you to optimize Garbage Collection pause time, improve overall application’s response time, forecast production outages, reduce computing cost. Even though Garbage collection logs have these advantages, we weren’t sure what overhead does garbage collection logging add to the application. Thus we set out ...

Read More »

Add Grpc to your Java Application

Grpc is a high performance, open source universal RPC framework.There are various benefits for using gRPC. It simplifies development by providing client/server codeIt supports multiple languages It all starts with defining a .proto file, .proto files reside on src/main/proto file. Be aware it is a good practise to keep proto files on a repo and have some schema versioning. This ...

Read More »