dotCMS / dotCMS/core

Stop polling for pg Notifications

Open
#35,111 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

We use postgres pub/sub to sync our clusters cache invalidations among other things. Our current implementation uses polling every 500ms to retrieve these notifications.

The pg_jdbc driver has a mechanism to connect and just listen for these notifications in real time rather than polling for them. Using this should speed up our pub/sub messaging and prevent unnecessary connections/load on postgres.

Acceptance Criteria
  • Insure that pubsub messages are being passed in a cluster
Priority

None

Additional Context

No response

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

Locate the current implementation that polls PostgreSQL notifications every 500ms and read how it connects to cluster cache-invalidation pub/sub. Verify the PostgreSQL JDBC notification-listening mechanism and test that pub/sub messages are passed across a cluster without the polling behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgres
Domain
backend, databases, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.