Category Archives: Liferay

Performance tuning in Liferay – Part 1

Expanding on my post here on performance tuning: Post | Feed | LinkedIn

Below are the main points to work on for a performance tuning engagement in Liferay – Part 1.

  • Firstly, we need to find out what is slow: Database, service calls, elastic search, memory is an issue, threads are blocked / waiting, how much memory is a module taking, logs are printing what, etc.
  • Check your configurations as per this post: How to debug Liferay? – Some pointers – Part 1 | LinkedIn
  • Install Glowroot if possible, in central pattern and check following sections in it: slow traces, errors, service calls, threads, heap, instrumentation, configurations and so on for the problem timeframe.
  • You can enable tracing in logs & Glowroot instrumentation on targets. You can also use plugins by Fabian Bouché like for fragment analysis or follow his blogs on www.liferay.dev/blogs for using Glowroot in upgrades.
  • The above will give you hints on what is slow. Especially open the FLAME graphs and threads along with heap dumps to analyze which threads are blocked or waiting, how much memory is allocated to what in slow traces of modules and so on.
  • Then run a load test in simulated environment after checking compatibility matrix to get latest statistics for various scenarios like web content on portlet or in fragment, API calls, integrations, heavy load on Elasticsearch and so on with experimentation on themes.
  • After getting the slow threads and details in flame graphs plus slow traces, if it’s custom code or configuration or DB call or ES which is slow, optimize it like Hikari pool connections or if it’s source code of Liferay, open the GITHUB repo for Liferay portal, check the source code and reach out of Customer Success / Global Services / Support with inferences depending on your engagement in account. Your Customer Success Manager or Sales can guide you on this.
  • GS / CS will work internally in Liferay to get you the best options and / or patches in case they already exist. Many a times this could also have been fixed in a Hot fix or Fix Pack already. Alternatively, configurations could also solve such problems many a times. To check these go to Liferay customer portal and check the changelog for fix packs. You can also refer to Liferay Learn and Help Center for help articles and tutorials.
  • Various areas of performance tuning: Database, HTTP calls, App server, ElasticSearch, Threads, Heap optimization, Caching and more. We will follow up this post with more pointers on performance tuning in Part – 2. A good list of areas is to check in the deployment guide for your version.
  • Thanks to Fabian Bouché David Nebinger and many more at Liferay Global Services / Support / Customer Success and Customer Support / Engineering due to which I am able to compile the above. Above is a compilation of work from many sources internally in Liferay via work with customers & externally which hopefully should help many of Liferay customers and partners. This also serves as a case study on performance tuning.
  • Email me: Neil@HarwaniSystems.in

Language translation options in Liferay – Part 1

There are two major areas for translations in Liferay:

  1. Web content
  2. Portal itself for its navigation, menus, control panel, forms, portlets, etc. – Localization
  • For web content, there are two major inbuilt options: Using XLIFF files or Liferay interface for manual translation (link provided in references) and automated translation using engines (via API) from Google, Amazon, Azure (link provided in references) and so on.
  • There is an additional area as well for translation integration with products like MoxVeda (link provided in references) where redirections are setup at Web Server level of Liferay and it redirects based on a JAVASCRIPT button to various language translations on MoxVeda server to provide translated content and comes back. All headers and sessions are managed as is. This works both for in-prem and cloud option and is in use by various customers in India.
  • For portal localization, 50 languages are available out of the box and more languages can be added as described in references section link by language properties file with other configurations.
  • Other configurations like unicode and similar in index server (Elastic or SOLR) and database should be considered as needed.

Email me: Neil@HarwaniSystems.in

References:

Liferay architecture and product areas beyond CMS (Content management system) – Part 1

For anyone who is curious about what all are the areas for Liferay beyond CMS (Content Management System) features in terms of architecture and product, below is a glossary of major terms for the moving components & product areas – Part 1:

  • Liferay DXP
  • Liferay Commerce – Commerce – Liferay Learn
  • Liferay Cloud – Liferay Cloud – Liferay Learn
  • Liferay Analytics – Analytics Cloud – Liferay Learn
  • ElasticSearch / SOLR
  • FileStore
  • Publications
  • Objects
  • Low code features
  • Client extensions
  • Integrations like REST
  • Configuration files
  • OSGI
  • CMS, templates, web content, workflow, fragments and similar features to build content driven websites.
  • Database
  • Headless
  • Caching
  • Upgrades
  • Virtual instances
  • Logging
  • Various types of portlets & UI frameworks
  • Layers of architecture as described here: Architecture – Liferay Learn
  • Email me: Neil@HarwaniSystems.in

Liferay clustering – Part 1

Notes on Liferay clustering:

Email me: Neil@HarwaniSystems.in

Liferay & AIML / Generative AI – Part 1

What all is possible with Liferay & AIML / Generative AI? – Part 1. Liferay being open source we can integrate GAI / AIML with Liferay for:

  • Generating content & images in web content section
  • Generating automated blogs, tags, categories and UIUX flows
  • Assistant which could redirect us to relevant help pages
  • Assistant which could suggest which portlets or features to use from documentation
  • Assistant for suggesting configurations of Liferay
  • Intelligent chatbot which is domain specific
  • Assistant for fault finding & log analysis recommendations
  • Assistant for detecting status of liferay, integrations, file store & database
  • Assistant for analysis of networked components like web server, CDN, hosting / cloud and so on
  • List is endless and this seems to be the just the start of this new area of integrating AIML / GAI into enterprise applications for monitoring, suggestions and assistance

