Closed jmiller656 closed 5 years ago
🙀 This is cool, but let's put a hold on it till we have a better idea of how it might affect deployment/cost of deployment
The other consideration would be having something in the cache and then adding a motif to the system. We need to make sure that either all caches are flushed or that the cache is used and the extra motif is considered for alignment and then the cache is updated.
Looks like we can add a couple of things to make sure this happens. There are some cache put and evict annotations, we'll probably have to use those.
Here's a link to an article I've been following on it: https://medium.com/@igorkosandyak/spring-boot-caching-d74591abe117
As for cost of deployment, I think it might actually decrease. This is because we'll be spending much less time on expensive / long running compute operations (imagine 1000 people looking up 8gch at the same time after it's already been computed once). The response text that is cached would be very small in comparison. For every possible protein in the PDB (I believe 300k?) We'd be storing a max of 1000 json strings for each (one for each motif). This would be 300M strings. I don't believe this case would happen, but if it did, I think it would still be relatively manageable. I'm also assuming there is come kind of invalidation of cache after time. Will need to look into this more
🤑
Quick PR to make previously performed alignments show up MUCH faster