-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: federation requests timeout #24
Fix: federation requests timeout #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
The demo video was nice |
Quick question: can you leave the time out at 60s and do only one call if the first one fails. I mean, you go to the 2 other calls only of the first one doe snot times out. |
we decided today to keep the timeout 30s |
@syphax-bouazzouni Tests working now, ready to be merged |
Gemfile
Outdated
gem 'webmock', require: false | ||
gem 'activesupport', '~> 7.0.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to add this as it is already added in the gemspec file
|
||
module LinkedData | ||
module Client | ||
module RequestFederation | ||
|
||
CACHE = ActiveSupport::Cache::MemoryStore.new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not work as expected as in the Rails we don't use MemoryStore, but MemeCache or Redis.
…eping tests running
@syphax-bouazzouni Finally I initialized a fake Rails.cache in the tests envirenment that uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good idea
Related issue: ontoportal-lirmm/bioportal_web_ui#889
Problem Description
The current implementation of the get method has a timeout set to 60 seconds. This creates a significant delay in cases where a portal (e.g., BiodivPortal) is down because multiple requests are sent for a single operation. For example:
1 - If BiodivPortal is down, selecting it on the browse page triggers multiple requests to its API endpoints (e.g.,
/ontologies
,/submissions
,/categories
, etc.).2 - Each request waits for the full 60-second timeout before failing.
3 - This results in compounded delays, causing the user to wait for several minutes before receiving feedback.
Proposed solution in this PR
To address this issue, this PR introduces the following improvements:
Result
Demo
Fully explained in browse page (enable sound)
https://drive.google.com/file/d/13JAVRZradprsXNjwmhJj_AMA58WwTTYr/view?usp=sharing
Screenshot from search page