Refer my earlier blog for what kind of disclaimers might be required when working with GAI: What points can be part of fair use disclaimer for Generative AI? – Part 1 | LinkedIn

Email me: Neil@HarwaniSystems.in

How to take knowledge transfer in a discussion for Liferay engagement – Part 1

Here is a list of points which will help in taking a knowledge transfer for a Liferay engagement – Part 1:

1. Check which products of Liferay are in use: DXP, Commerce, Analytics and / or Cloud LXC

2. Take the list of osgi/configs & osgi/modules to get configurations of osgi modules and such

3. Check portal-ext.properties and portal-setup-wizard.properties 

4. Understand the functional flow of usecase fully and draw sequence diagrams for the flows 

5. Check control panel in terms of what is in use like number of private / public pages, server administration, OOTB portlets / apps used, web content, templates, foundation, search, instance / virtual settings, redirects, configurations, LDAP, SSO, system properties  

6. Check theme and style books

7. Get information on file-store, index server, database, clustering and deployment via deployment architecture 

8. Check CI/CD & developer environment details in terms of integration and pipeline

9. Check sizes of file-store and database

10. Get details on type of custom portlets, UI frameworks in use and Lifeary DevStudio usage

11. Check integrations with Liferay and the ecosystem like deployment on in-prem infra and cloud deployment

12. Check CPU / memory usage and errors that frequently come from logs. Get logs for last 7-15 days

13. Check the ecosystem of code quality, monitoring & performance tools if any are present 

14. Get a list of problems from developers, inputs from functional managers, any roadmap, upgrade plans for future usage 

Email me: Neil@HarwaniSystems.in

Checklist for DMS Use Case in Liferay

Find below a checklist for Liferay’s DMS (Document Management System) Use Case:

  • Size your document average size, range of size, number of documents, type, viewers, thumbnail requirements early
  • Decide the workflow templates for start plus growth per quarter & estimated workflow instances per day / week / month in advance which will run on your documents
  • Size your file store and decide on SAN / NAS requirements early based on latency / size of documents / number of folders and so on
  • Switch to advanced file store early if you have large number of documents – this is preferrable right from the start
  • Consider adding multiple repositories in advance if you have multiple file stores and a very large number of documents across repositories
  • Use case of DMS specific software other than Liferay working alongside Liferay mounted via CMIS protocol should be considered early incase of very large number of documents across repositories
  • Full text / partial / multilingual search requirements should be planned early
  • Scanning integration if needed should be considered
  • Anti-virus considerations should be considered depending on use case
  • Response times should be calculated based on network latency for all users
  • Mobile, responsive, desktop, laptop / universal views for documents need to be planned
  • Cloud deployment use case in terms of blob storage / file store considerations should be done early
  • Separate Elasticsearch should be planned
  • Access control, confidentiality, digital rights management related planning and requirements should be done as a prerequisite
  • Liferay file store, Elasticsearch, data folder, filesystem and database should not be directly worked on – We should work via Liferay UI/Control Panel/Groovy/API and so on. Exceptions are there like reindexing problems, performance tuning and so on but they should be more exceptions than norm.
  • Include backup/restore in sync with database. Also in DR.
  • Leverage Ghostscript and Open Office / Libre Office for text extraction and conversion.
  • Include clam-av for portal-based scans when uploads are supported from external sources.

Email me: Neil@HarwaniSystems.in

Elasticsearch with Liferay – Notes & Links – Part 1

Below are the important notes & links for configuring Liferay DXP with Elasticsearch.

Email me: Neil@HarwaniSystems.in

How to debug Liferay? – Some pointers – Part 1

How to debug Liferay? Some pointers. – Part 1. Many a times, we only check at specific places and forget other areas while debugging. This small blog acts as a checklist to check and debug Liferay.

  • Look at installing and using GLOWROOT
  • Check the slow traces / web transactions / errors and the related graphs in GLOWROOT
  • Check the logging levels module wise and overall
  • Check all the Liferay nodes if in a cluster
  • Check the app server logs
  • Check JNDI & JDBC settings
  • Check the things by simulating on default vanilla instance / bundle
  • Use help center articles
  • Check your webserver, load balancer and database configurations plus logs
  • Check your portal & system properties
  • Check configurations in control panel for the related work
  • Check your custom API list
  • Check details via GoGo shell commands
  • Check the code in Liferay DevStudio or your favorite IDE
  • Check marketplace apps that are installed
  • Consider using Groovy scripting for debugging
  • Check virtual instances if in use
  • Check OSGI configurations if added
  • Check your elastic search server status
  • Check your heap size and thread dumps plus configurations in setenv.sh/bat

Blog also gives you an idea on the configurability and extent of Liferay modularity. It makes our work easier when many of the things are configurable.

References:

Links on important technical concepts of Liferay – Part 1

Here are some links on important technical concepts of Liferay – Part 1. Hope this is helpful to all using and learning Liferay.

Email me: Neil@HarwaniSystems.in