apologize for comment approval


apologize for comment approval I want to apologize for those of you which sent comments and didn’t got approved. historically there was so much spam comments so I stopped checking the comments. recently I spot that most comment are real and I will go on the comments periodically for approval.
no comments

Awaiting RX


Awaiting RX this post discuss the meaning of awaiting RX stream. many languages including .NET embrace the concept of async / await. async / await on .NET is usually refer to Task, but Task in not the only await-able type in .net, in matter of fact there is a few type which can be awaited, one of those type is IObservable.   what happens when you’re awaiting IObservable? When awaiting IObservable the await schedule on completion and resume with the last value. for example: Code Snippet int i = await Observable.Range(0,...
no comments

Service Fabric Concept, Guidelines and Patterns #1


Service Fabric Concept, Guidelines and Patterns #1 this is the first post in series which will focus on Service Fabric. the series will cover Service Fabric’s concept, guidelines and common patterns.   What is Service Fabric? Service Fabric is new framework that can operate either on the cloud (Azure) or on premise. this framework enable to build solution from small parts (concept known as Micro-Services). Micro-Services can be thought as Object-Oriented for cloud (or distributed application). the most granular unit of Micro-Services called Actor. Actor is similar to class in the Object Oriented paradigm. group of Actor can...

Rx minimal time accuracy


this post discuss basic behavior of RX which you better be aware of. in general RX’s time’s based operator relay on Timers therefore the minimal accuracy of those operator depend on the timer  accuracy which is around 15 millisecond.   the following snippets demonstrate it: Code Snippet Observable.Interval(TimeSpan.FromMilliseconds(1))     .TimeInterval()     .Subscribe(v => Console.WriteLine(v.Interval.Milliseconds)); and this one: Code Snippet var sw = Stopwatch.StartNew(); var tmr = new Timer(state => {     long milli = sw.ElapsedMilliseconds;     sw.Restart();     Console.WriteLine(milli); }, null, 1, 1);
no comments

Challenge #8 Better Solution


last week I was hanging out with friends and like geek often do we was speaking about Rx . when it come to the solution for Challenge #8 ,Eric Rabinovitch suggest much better solution than I had. today I managed to have the time for putting Eric’s idea into code and I came out with shorter and more elegant solution.   before I post the solution I will put short reminder for the issue I’m about to solve. the challenge was all about buffering the data on suspension period and flush it out on resume. the...
no comments

Async Local


following the previous post about .NET 4.5 new Async API this post will focus on AsyncLocal API the subject of this post brought to my awareness while speaking with my  colleagues Yuval Detinis and Ido Flatow. AsyncLocal<T> solving the problem of maintaining call context for logical call rather than the thread context. while working with async / await or asynchronous API in general keeping the call context may become a problem. the thread context may not represent the logical call context. putting data on the thread local storage may be bad idea while working...
no comments

.NET 4.5 new Async API

the new .NET 4.6 and Visual Studio 2015 major features like Roslyn, RyuJIT  musk some other cool feature like async API additions. this post will put some light on a few basic API and will be followed by post about AsyncLocal<T>. .NET 4.6  was adding some convenient API: Code Snippet Task.CompletedTask; var cts = new CancellationTokenSource(100); Task.FromCanceled(cts.Token); Task.FromException(new TimeoutException()); those API may seem silly for newbies but developer which familiar with async code style may find this API’s very useful for abstracting the synchronous /  asynchronous boundaries and for reducing memory footprint for some async...
no comments

Rx Challenge #8 Solution


this post is part of series, the hole series can be found in here. this challenge was all about buffering the data on suspension period and flush it out on resume. the idea is to suspend the observable notification for a while without loosing data. the following diagram show the required functionality Marble Diagram /************************************************* * source  ---1---2---3---4---5---6---7---8---9---10---11-| * hold    -------------T-----------F-----------T---------| * result  ---1---2---3-------------4567--8---9-----------10,11-| *************************************************/ solving this problem require some kind of buffering and if you follow my blog you must know that when it come to buffer and dispatch I’m usually integrating...
no comments

Rx Challenge #8


this post is part of series, the hole series can be found in here.   this challenge is all about buffering data while suspended and flush it out on resume. we already had challenge on Suspend and Resume but that challenge ignored the data during the suspension period. on this challenge you expected to buffer the data during the suspension period and flush it out on resume. to achieve this challenge you have to provide extension method on the following format: Code Snippet public static IObservable<T> HoldWhile<T>(             this IObservable<T> source,             IObservable<bool> hold) {     /*************************************************...
no comments

Rx Challenge TOC


this is a quick access page to the Rx Challenges Questions #1 http://blogs.microsoft.co.il/bnaya/2015/01/27/rx-challenge/ #2 http://blogs.microsoft.co.il/bnaya/2015/02/05/rx-challenge-2/ #3 http://blogs.microsoft.co.il/bnaya/2015/03/06/rx-challenge-3/ #4 http://blogs.microsoft.co.il/bnaya/2015/03/25/rx-challenge-4/ #5 http://blogs.microsoft.co.il/bnaya/2015/04/03/rx-challenge-5/ #6 http://blogs.microsoft.co.il/bnaya/2015/04/10/rx-challenge-6/ #7 http://blogs.microsoft.co.il/bnaya/2015/07/11/rx-challenge-7/   Solutions #1 http://blogs.microsoft.co.il/bnaya/2015/01/31/rx-challenge-solution/ #2 http://blogs.microsoft.co.il/bnaya/2015/02/09/rx-challenge-2-solution/ #3 http://blogs.microsoft.co.il/bnaya/2015/03/25/rx-challenge-3-solution/ #4 http://blogs.microsoft.co.il/bnaya/2015/03/30/rx-challenge-4-solution/      http://blogs.microsoft.co.il/bnaya/2015/04/02/rx-challenge-4-more-solution/ #5 http://blogs.microsoft.co.il/bnaya/2015/04/10/rx-challenge-5-solution/ #6 http://blogs.microsoft.co.il/bnaya/2015/04/19/rx-challenge-6-solution/ #7 http://blogs.microsoft.co.il/bnaya/2015/07/17/rx-challenge-7-solution/
no comments