Wes Dyer and Jeffrey Van Gogh: Rx Virtual Time
- Posted: Aug 27, 2010 at 1:00 PM
- 45,902 Views
- 8 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
The latest release of Rx includes new tools for testing reactive programs as well as virtual scheduling. In this video, Jeffrey
and Wes discuss virtual time and virtual schedulers and how they can be used to write tests and query historical data.
What is virtual time, exactly? What purpose does it serve and how is it related to reality? Wait a century-second. What time is it? When?
As usual, Wes and Jeff go deep. Dive in with us. This is heady stuff and also really useful for practical programming with Rx. It's always great to spend some time with Wes and Jeff at the whiteboard and at the computer (they demo this for us towards the end
of the session).
Enjoy!
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Just like any other co-ordinate system can the virtual time convert to decimal, binary time or 13 month year time system? Covariance and contra-variance over time; nice. Where to plug-in the landmarks? At the extension points?
Awesome, finally understand how Scheduler.Now is used, when I first saw that in Rx I knew you guys were using (or planning on using) virtual time but there seemed to be no documentation anywhere on the subject. Thanks for the explanation guys, extremely useful. Eagerly waiting on your unit tests so that I can start writing my asynchronous unit tests like that!
I just realised I can write unit tests that simulate "hot" observables that I don't normally have control over i.e. mouse moves etc, I can replace the original source with a mock observable that raises events a pre-determined times and pushes them through a virtual scheduler. Excellent!
I was hoping for a tutorial or video on the scheduling aspects of Rx because they remained a mystery for me, so thanks. Please do release the test code!
Thanks for sharing! I've still not spent the time with Rx I've been meaning to. :-/
@N2Cheval,
you would create a scheduler that derives from VirtualScheduler, give it two type parameters that implement the absolute and relative part of your notion of time. For this to work, your notion of time will need to be able to :
http://blogs.msdn.com/b/jeffva/archive/2010/08/27/testing-rx.aspx contains sample code, that hopefully will give you a headstart. We're working on getting our tests shipping as well, but will take a bit more time..
getting "Do you want to download this file" prompt (IE) when clicking "Play" to watch the video...
nevermind - working now.
Great stuff, thanks a lot.
Remove this comment
Remove this thread
close