Posts

🩺 Healthcare Standards Every Software Engineer Should Know

Image
Building healthcare software is not just: CRUD + APIs + dashboards. It’s also: 🩺 HL7 messages from legacy systems 🧬 FHIR interoperability 🩻 DICOM imaging workflows 🔒 HIPAA & compliance 🏥 Hospital systems older than some developers One broken integration can impact actual patient care. If you want to explore healthcare engineering, interoperability, and healthcare standards in depth, here’s a detailed practical guide with real-world examples. https://dev.to/jobinesh/healthcare-standards-every-software-engineer-should-know-before-building-healthcare-applications-i44

Building a Simple AI Agent with Micronaut, MCP, and LangChain4j

AI agents can feel complicated when you first explore them. Many guides jump into deep theory or large architectures too quickly. However, it does not have to be that way. This post introduces a straightforward way to build a simple AI agent using Micronaut, MCP, and LangChain4j , while keeping everything practical and easy to follow. If you would like a detailed, step-by-step guide, you can read the full article here: 👉 https://dev.to/jobinesh/building-a-simple-ai-agent-with-micronaut-mcp-and-langchain4j-21k6 The Basic Idea At a high level, an AI agent consists of three main parts: A model that understands and generates responses A set of tools that perform actions Some code that connects everything together That is all you need to get started. Why This Stack Works Well This combination of technologies keeps things simple: Micronaut is lightweight and fast. LangChain4j makes it easy to integrate large language models in Java. MCP allows the agent to interact with tools in a struct...

Using OpenSearch with Java Client

You can read the full post by visiting the following Medium article:  https://medium.com/@jobinesh/using-opensearch-with-java-client-712d1df4e553

Unleashing the Power of Large Language Models: A Quick Overview of LLM Integration with Agent and REST API Magic!

Image
Large Language Models in Modern Applications Large Language Models (LLMs) play a pivotal role in modern business applications by significantly enhancing natural language understanding and generation capabilities. These LLM models enable more sophisticated interactions, allowing applications to comprehend user inputs, generate contextually relevant responses, and automate complex language-related tasks. Integrating LLMs into Java applications empowers developers to create more intelligent, user-friendly systems, fostering a seamless interaction between software and users. It opens avenues for enhanced language processing, enabling innovative solutions and improved user experiences in diverse domains. This post will show how the Large Language Model can be customized to leverage the custom REST APIs to empower your AI Assistant. LangChain for Java LangChain for Java(Langchain4j) is a  Java library designed to facilitate the seamless integration of LLM into Java applications. Langcha...

A Real-World Kafka Client Implementation

This post is the continuation of my previous post on building Kafka client:   https://www.jobinesh.com/2021/10/how-to-get-your-apache-kafka-client.html. In case you have not yet read it, would encourage you to take a look at it before proceeding with this post. In this post, I will share a simple real-life Kafka client implementation.  In case you have not yet built a Kafka client of production quality, please read this article https://www.confluent.io/blog/kafka-consumer-multi-threaded-messaging/. The client implementation used in this example is heavily inspired by the concepts discussed in the above-mentioned article. Some features that you may find interesting in the Kafka client example shared along with this post are: Listen to Kafka rebalancing and handle it as appropriate Error handler for async Kafka message processing task Rate limiting the incoming messages by waiting for the currently running Kafka record processing threads to finish. About this example H...

How to get your Apache Kafka Client code right?

Recently I have got an opportunity to work on a Kafka client implementation for an interesting use case. Till then my assumption was writing a Kafka client was as easy as we see in many examples on the net :) Although it's true for many see cases, we cannot say the same simple client work for all. Depending upon the complexity of the use case that you may deal with, the client's implementation might change and complexity may increase.  Please note that this is not an introductory article on Kafka, also expected you to have some basic understanding of Kafka's client. I found the following article very useful while learning the basics of Kafka client:  https://www.confluent.io/blog/kafka-consumer-multi-threaded-messaging/  .  This post will refer to various topics from this article as we move forward.  In this post, I am sharing three common scenarios that you may need to deal with while using Kafka client in an message heavy system and possible solutions or patte...

A Simple Apache Spark Demo

Apache Spark is a data processing framework that can quickly perform processing tasks on very large data sets, and can also distribute data processing tasks across multiple computers, either on its own or in tandem with other distributed computing tools About this example In this post I am sharing a simple Apache Spark example project. The source code used for this example is available here:  https://github.com/jobinesh/apache-spark-examples.git Here is the quick overview of the modules that you may find in this project spark-job-common :  All common classes that you need for building a Spark job are parked here. This approach may help you to avoid boilerplate code in your Spark job implementation spark-job-impl  : A classic word count Spark  example is available here.   This class may help you to understand the structuring of the source and usage of common classes from spark-job-common module spark-job-launcher : The SparkLauncher helps you to start Spar...

Tracing the API calls in Your Helidon Application with Jaeger

