talent-connect / connect

Mentor-mentee and jobseeker-company matchmaking platform used by ReDI School of Digital Integration, in Berlin, Munich and Düsseldorf, Germany.
https://connect.berlin.redi-school.org
22 stars 9 forks source link

[CON/TP Changes visibility] Make changes in Salesforce immediately visible #694

Open fortini opened 1 year ago

fortini commented 1 year ago

Context/background

With the migration to SF, changes in Salesforce appear in CON/TP after five minutes

The new CON/TP backend uses a “caching” mechanism to speed up the User Experience. The cache is “refreshed” every five minutes. A side-effect of this is that it may take some time for changes in Salesforce to appear in CON/TP.

Why are we doing this? We need to have CON/TP refreshed immediately

What needs to be done?

We can “fix” with about a day’s worth of developer work, by having our backend “watch out for” changes. Whenever changes occur, the backend will by itself trigger a refresh.

kdanilyants commented 1 year ago

Dear @ericbolikowski , after our All Stars / iteration planning today, this ticket was prioritized by @fortini It looks like you have already taken some thoughts on it, and estimated the development effort as one day of work. Is it something you will have to take over or is there a chance to pair on it with @tawfeeqm , for example?

ericbolikowski commented 1 year ago

I'll schedule to take care of it next week. Also, good news: my retainer has changed from 3hrs/week to 5hrs/week. This applies to May-December 2023.

astkhikatredi commented 1 year ago

I changed the priority to medium (from high) since the team didn't notice any big delays. Company profile approval can take 5-6 minutes, but this is completely fine. All other approvals are happening almost immediately.

ericbolikowski commented 12 months ago

Code complexity here is roughly medium. Business value is questionable. There are few cases where the caching would cause a problem, I believe. I tried to explain why in text, but it's quite tricky to explain. Let's discuss this one in person.

In computer science, quite famously the two hardest problems are: what to name things, and cache invalidation, which is the question we have before us here.

ChatGPT offers some assistance in explaining how hard it is:

In the realm of computer lore, Two problems stand, forever more. One is naming, as tales suggest, But cache invalidation beats the rest.

To cache is to gain a speedy prize, Fetching data in a blink of eyes. But when to clear, or update that space, Is where the challenges often take place.

For data evolves, it shifts and slides, And what the cache holds, it often hides. When should old values take their leave? That's the riddle we aim to weave.

If too early, we might miss the mark, Fetching again, rekindling the spark. Too late, and outdated it stands, Leading us astray with old data in hands.

In an ideal world, we'd perfectly know, When to hold tight or let values go. But alas, computers aren’t quite so wise, Predicting change, they oft misprise.

Balance is key, that’s clear to see, Between speed and fresh accuracy. Cache invalidation, tricky to master, Get it wrong, and it's a disaster.

Thus among challenges, big and small, This one surely tops them all. For in the world of ones and twos, Cache conundrums give us the blues.