views:

154

answers:

2

I watched the video and I know the general principles - hot happens even when nobody is subscribed, cold happens "on demand". Also, Publish() converts cold to hot and Defer() converts hot to cold.

But still, I feel I am missing the details. Here are some questions I'd like to have answered:

  • Can you give a comprehensive definition for these terms?
  • Does it ever make sense to call Publish on a hot observable or Defer on a cold?
  • What are the aspects of Hot/Cold conversions - do you loose messages, for example?
  • Are there differences between hot and cold definitions for IObservable and IEnumerable?
  • What are the general principles you should take into account when programming for cold or hot?
  • Any other tips on hot/cold observables?
+2  A: 

Hot observables are ones that are pushing even when you are not subscribed to the observable. Like mouse moves, or Timer ticks or anything like that. Cold observables are ones that start pushing only when you subscribe, and they start over if you subscribe again.

Richard Hein
I am surprised to see this posted, I was only half finished writing it, and this tells you only what you already know, sorry. Too late to finish tonight. I will update this tomorrow with some code samples.
Richard Hein
_myPost.SelectMany(mp => _answers.Where(a => a.Author="Richard Hein").Take(1)).Subscribe(Console.WriteLine("Now I can learn more about one the most important topics in RX");
Sergey Aldoukhov
+3  A: 

I hope this helps.

http://leecampbell.blogspot.com/2010/08/rx-part-7-hot-and-cold-observables.html

Lee Campbell
Good article, thanks.
Sergey Aldoukhov