Hi Evan,

Welcome! :-)
The first one sounds very interesting, and I'd love to see how you achieved it. 
The second one also seems very useful for monitoring purpose. But you might 
want to use different names. As far as I can see, the simple implementation 
classes such as SimpleScheduler, SimpleDispatcher, SimpleErrorReporter and 
SimpleContext are provided as trivial example implementations by design. So, 
probably you should name your enhanced scheduler implementation(s) more 
meaningfully as separate implementation classes. Users can choose one of those 
scheduler implementations for their purposes.
If you can create JIRA issue(s) in https://issues.apache.org/jira/browse/SCXML 
and post patches, then I'm sure it will gather more insights and ideas 
collectively. Please see http://commons.apache.org/patches.html on how to do 
this.
Regarding JodaTime, I'm personally fine with using JodaTime instead of Java 
time, but I think it's more than simple improvements. Also, I'm unaware of any 
potential impacts on other scenarios and environments. So, yes, I would use 
Java time for the improvements for now.

Thanks!

Cheers,

Woonsan






On Wednesday, January 15, 2014 1:17 AM, "Reynolds, Evan" 
<evan.reyno...@mtnsat.com> wrote:
 

>
>Hey!
>
>
>I’ve been using SCXML and it’s really nice. I had some problems with timers 
>though – I just couldn’t quite do what I needed to do, so I wrote some extra 
>scheduler classes. They turned out to be REALLY helpful so I thought I might 
>contribute them back if you thought anyone else could use them.
>
>
>I’ve never contributed to Apache Commons before so please bear with me if I am 
>doing this all wrong.
>
>
>The classes I wrote were for replaying events and testability. I had a series 
>of events and I wanted to replay them – this is great for unit testing and 
>also let me change the state machine and replay the events and see what 
>happened. But timers threw this off – if a timer started, I had no idea when 
>in the sequence of following events the timer would trigger. Therefore one 
>timer class I wrote is for replaying events – you have to tell the replay 
>class what time it is supposed to be, and it’ll fire off any timer events that 
>should have fired. This let me take two or three days of things and replay 
>them almost immediately, which gives me a lot of very useful abilities. I know 
>when each event happened, so I can just register the time and fire the event 
>and all timers behave just like they should.
>
>
>The other timer class I wrote just extended SimpleScheduler. I need reporting, 
>and there are times when things are waiting on a timer to fire – but I can’t 
>tell that as I couldn’t see what timers are present or when they’ll fire. So I 
>couldn’t report on them, nor could I unit test this. So I wrote an extension 
>of SimpleScheduler that just lets me see that information. SimpleScheduler 
>uses a java timer class that ALSO doesn’t let you see any of that information, 
>thus I couldn’t really do this quite the way I hoped, but every time you start 
>a timer this just tracks when it will fire off and lets you query on it.
>
>
>Would these classes be suitable to share back?
>
>
>And if so I noticed that Apache Commons SCXML doesn’t use JodaTime. I’m going 
>to guess I need to rewrite the classes not to use JodaTime before submitting 
>them, but I figured that was worth asking about!
>
>
>
>
>
>
>Evan Reynolds
>Software Engineer – Server Development | MTN
>evan.reyno...@mtnsat.com | www.mtnsat.com
>+1.206.838.7700 main | +1.206.838.7708 fax 
>101 Stewart Street Suite 800 | Seattle, WA 98101 USA
> 
>
>

Reply via email to