Posts

Integrating Apache kafka with Spring Boot

Integrating Apache Kafka with a Spring Boot application can be a great way to build a robust and scalable system for order management. Kafka is a distributed streaming platform that allows you to publish and subscribe to streams of records, making it ideal for building event-driven systems. In this guide, we will walk through the steps of integrating Kafka with a Spring Boot application for order management. Setting up Kafka The first step is to set up Kafka on your local machine or a remote server. You can download Kafka from the Apache Kafka website, and then extract the files to a directory of your choice. Once you have Kafka installed, start the ZooKeeper and Kafka server by running the following commands: bin/zookeeper-server-start.sh config/zookeeper.properties bin/kafka-server-start.sh config/server.properties Create a Kafka topic Next, we need to create a Kafka topic to handle the order messages. Run the following command to create a topic named "orders" with a single...

CI-CD code coverage and security best practices

  CI/CD (Continuous Integration/Continuous Delivery) is an important practice in modern software development. It allows developers to rapidly iterate on code and deliver high-quality software to users quickly. However, in order to ensure the software is of the highest quality, it's important to incorporate code coverage and security best practices into the CI/CD process. Let's explore some best practices for code coverage and security in CI/CD: Code Coverage Best Practices: Set a minimum code coverage threshold: Establish a minimum code coverage threshold for unit tests, integration tests, and other types of tests. This will help ensure that all parts of the codebase are tested, and that code quality remains consistent across the project. Use code coverage tools: Utilize code coverage tools to measure how much of the codebase is covered by tests. Tools like Jacoco and Cobertura can help identify which parts of the code are not tested and need additional coverage. Integrate code...

Enterprise Architecture using Axon Framework

Enterprise architecture is a critical component of any modern business strategy. It provides a framework for designing and implementing technology systems that are flexible, scalable, and efficient. One popular approach to building enterprise architecture is using the Axon Framework in conjunction with Spring Boot. In this blog, we'll explore the benefits of using Axon Framework and Spring Boot to build a modern enterprise architecture. Axon Framework is an open-source framework for building event-driven systems. It provides a set of tools and libraries that make it easy to implement an event-driven architecture in any language or framework. One of the key benefits of using Axon Framework is that it simplifies the development process by providing a set of pre-built components that developers can use to build complex systems. Spring Boot is a popular framework for building microservices. It provides a set of tools and libraries that make it easy to build scalable, modular, and maint...

PowerBI

PowerBI I have been working with Power BI implementation for the last couple of months. It's been a great experience and great tool to create different kind of datasets and dashboards.  There are two important areas which we need to cover in this post. 1) ETL using  Power Query M formula language 2) Aggregation/calculations for reports using DAX Formula 1) ETL: After loading the initial data into powerbi, we can manipulate the datasets as per our present requirement. This is equivalent into our traditional ETL process. Example : let          Source = Sql.Database("example.database.windows.net", "EXAMPLE"),     dbo_ISSUES = Source{[Schema="dbo",Item="ISSUES"]}[Data],     #"Renamed Columns" = Table.RenameColumns(dbo_ISSUES,{{"PRODUCT", "Product"}}}),     #"Filtered Rows11" = Table.SelectRows(#"Renamed Columns", each true), in <#"Filtered Rows...

Thread dump

Image
What is a thread dump? A thread dump is a snapshot of everything that an application is doing right at the instance it's taken.  If an application log is a diary of a vacation, a thread dump is a photo . A diary will tell you whatever the author (in this case the application itself) thinks is important, but a photo will give you an unfiltered view of that particular moment. String together a couple of photos and you have a powerful tool for finding out what an application was doing over a certain period. A thread dump is just a collection of stack traces, one for each thread that's running in the instance. There are different types of threads, and the number of threads will vary depending on the configuration of the instance. For example, if you have changed the maxThreads value of your HTTP connector in  <install_directory>/conf/server.xml , then the number of HTTP threads in a thread dump will also change. Let's have a look at one of HTTP threads: "htt...