Skip to main content

Posts

About virtual thread in java

In this blog post, I will introduce you to the concept of virtual threads in Java and how they can improve the performance and scalability of your applications that rely on networking I/O. Virtual threads are lightweight threads that reduce the effort of writing, maintaining, and debugging high-throughput concurrent applications. They are instances of java.lang.Thread that are not tied to a specific operating system (OS) thread, but rather run on a small number of OS threads managed by the Java runtime. This allows the Java runtime to suspend and resume virtual threads when they perform blocking I/O operations, freeing up the OS threads for other tasks. Virtual threads typically have a shallow call stack and perform as few as a single HTTP client call or a single JDBC query. They are suitable for tasks that spend most of their time waiting for I/O, but not for long-running CPU-intensive tasks. Virtual threads are supported by the Java Platform since Java SE 21. They are part of Project
Recent posts

AWS amplify hugo App build specification amplify.yml

 I needed a content-oriented site with solely static content for a little project I'm working on, so Hugo was an obvious choice. I looked into using AWS Amplify to host it, But the default amplify.yml not working for me and can't find the correct build file, I have modified the amplify.yml to build the Hugo cms. Hope this is helpful, Please comment. version : 1 frontend : phases : build : commands : - npm install - npm run build:webpack && npm run build:hugo artifacts : baseDirectory : dist files : - '**/*' cache : paths : []

Easy site migration with hugo cms and netlify

 Old slow non-secure drupal base Sri Lanka hotel booking website migrated to netlify platform. Using Hugo cms these contents easily be migrated to a static website. The old backup data source can easily load to Hugo cms using gomplate tool. Gomplate :  A flexible commandline tool for template rendering. Supports lots of local and remote datasources. Reference : https://srilanka.lowcosthotelbooking.com/   https://lowcosthotelbooking.com/ https://gohugo.io/ https://www.netlify.com/ https://gomplate.ca/

ERROR running force:org:create: You do not have access to the [ScratchOrgInfo] object

Error : -   ERROR running force:org:create:  You do not have access to the [ScratchOrgInfo] object Solution :-  To enable Dev Hub in an org: Log in as System Administrator to your Developer Edition, trial, or production org (for customers), or your business org (for ISVs). From Setup, enter  Dev Hub  in the Quick Find box and select  Dev Hub . If you don't see Dev Hub in the Setup menu, make sure that your org is one of the supported editions. To enable Dev Hub, click  Enable . After you enable Dev Hub, you can’t disable it.

git Update failed

  Issue -  when you work with a large team, the git repository may have many branch creation and deletion operations, sometimes we may getting git update failed, when we try to update the whole repository. Solution - Tyr >  git fetch -p -p, --prune After fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag auto-following or due to a --tags option. However, if tags are fetched due to an explicit refspec (either on the command line or in the remote configuration, for example if the remote was cloned with the --mirror option), then they are also subject to pruning.

How to find best java libraries for your need ?

Java is most mature language and have lot of java libraries build over the years. Maven repository is the best place to search java utility. I have created jar search engine based on Maven repository index, you can search java libraries by any keywords. Java library search -   http://gcloganalyzer.com/jar-search Json viewer and Editor  -  http://gcloganalyzer.com/json-viewer/index.html