While building applications that comprises of multiple microservices, it is essential to have a mechanism in place to collect and analyze the details of API calls, timing data needed to troubleshoot latency problems and logging error generated from API calls. Jaeger is one such solution and used for monitoring and troubleshooting application built following microservice based architecture with following capabilities: Distributed context propagation Distributed transaction monitoring Root cause analysis Service dependency analysis Performance / latency optimization Jaeger is hosted by the Cloud Native Computing Foundation (CNCF) as the 7th top-level project (graduated in October 2019). Eclipse MicroProfile, OpenTracing and Jaeger As there are multiple tracing solutions out there similar to Jaeger(such as Zipkin), it is really good to avoid vendor lock-in by having some standardization around APIs that work with different providers.The  OpenTracing  addresses this part of the p...

Integrating Redis with a Helidon MicroProfile Application for a Publish-Subscribe Usecase

Redis is an open source, in-memory data structure store, used as a database, cache and message broker. In this short post I am sharing a simple application that show cases classic integration of Redis message broker(pub/sub) APIs with a Helidon MicroProfile application for message publish-subscribe use case. You can checkout the source form here:  https://github.com/jobinesh/cloud-native-applications/blob/master/helidon-example-mp-redis/README.md What is the usecase exercised in this example ? It is simple :) We use the a simple greeting REST API  to exercise the Redis Publish Subscribe feature . When a client updates the greeting message, the Greeting resource implementation will publish the new greeting message to Redis channel topic for use by interested parties(consumers) Who does what? Here is quick summary of the classes that you find in the source: Lettuce : This example use  Lettuce  client library to connect to Redis server. If you are new to Let...

A Simple gRPC CRUD Example Running on Helidon SE

This is in continuation of the my previous posts on gRPC CRUD Example with Java. In case you have not read them yet, here are the links - Pause here, take a look at those posts and then resume ;) https://www.jobinesh.com/2020/01/a-simple-grpc-example.html https://www.jobinesh.com/2020/01/a-simple-grpc-crud-example-with-java.html This post shares a simple and complete gRPC CRUD example that runs as Helidon SE microservice.  The gRPC service generated using stdndrad approach as we discussed in previous posts. However the this example runs the gRPC APIs on Helidon SE service ;) If you are interested to see how the Helidon SE embraces gRPC service implementation that we have, see this class:  HelidonSEServer.java  in the example project. As a bonus we can leverage the built-in Helidon SE offerings for monitoring and tracing the gRPC APIs. For instance the following URL gives you health check info for our example: http://localhost:8080/health You can find t...

A Simple gRPC CRUD Example with Java

This is in continuation of the my previous post on gRPC with Java . This post shares a simple and complete gRPC CRUD example with Java. You can find the complete source here:  https://github.com/jobinesh/cloud-native-applications/tree/master/grpc-hr-example The following APIs are exposed by the gRPC server used in this example: rpc createDepartment (Department) returns (Department) {}; rpc updateDepartment (Department) returns (Department) {}; rpc findDepartmentsByFilter(DepartmentFilter) returns (DepartmentList) {}; rpc deleteDepartment(google.protobuf.Int64Value) returns (google.protobuf.Empty) {}; rpc findDepartmentById (google.protobuf.Int64Value) returns (Department) {}; rpc findAllDepartments(google.protobuf.Empty) returns (stream Department) {}; rpc updateDepartmentsInBatch(stream Department) returns (stream Department){}; The README.md   has the detailed steps for running the example. Enjoy !

Building Server APIs Using gRPC for a Java Application

Sometime back I blogged about core projects under  the  Cloud Native Computing Foundation:  https://www.jobinesh.com/2020/01/a-glance-at-cloud-native-computing.html . It is time for us to revisit some of the core projects in detail to learn how to fit them in a real life cloud native application. In this post I will briefly touch one of the promising projects incubating under Cloud Native Computing Foundation:  gRPC What is gRPC ? The gRPC is  remote procedure call (RPC) framework and toolset developed at Google. This is built on top of HTTP/2, leveraging the the benefits of a platform independence of the HTTP. It essentially means that this protocol works with various programming languages :) Here is the definition from  wikipedia : gRPC (gRPC Remote Procedure Calls) is an open source remote procedure call (RPC) system initially developed at Google in 2015. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and pr...

Git in Day to Day Life

Here is the quick list of commands that one need to use in day to day life. As I keep forgetting them, thought of listing down in one place.  Hopefully this list may save my time ;) Configuring your identity  $ git config --global user.name "FirstName LastName" $ git config --global user.email firstname.lastname@somedomain.com Clone repository $ git clone Create new branch $ git  checkout -b feature/branch-name Staging and committing changes $ git  add . $ git  commit -m "comments" $ git push -u origin feature/branch-name Viewing git log $ git log --after="2020-01-01 00:00" $ git log --all --pretty=format:"%h %cd %s (%an)" --since=7.days $ git log --all --pretty=format:"%h %cd %s (%an)" --since='7 days ago' Rebasing a feature branch $ git checkout master $ git pull $ git checkout feature/branch-name $ git rebase master $ git add $ git rebase --continue $ git rebase master $ git push origin fe...

