Erik Meijer: Rx in 15 Minutes - Rx is Here!!!!!
- Posted: Nov 17, 2009 at 12:53 PM
- 90,068 Views
- 20 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
Erik Mejier explains what Rx is and why it matters in 15 minutes or less!
Comments Closed
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
Rx and MEF are my two favourite new additions to the v4 BCL. Just awesome to see so much care, thought and love going into the platform.
Could you (would you) use RX for file or socket I/O?
If so how would you compare it to IO Completion Ports?
As Rx is a library to orchestrate, not perform asynchronous operations, you would use the Async IO features from .NET and use Rx to react to the completion of the IO:
standard async IO:
var fs = new FileStream(@"d:\temp\test.txt", FileMode.Open, FileAccess.Read, FileShare.Read, 1, true); var data = new byte[fs.Length]; fs.BeginRead(data, 0, data.Length, (result) => { var bytesRead = fs.EndRead(result); Console.WriteLine("{0} bytes read.", bytesRead); }, null);with Rx:
var fs = new FileStream(@"d:\temp\test.txt", FileMode.Open, FileAccess.Read, FileShare.Read, 1, true); var data = new byte[fs.Length]; var asyncRead = Observable.FromAsyncPattern<byte[], int, int, int>( fs.BeginRead, iasyncResult => fs.EndRead(iasyncResult)); var result = asyncRead(data, 0, data.Length); result.Subscribe(bytesRead => Console.WriteLine("{0} bytes read.", bytesRead));Now this is a small sample, but the main difference is that in the latter, the result of the async operation is a first-class value. This means that you can pass the event stream around, do various operations on it (such as select, merge, selectmany, zip etc...), post the result to the UI thread, etc...
in a bit of shameless self promotion, check out my project
http://geny.codeplex.com/
its a code generator that generate observable versions of various other things such as events
the generation doesnt quite work yet because i needed a release like this to make it work, but check back soon
a question, Rx is available for .net3.5 but it uses pfx, how does that work? is there a version of pfx included in the .net 3.5 release?
--edit--
yes it is
--edit2--
http://geny.codeplex.com/ has now been updated to wor with the new Rx release! there is still no release and im planning to backport it to vs2008 [might be trivial though] but the trunk is now able to create extension methods that return observable methods from events
Awsome. I'm definatly going to check it out =)
Hey folks,
Where can we find the Rx dev labs? I've looked around (e.g. http://msdn.microsoft.com/en-us/aa570323.aspx) but can't find them anywhere!!
-Jamie
http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx
var task1 = Task.Create(_ =>
{
"Thanks for back porting TPL to 3.5!".WriteLine();
});
var task2 = Task.Create(_ => "Thanks for Rx Erik!".WriteLine());
Task.WaitAll(task1, task2);
"Thanks to all for these wonderful things!".WriteLine();
BTW - what happened to Task.Factory? I don't see factory class in these Rx 3.5 bits. But the docs are full of factory samples? What am I missing?
thanks J.
are you sure they're not in there?
they seem to bee in
%programfiles%\Microsoft Reactive Extensions\Redist\DesktopV2\System.Threading.dll
atleast, perhaps you have another version in the gac or something?
The correct version should be 1.0.2052.0
Very cool!
for an approach to turn dependency properties into Observables, check out this thread
http://channel9.msdn.com/posts/J.Van.Gogh/Writing-your-first-Rx-Application/
"The correct version should be 1.0.2052.0"
My version was 1.0.3058.34407 downloaded with the .Net 3.5 link. No Future either. I am guessing this backported version is slimmed down to just the bones they needed for Rx.
ok.. mine is 1.0.2052.0 atleast
downloaded the 3.5 version on this box no more than an hour ago
maybe someone from the team can shed some light on this?
(wasnt Future replaced by Taks<T> by the way? )
Sounds like you have the June 2008 CTP version of Pfx installed on your machine, their version number was 1.0.3058.34407. Try going through your installed program list to see if it is still there by anychance and uninstall that before installing Rx...
"Sounds like you have the June 2008 CTP version of Pfx installed on your machine"
You sir are steely eyed missle man. That was the issue. Explains a lot of other things have been knocking head on.
I like the concept of explaining in 15 min. To the point. Keep up the good work
Brilliant and Interestingly Explained.
Thx for this Video !!!
Great video - my friend recommended Rx, and the penny dropped for the first time after watching this video.
Remove this comment
Remove this thread
close