7 Replies Latest reply: May 10, 2006 12:00 PM by Aron Gombas RSS

Scheduling Service Updates

Pawel Wrzeszcz Novice

Hello,

I've browsed through the kosmos code and found out that cached values are updated every fixed time (10 minutes). To be accurate, after this time kosmos svn service updates if revision has changed. Jira service always performs update.

How about having a possiblitity to configure when the update is performed? Let's say, to schedule update to be performed always at midnight EST.

I can implement such feature and send you a patch.

Looking forward to hearing what do you think about it.

Cheers

  • 1. Re: Scheduling Service Updates
    Aron Gombas Novice

    Hi!

    "wrzep" wrote:

    I've browsed through the kosmos code and found out that cached values are updated every fixed time (10 minutes). To be accurate, after this time kosmos svn service updates if revision has changed. Jira service always performs update.

    Yes, your observations are absolutely correct.
    (JIRA always updates itself, because there is no easy way to decide whether any change happened in the JIRA pages. In the case of SVN, it's easy, you just have to check whether the rev. changed.)

    "wrzep" wrote:

    How about having a possiblitity to configure when the update is performed? Let's say, to schedule update to be performed always at midnight EST.
    I can implement such feature and send you a patch.

    Such a feature was in the "Future ideas" section of the project roadmap: "Scheduled indirect updates -- Fire periodic auto-updates using Quartz". I was waiting for someone to come with a request related to this. ;)
    My plan was to use Quartz and to be able to specify the scheduling (e.g. every 30 minutes, at midnight, etc.) in a completely flexible way using the standard Quartz syntax. Any better idea?
    It'd be awesome if you could implement this!
    Thanks a lot.

  • 2. Re: Scheduling Service Updates
    Aron Gombas Novice

    Design note: the most important requirement for this feature is that is must be FULLY TRANSPARENT for the service implementation POJOs, just like the current caching feature.
    Probably a good way to go is to do with an AOP interceptor...

  • 3. Re: Scheduling Service Updates
    Pawel Wrzeszcz Novice

    Hello Aron,

    "aron.gombas" wrote:

    My plan was to use Quartz and to be able to specify the scheduling (e.g. every 30 minutes, at midnight, etc.) in a completely flexible way using the standard Quartz syntax. Any better idea?


    I really appreciate your idea of using Quartz to schedule updates. I've never heard about Quartz before.

    Actually, I thought about some simple solution, cause I can't afford integrating kosmos with so powerful scheduling system now.

    On the other hand, your idea is really tempting, so you may expect me interested in this subject some day.

    Cheers

  • 4. Re: Scheduling Service Updates
    Aron Gombas Novice

    Hi Pawel!

    "wrzep" wrote:
    Actually, I thought about some simple solution, cause I can't afford integrating kosmos with so powerful scheduling system now.

    OK, if your time allows, feel free to do it as you originally planned. A simple solution is still much better than nothing and we can enhance it any time later.


  • 5. Re: Scheduling Service Updates
    Aron Gombas Novice

    FYI: the current SVN HEAD version includes the new "scheduled updates" feature! This is based on Quartz, so the configuration possibilities are unlimited!
    Hardly tested, but seems pretty good for the first try.

  • 6. Re: Scheduling Service Updates
    Pawel Wrzeszcz Novice

     

    "aron.gombas" wrote:
    FYI: the current SVN HEAD version includes the new "scheduled updates" feature! This is based on Quartz, so the configuration possibilities are unlimited!
    Hardly tested, but seems pretty good for the first try.

    Aron,

    That's really cool! Thank you.
    I'll check it out soon :-)

  • 7. Re: Scheduling Service Updates
    Aron Gombas Novice

    Sidenote: this feature is available in 0.2.0RC2.