Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Programming Streams of Coincidence with Join and GroupJoin for Rx

Download

Right click “Save as…”

Rx team members and programming super heroes Wes Dyer and Bart De Smet explain the latest powerful additions to Rx: Join and GroupJoin. Wes describes the approach they took to design and implement this reliable approach to programming streams of coincindence with Rx. All of the time is spent at the whiteboard. You can play with this by downloading the latest version of Rx:

  • Download Rx 1.0.2838.0 for .NET 3.5 SP1
  • Download Rx 1.0.2838.0 for .NET 4
  • Download Rx 1.0.2838.0 for Silverlight 3
  • Download Rx 1.0.2838.0 for Silverlight 4
  • Download Rx 1.0.2838.0 for JavaScript
  • Download Rx 1.0.2838.0 for all common flavors
  • Download Rx 1.0.2838.0 for XNA 4 XBOX 360
  • Download Rx 1.0.2838.0 for XNA 3.1 Zune
  • Download Rx 1.0.2838.0 for Windows Phone 7

     

  • Tags:

    Follow the Discussion

    • Adam SpeightAdam​Speight2008 The Bandito Coder

      Charles: Everyone can now see you do do work. (Reflection in Window). 

    • CharlesCharles Welcome Change

      Window reflecting Charles. It's actually subtly related to the topic at hand. Listen carefully.

      C

    • dreamdream

      The rx guys never sleep. They live in one big window of work.No but seriously I can see how those operators can be powerful! Great job.Keep it up guys.

    • CharlesCharles Welcome Change

      @dream: Actually, Bart does not sleep. Smiley

      Erik's team is the most productive team of developers I've ever seen. It's hard to believe how much great code they crank out in a 24 hour period. I can't talk about what they are currenly working on, but you can imagine it will be quite excellent! Wink

      One of the coolest things about Erik's team is that there is no ego maniacal madness hovering about. These folks are just pure engineers, humble, creative, passionate and brilliant.

      C

    • Beautiful. I've read the name of the topic first as "Programming streams of Consciousness" Wink

    • @Charles: They are the best indeed!

    • Hm, very interesting developments.

      Now I'm thinking that IO<IO<T>> can actually model observable collections (not related to Rx, implementing INotifyCollectionChanged interface) with events being 'element is inside collection at specific position'. Then we can get LINQ to observable collections for free.

    • RafaelHTSRafaelHTS

      Just wanted to point out the that Window operator is really GroupBy. Which is how I implemented my generalized family of time sliced operators in my (small) personal Rx rewrite. The type signature Wes mentioned at the beginning of the video is also the same as IGroupedObservable<TKey, TValue>'s. I was expecting he would mention it.
      GroupJoin seems like a very interesting find indeed, still've got to figure out what it implies exactly. What I'd like to ask is except for the Window derived branch, what other operators are you implementing/planning to with it? Join and CombineLatest are givens, are there any others I'm not quite seeing yet?
      Finally, though, why all the secrecy? xD
      Cheers. And yes, you rock.

    • Wes DyerWes Dyer

      @RafaelHTS:
      Yep, GroupBy and Window are closely related.  As you mention, IGroupedObservable<TKey, TValue> is really the same as IObservable<(TKey, IObservable<TValue>) which is the type that is indicated in the video.  We are planning other related changes, so yes I think you will see more in this area.

    • Not sure if I get all of it, I guess I have to watch it again.

      It would be very helpful to look at some samples. Also, it looks like the discussion is based on embedded assumption that observations of the events are direct. I wonder how it all change if observations were indirect - for example when you are trying to reconstruct flow of events based on gathering clues. Stream of clues is directly observable (and ordered in time), while pointers to the event stream of interest can be to the past or future times or be just durations without definite starting time points. Would Rx be useful in this case?

    • Bent Rasmussenexoteric stuck in a loop, for a while

      Nice interview and pretty novel ideas at play here.

      (@Charles: I find humbleness a common trait in great programmers (and its opposite detractive). The slight arrogance afforded by someone who has crafted a superior solution doesn't hurt though (e.g. Erik bashing the mishmash that is the Java Iterator interface vs the simplicity of IO, and its IE duality.)

    • Adam SpeightAdam​Speight2008 The Bandito Coder

      Interesting Interview

       

       

      exoteric wrote

      (@Charles: I find humbleness a common trait in great programmers (and its opposite detractive). )

       

      Is the trait an effect because they do programming?

      An effect of being humbled by the compiler and/or runtime returning error and/or exceptions.

      A great programmer thinks about problem, analyses it. 

       So is Programming a subset of Philosophy?  

      An observation of some people (particularly non-programmers) I know (no names) struggle with the basic concepts that programmers take almost for granted.

      They make logical fallacy of 

      Both X and Y, I believe both to be True that this also impliesmust also be True.

      That the same Effect (this happened) could be the result of different Causes. 

      Dealing with unknowns, they struggle accepting I don't knows;

      "Where is {x}?"

      "I don't know"

      "What do mean you don't know?"

      "I don't know where {x}  is?"

      You can replace with any question

      .They think you're lying and do know, and then construct a conspiracy to support, that belief.

      This suggests (to me) that Psychology also has role to play.

       

      So how do you define a great programmer?

    • Richard Anthony HeinRichard.Hein Stay on Target
      public class GreatProgrammer {

             public Magic Magic { get; set; }
      }
      ;) 
    • dreamdream

      @Charles:[quote]
      2 days ago, Charles wrote
      @dream: Actually, Bart does not sleep.
      Erik's team is the most productive team of developers I've ever seen. It's hard to believe how much great code they crank out in a 24 hour period. I can't talk about what they are currenly working on, but you can imagine it will be quite excellent!
      One of the coolest things about Erik's team is that there is no ego maniacal madness hovering about. These folks are just pure engineers, humble, creative, passionate and brilliant.
      C

      [/quote]
      Could not agree more, makes you kind of proud to be a part of this bunch called programmers/computer scientists:)
      Kinda hard to imagine a non-sleeping Bart though;)
      Kudos to you Charles for making it happen, thanks to You we can taste the technology straight from the oven:)

    • Bart De Smetbdesmet Bart De Smet ​[MSFT::SQL::​Cloud​Programmabi​lity::Rx]

      @dream: I produce my best code with little sleep, so I try to live such a rhythm Smiley. Nothing's more lovely to watch than a new day being born in the summer with the first traces of daylight appearing around 5AM through the 21st floor windows. I think I'm one of the lucky few to survive on little sleep (~4 hours on weekdays).

      Thanks for the kind words. Back to the bakery now, the oven is heating Wink.

    • If I understand this correctly, people entering/leaving a room can be modeled like so:

      IObservable<Person> peopleEnteringRoom = ...;
      
      class Person
      {
        public IObservable<object> LeaveRoom;
        ...
      } 

      In this case, I don't have any information to communicate when a person leaves the room, that's why I chose IObservable<object>. I've implemented a person leaving as such:

      person.LeaveRoom.OnNext(null);
      person.LeaveRoom.OnCompleted(); 

      Is this the correct, or recommended, way to implement this?

    • Greg Braygbrayut Check out PhraseMeme Scanner for Windows Phone at ​PhraseMeme.​com

      Great video! Sounds like Windowing is a powerful tool being added to the Rx toolkit. My question is how do you filter a stream of streams? I tried using BufferWithTimeOrCount in a Windows Phone 7 project using both the old version that returns a list and the new version that returns an IObservable. In the old version I could do simple Where x.Count == 1 to see if only one item was produced, but in the new version I can't figure out how to implement a where clause on an IObservable<IObservable<T>>. There is a xs.Count() method, but it retuns an IObservable<int> not an int.

      I think some concrete examples would help. Also I think I need to sleep on it and try again in the morning Tongue Out

    • Why not model time as yet another stream of events?  I know time is best looked at as continuous and there could be stability issues, but in a digital computer system, time is ultimately discrete.  

      That way, questions about coincidence of events can be addressed simply by determining order of events.  Sliding windows are also trivially made by slicing a time stream.

    Remove this comment

    Remove this thread

    close

    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.