{"action":"created","issue":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/5345","repository_url":"https://api.github.com/repos/IQSS/dataverse","labels_url":"https://api.github.com/repos/IQSS/dataverse/issues/5345/labels{/name}","comments_url":"https://api.github.com/repos/IQSS/dataverse/issues/5345/comments","events_url":"https://api.github.com/repos/IQSS/dataverse/issues/5345/events","html_url":"https://github.com/IQSS/dataverse/issues/5345","id":384807262,"node_id":"MDU6SXNzdWUzODQ4MDcyNjI=","number":5345,"title":"Proposal: make persistent EJB timers non-persistent","user":{"login":"poikilotherm","id":5468333,"node_id":"MDQ6VXNlcjU0NjgzMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/5468333?v=4","gravatar_id":"","url":"https://api.github.com/users/poikilotherm","html_url":"https://github.com/poikilotherm","followers_url":"https://api.github.com/users/poikilotherm/followers","following_url":"https://api.github.com/users/poikilotherm/following{/other_user}","gists_url":"https://api.github.com/users/poikilotherm/gists{/gist_id}","starred_url":"https://api.github.com/users/poikilotherm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poikilotherm/subscriptions","organizations_url":"https://api.github.com/users/poikilotherm/orgs","repos_url":"https://api.github.com/users/poikilotherm/repos","events_url":"https://api.github.com/users/poikilotherm/events{/privacy}","received_events_url":"https://api.github.com/users/poikilotherm/received_events","type":"User","site_admin":false},"labels":[{"id":977396441,"node_id":"MDU6TGFiZWw5NzczOTY0NDE=","url":"https://api.github.com/repos/IQSS/dataverse/labels/Status:%20Community%20Dev","name":"Status: Community Dev","color":"e6e6e6","default":false}],"state":"open","locked":false,"assignee":{"login":"landreev","id":737558,"node_id":"MDQ6VXNlcjczNzU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/737558?v=4","gravatar_id":"","url":"https://api.github.com/users/landreev","html_url":"https://github.com/landreev","followers_url":"https://api.github.com/users/landreev/followers","following_url":"https://api.github.com/users/landreev/following{/other_user}","gists_url":"https://api.github.com/users/landreev/gists{/gist_id}","starred_url":"https://api.github.com/users/landreev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landreev/subscriptions","organizations_url":"https://api.github.com/users/landreev/orgs","repos_url":"https://api.github.com/users/landreev/repos","events_url":"https://api.github.com/users/landreev/events{/privacy}","received_events_url":"https://api.github.com/users/landreev/received_events","type":"User","site_admin":false},"assignees":[{"login":"landreev","id":737558,"node_id":"MDQ6VXNlcjczNzU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/737558?v=4","gravatar_id":"","url":"https://api.github.com/users/landreev","html_url":"https://github.com/landreev","followers_url":"https://api.github.com/users/landreev/followers","following_url":"https://api.github.com/users/landreev/following{/other_user}","gists_url":"https://api.github.com/users/landreev/gists{/gist_id}","starred_url":"https://api.github.com/users/landreev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landreev/subscriptions","organizations_url":"https://api.github.com/users/landreev/orgs","repos_url":"https://api.github.com/users/landreev/repos","events_url":"https://api.github.com/users/landreev/events{/privacy}","received_events_url":"https://api.github.com/users/landreev/received_events","type":"User","site_admin":false},{"login":"poikilotherm","id":5468333,"node_id":"MDQ6VXNlcjU0NjgzMzM=","avatar_url":"https://avatars3.githubusercontent.com/u/5468333?v=4","gravatar_id":"","url":"https://api.github.com/users/poikilotherm","html_url":"https://github.com/poikilotherm","followers_url":"https://api.github.com/users/poikilotherm/followers","following_url":"https://api.github.com/users/poikilotherm/following{/other_user}","gists_url":"https://api.github.com/users/poikilotherm/gists{/gist_id}","starred_url":"https://api.github.com/users/poikilotherm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poikilotherm/subscriptions","organizations_url":"https://api.github.com/users/poikilotherm/orgs","repos_url":"https://api.github.com/users/poikilotherm/repos","events_url":"https://api.github.com/users/poikilotherm/events{/privacy}","received_events_url":"https://api.github.com/users/poikilotherm/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-11-27T13:58:27Z","updated_at":"2018-12-07T20:55:05Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is related to #5292 and a story of that epic.\r\nAs [`DataverseTimerServiceBean.java`](https://github.com/IQSS/dataverse/blob/develop/src/main/java/edu/harvard/iq/dataverse/timer/DataverseTimerServiceBean.java) has been mostly written and maintained by @landreev, this most certainly is for him...\r\n\r\n### Context\r\nCurrently, in [`glassfish-setup.sh`](https://github.com/IQSS/dataverse/blob/0045cd6368e0d3fee8fd7e37ec87d7d1233ae30d/scripts/installer/glassfish-setup.sh#L127) you need to setup a database connection for storage of persistent EJB timers.\r\n\r\nReusing the database for Dataverse for EJB timers is alright, but it is not easy to depict when heading for containers. It is much easier for container approaches to use application scoped JDBC connections, but those seem not to be reusable for EJB timers.\r\n\r\nThere seemed to be some issues in the past, too. #3672, #3789 and more.\r\n\r\n### Proposal\r\n*Just remove the persistent nature of timers.*\r\n\r\n* They are created on each startup on the timing server ([see docs](http://guides.dataverse.org/en/latest/admin/timers.html)).\r\n* In a single node setup, when the server is down, IMHO there is no need to have the timers persistent in a database. No one will execute them. Executing them after the server comes back seems with HarvestingClient and ExportClient as current use cases not very important.\r\n* In a multi node setup, when the timing server is down, you need to change it to another server, so they get executed again. This will result in broken persistent timers anyway, as they had been created with the name of the dead timing server.\r\n\r\nWhen persistance is needed in a multi node setup in the future, there is Hazelcast in Payara which supports storing timers as long as at least one cluster member is online...\r\n\r\nComments are very much appreciated. :-)"},"comment":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/comments/445362560","html_url":"https://github.com/IQSS/dataverse/issues/5345#issuecomment-445362560","issue_url":"https://api.github.com/repos/IQSS/dataverse/issues/5345","id":445362560,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTM2MjU2MA==","user":{"login":"landreev","id":737558,"node_id":"MDQ6VXNlcjczNzU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/737558?v=4","gravatar_id":"","url":"https://api.github.com/users/landreev","html_url":"https://github.com/landreev","followers_url":"https://api.github.com/users/landreev/followers","following_url":"https://api.github.com/users/landreev/following{/other_user}","gists_url":"https://api.github.com/users/landreev/gists{/gist_id}","starred_url":"https://api.github.com/users/landreev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/landreev/subscriptions","organizations_url":"https://api.github.com/users/landreev/orgs","repos_url":"https://api.github.com/users/landreev/repos","events_url":"https://api.github.com/users/landreev/events{/privacy}","received_events_url":"https://api.github.com/users/landreev/received_events","type":"User","site_admin":false},"created_at":"2018-12-07T20:55:05Z","updated_at":"2018-12-07T20:55:05Z","author_association":"CONTRIBUTOR","body":"@poikilotherm \r\nAs a quick note, yes, this makes perfect sense. \r\n\r\nAt present, we are not benefiting from the fact that the timers are stored in the database, at all. It's kind of the other way around: you can say that we go to the extra trouble of making sure that our timers are NOT persisted. In a multi-node cluster, we specifically try to run all the timers on just one of the nodes (for various reasons); AND we clear and re-create all the timers on startup. \r\n\r\nSo yes, it will be cleaner, not to bother saving them in the database in the first place. \r\n\r\n(we actually have tried something similar, in our own production cluster at Harvard a while ago; I can't remember now why we chose not to make it the default solution in the distribution...)\r\n\r\nI may have questions about some specifics of the PR (#5371) though; I'll be in touch. "}}
{"actor":{"display_login":"landreev"}}