zowe / zowe/api-layer

Using only one cache library in the project

Open
#4,172 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Priority: High size/L technical excellence
Dominant language
Java
Stars
92
Forks
81
Avg merge
1d 9h
Merged PRs (30d)
46

Description

Nowadays there are two ways how to cache in the APIML: ehcache, infinispan

EhCache is used to cache information about JWT tokens (especially to store revoked tokens, but also caching generated tokens). Infinispan is used for PAT, loadbalancing, etc.

Storing revoked JWT token has an issue with sharing between multiple instances of Gateway and on the second hand Infinispan is a distributed cache as default.

The aim of this issue is to replace one of the library with the second and it looks resonable to replace EhCache with Infinispan. It could be a part of Modulith initiative (because cache-service would be part of APIML service).

There is one question about using Infinispan and enabling / disabling cache-service. Once Modulith will be in the place I guess disabling caching-service means just skipping the onboarding, but the Infinispan itself could be used. It also means that Infinispan ports should be enabled even the cache service is disabled (to share data between instances). It is also reasonable to enable Cache service as default then.

The benefits:

  • to get rid of the code around sharing revoked tokens (less maintability)
  • less dependency (low probability of vulnerabilities, smaller package)
  • less configuration (omit of EhCache)
  • less usage of memory

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the APIML cache configuration and the code using EhCache for JWT tokens and Infinispan for PAT and load-balancing data. Review how the Modulith cache-service is enabled or disabled and how cache ports are configured across instances. Done means one cache library remains, revoked-token data is shared correctly, and the obsolete dependency and configuration are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.