Posts

Designing robust and scalable application.

Java Application Performance 1. Concurrency and Thread Management Use  non-blocking I/O  , we used project reactive or reactive programming language in NAV station and prisym Leverage parallel stream, completeable future, suppy async or run async. Leverage  ExecutorService  or  ForkJoinPool  for parallel processing. Leverage parallel stream, completeable future, suppy async or run async. Avoid thread contention and excessive synchronization. ExecutorService executor = Executors.newFixedThreadPool(4);   List<List<String>> batches = ...; // divide your data into batches for (List<String> batch : batches) {     executor.submit(() -> processBatch(batch)); }   executor.shutdown();   2. JVM Tuning Profile with tools like  JVisualVM ,  YourKit , or  Flight Recorder or you can use datadog to check the jvm usage and...

AWS

  What Is AWS And Why Is It So Popular? Amazon Web Services (AWS)  is an important cloud computing platform known for its wide service offerings. Its popularity is developed through its scalability, cost-effectiveness, and global infrastructure. Businesses increased the AWS to efficiently scale operations, reduce costs, and innovate rapidly.  Explain The Key Components Of AWS. AWS provides the fundamental components crucial for cloud computing: Service Description EC2 (Elastic Compute Cloud) Your virtual servers in the cloud. Need a Linux or Windows server for your web application? EC2 provides resizable compute capacity on demand. S3 (Simple Storage Service) The internet's storage locker. S3 offers highly scalable and durable object storage for everything from website files and backups to big data analytics. RDS (Relational Database Service) Managed database mad...

Arc Unit

Image
What Is  ArchUnit? ArchUnit is a testing library used for defining and enforcing dependencies between classes, packages, and/or layers. It can also be used for establishing conventions, like class names, encapsulation or immutability. It supports JUnit 4 and JUnit 5 libraries; therefore, it is very easy to integrate these tests in any pipeline. Simply put,  ArchUnit  is a test library that allows us to verify that an application adheres to a given set of architectural rules. ArchUnit  integrates nicely with the  JUnit  test framework, and so, they are typically used together. < dependency > < groupId >com.tngtech.archunit</ groupId > < artifactId >archunit-junit4</ artifactId > < version >0.14.1</ version > < scope >test</ scope > </ dependency >   The first step is to create a set of Java classes that will be checked for rules violations . We do this by instantiating the  C...

Caching-Redis and Caffeine cache

Image
  Spring Boot Cache with Redis Redis Cache effectively stores the results of database retrieval operations, allowing subsequent requests to retrieve the data directly from the cache. This significantly enhances application performance by reducing unnecessary database calls. When a request is made, the service initially looks in the Redis cache for the desired data. When a cache hit occurs, the data is swiftly retrieved from the cache and promptly provided back to the service, avoiding the need to interact with the database. However, if the requested data is not found in the cache (cache miss), the service intelligently falls back to the database to retrieve the required information. Subsequently, the fetched data is stored in the Redis cache, enabling future requests for the same data to be served directly from the cache, thereby eliminating further database queries and speeding up overall response times. Time To Live(TTL): time-to-live property, which is an optional settin...