Integrating Kafka with a Helidon MicroProfile Application - Part 2

Recently I posted a very short article on using Kafka along with a Helidon MicroProfile application:  https://www.jobinesh.com/2020/01/using-kafka-with-helidon-microprofile.html . It was using classic Kafka APIs and involved more manual coding. In this post, let us see how to build the same messaging solution declaratively availing the Reactive Messaging offering of MicroProfile  specification. Uhh...Did I say less coding and more fun :) What is MicroProfile Reactive Messaging? The following doc may answer all your questions: https://smallrye.io/smallrye-reactive-messaging/  Another interesting blog post on this topic is here:  https://dzone.com/articles/using-jakarta-eemicroprofile-to-connect-to-apache . We use the same constructs with a Helidon MP application in this example. What is the usecase exercised in this example ? It is simple :) We use the a simple greeting REST API  to exercise the Kafka messaging feature. When a client updates the...

Integrating Kafka with a Helidon MicroProfile Application - Part1

The Apache Kafka has become an industry defacto standard for  all messaging use cases that you may find today for an enterprise application.  In this short post I am sharing a simple application that show cases classic integration of Kafka APIs with a Helidon MicroProfile application. You can checkout the source form here:  https://github.com/jobinesh/cloud-native-applications.git What is the usecase exercised in this example ? It is simple :) We use the a simple greeting REST API  to exercise the Kafka messaging feature. When a client updates the greeting message, the Greeting resource implementation will publish the new greeting message to Kafka topic for use by interested parties(consumers) Who does what? Here is quick summary of the classes that you find in the source: ClassicKafkaMessageConsumer : This class contains the logic for listening to the Kafka topic. This class uses a custom annotation '@Startup' so that it gets instantiated on application st...

A Glance at the Cloud Native Computing Foundation and it's Core Projects

This article talks about Cloud Native Computing Foundation(CNCF) and core projects under CNCF. What is Cloud Native Computing Foundation ? Let us take a baby step and try to see things in simple terms. In earlier days applications are built and deployed on specific production environment that run on popular OS such as Linux or windows. We used to set these OS specific environment properties as runtime config parameters to the application. As the cloud development became a norm, people started thinking about better ways to decouple runtime environment from the application codebase resulting in evolution of Docker containers. If an application’s functionality is split in to multiple docker containers as microservices, then orchestration of these containers became another nightmare. Later Kubernetes came in to picture to mange multiple docker containers that forms an application and orchestration. These two innovations along with other tools around them made it possible to port app...

Setting up Istio Service Mesh for a Helidon Microservice

Here is the post that you are looking for: Setting up Istio Service Mesh for a Helidon Microservice  Have fun !

Setting up Minikube and Istio service mesh on your computer

Minikube is a tool that makes it easy to run Kubernetes locally. Here is the list of resources that will help you to set up Minikube on your machine along with Istio and other tools. To Install: Install Minikube :   https://kubernetes.io/docs/tasks/tools/install-minikube/ Install Istio:  https://istio.io/docs/setup/kubernetes/prepare/platform-setup/minikube/ https://istio.io/docs/setup/kubernetes/install/helm/ Here is the quick summary of all commands for installing Minikube and Istio on macOS Install Minikube ============ $ brew cask install minikube $ minikube start --memory=16384 --cpus=4 --kubernetes-version=v1.14.2 Install Istio ======== $ curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.2.4 sh - $ cd istio-1.2.4 $ export PATH=$PWD/bin:$PATH $ for i in install/kubernetes/helm/istio-init/files/crd*yaml; do kubectl apply -f $i; done $ kubectl apply -f install/kubernetes/istio-demo.yaml $ get svc -n istio-system $ kubectl get svc...

Security Measures for Your Single Page Application

Building a secured application is always a puzzle for many of us. This is so true when you  need to secure a Single Page Java Web application where many things are happening on the browser which is not in your control.  This post discusses this problem along with some of the popular preventive measures available today to secure your  single page web application. What is Single Page Application? In earlier days web browsers were not  really powerful as we see them today.  We used to build web applications by moving most of the processing logic to the server, leaving browser as a simple mean to render the DOM returned by server. Simple user action like clicking a button, scrolling page were all handled on server. Over a period browsers became more rich in terms of functionalities and we have witnessed JavaScript emerging as powerful scripting language. A single-page application (SPA) is a web application that interacts with the user by dynamically rewriting...

The Top 50 Tools of 2018

Let me share a couple of interesting survey results: This looks very interesting, check it out:  https://stackshare.io/posts/top-developer-tools-2018 You may like this as well:  https://research.hackerrank.com/developer-skills/2019