EarthSystemCoG / COG

COG source code
BSD 3-Clause "New" or "Revised" License
8 stars 16 forks source link

Improve performance of user federation #1278

Closed LucaCinquini closed 8 years ago

LucaCinquini commented 8 years ago

Who: Luca

CoG must periodically update the user status (project tags and project memberships) from across the federation. This is an expensive operation which involves querying all the other federated CoG sites. This happens whenever one of these two conditions happens:

o The user logs into CoG o A timeout equal to 3600 has passed since the last update (even if the user uses an established cookie session, without logging in again)

Currently, the user status update is executed synchronously, which will cause unnecessary delay when the user starts using CoG.

LucaCinquini commented 8 years ago

This operation now happens in a separate python thread, i.e. asynchronously. It still happens when one of the two conditions above is met.

Note that as an additional bonus, the code now deletes user membership in groups that cannot be found, such as for example "mom5_in_nems" (because the project has been deleted, renamed, or made private at its local site).

murphysj commented 8 years ago

How would I test this? Should you just close it?

LucaCinquini commented 8 years ago

You could look at the log files and see that in the background CoG is still querying the other sites for updated information, while your page has finished rendering already. Otherwise you can just close it I think thanks, L

On May 26, 2016, at 9:10 AM, Sylvia Murphy notifications@github.com wrote:

How would I test this? Should you just close it?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/EarthSystemCoG/COG/issues/1278#issuecomment-221899684

murphysj commented 8 years ago

I looked at the logs, but everything happened so fast, I could tell what happened first. I'll trust you on this one. Closing.