bnaya

Stories kicked by bnaya

Rx - Join(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 1 month, 22 days ago

this post is an advance one so you haven't yet master the Rx basic practice you might want to start in here. the post will focus on the Join and GroupJoin operators and we will try to get a solid understanding of what does it really means to join multiple data streams. the Rx notion of join is quit different than the join we has used to know in SQL queries. read more...

add a comment |category: |Views: 109

tags: another

Rx TOC(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 1 month, 22 days ago

Rx TOC this is a TOC (table of content) which summaries my previous post about Rx. Rx - for beginners TOC Rx – Code cartoon Rx - Buffer Rx - Window Rx - Sample Rx - Exception Handling Rx - Aggregate vs. Scan Rx - DistinctUntilChanged Rx and Time related operatorsPosted: by bnayaתגים:DEV, Rx, IObserver, IObservable, IQbservable, Reactive, IScheduler, Reactive Extension, Buffer, Window, Sample, exception, linq, scan, aggregate, TOC, Distinct, Handling read more...

add a comment |category: |Views: 1

tags: another

Real-life story: Blocking Collection(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 3 months ago

this post will discuss a real-life story which uncover none trivial (yet logical) behavior which related to Parallel.ForEach and BlockingCollection<T>. I will explain why it happens and what how can we handle it right. read more...

add a comment |category: |Views: 3

tags: another

Rx and Time related operators(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 3 months, 13 days ago

Rx and Time related operatorsRx and Time related operators this post will focus on Rx's time related operators. Rx has lot to do with the time notion. actually Rx is kind of a time machine where datum does schedule for processing at specific time (I will talk about scheduling in future post). within the System.Reactive and System.Reactive.Linq namespaces we can find the following extension method and services. Window, Buffer and Sample which was spoken here, here and here. all operators has ... read more...

add a comment |category: |Views: 86

tags: another

Rx - DistinctUntilChanged(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 3 months, 24 days ago

Rx - DistinctUntilChanged this post will focus on the simple yet very useful DistinctUntilChanged operator. sometimes a datum stream may produce the same value for a while, you can see it in stock exchange stream the value of specific stock may be steady for a while. the observer can reduce its computation level by ignoring a repeatable value (sequential repeatable value, for none sequential you can use the Distinct operator). the DistinctUntilChanged is having the follow... read more...

1 comment |category: |Views: 89

tags: another

Tpl Dataflow walkthrough - Part 5(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 3 months, 29 days ago

Tpl Dataflow walkthrough - Part 5Tpl Dataflow walkthrough - Part 5 this post is a complete walkthrough of a web crawler sample that was build purely by using Tpl Dataflow. it was built on .NET 4.5 / C# 5 (on a virtual machine using VS 11). I will analyze each part of this sample, both by discussing the Dataflow blocks and the patterns in used. the sample code is available in here (it is a VS 11 project). during the walkthrough you will see the following Tpl Dataflow blocks:TransformBlock Transfor... read more...

add a comment |category: |Views: 16

tags: another

Rx - Aggregate vs. Scan(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 3 days ago

Rx - Aggregate vs. ScanRx - Aggregate vs. Scan this post will focus on 2 Rx operators Aggregate and Scan. both Aggregate and Scan are dealing with event streamaccumulation, the only difference is that Aggregate produce single result (upon the stream completion) and Scan present an ongoing runtime accumulation which react for eachOnNext. both operators has 2 overloads with the same signature:Code SnippetIObservable read more...

add a comment |category: |Views: 7

tags: another

Rx - Exception Handling(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 4 days ago

Rx - Exception HandlingRx - Exception Handling this post will discuss exception handling within the Rx arena. handling event stream exception is not trivial, for example observable should delegate exception to its subscribers though the OnError operation and cancel the subscription. on the other hand the subscriber may want to response OnError state by renewing its subscription or fallback to alternative stream. it is true that the Rx design guidelines suggest that faulted stream should n... read more...

add a comment |category: |Views: 61

tags: another

async / await, some reasoning (blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 8 days ago

async / await some reasoningasync / await some reasoning this post will try to make some reasoning about the .NET 4.5 / C#5 await keyword. I will begin a quiz. how long will it take to the following method to produce the 42 value?Code SnippetasyncTask read more...

1 comment |category: |Views: 38

tags: another

Using async / await(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 12 days ago

Using async / awaitUsing async / await this post will discuss parallel disposal. whenever we want to dispose a parallel execution upon completion we can't use the convenient using keyword. for example, the following code may be dispose the command before completion:Very bad Code Snippetusing (var conn = newSqlConnection(CONN_STR))using (var cmd = newSqlCommand("Select * from Employee", conn)) { conn.Open(); cmd.BeginExecuteReader(ar => {int affected = cmd.EndExecuteNonQuery(ar); ... read more...

1 comment |category: |Views: 128

tags: another

Add Chuck Norris to Your TFS 2010 Builds!(blogs.microsoft.co.il)

submitted by yuvmazyuvmaz(44) 4 months, 14 days ago

In this post I describe how to build a custom TFS 2010 build activity that displays a random Chuck Norris fact during an automated build. We use several more advanced concepts like build extensions and the ActivityTracking attribute which are often not described when presenting how to write custom build activities. read more...

1 comment |category: |Views: 42

tags: another

async \ await and Exception Handling(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 15 days ago

async \ await and Exception Handlingasync \ await and Exception Handling this post will discuss how async / await is handling exceptions. as we mention in previous post, about the async / await concept, await is all about continuation. before .NET 4.5 parallel execution exceptions has to be handle in separate of the synchronic handling. for example: handling ThreadPool execution:Code Snippetvoid Foo(){try {Console.WriteLine("Synchronic");ThreadPool.QueueUserWorkItem(state => {try ... read more...

add a comment |category: |Views: 144

tags: another

Rx - Sample(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 21 days ago

Rx - SampleRx - Sample this post will focus on the Rx Sample operator. the Sample operation does sampling the observable stream and forward lessintensive data stream of the sampled datum. it can be prove very useful for scenario like handling accelerometer stream which can produce 60 value per second, in some cases we don't need such intensity and our machine resources may be happier to handle only 10 value per seconds. the same may be apply to video streamanalytics and many other s... read more...

add a comment |category: |Views: 5

tags: another

Rx - Window(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 26 days ago

Rx - WindowRx - Window continuing with the Rx series, this post will discuss the Window operator. in previous post I was discussing the Buffer operator which enable buffering of Rx datum stream into chunks. has good and useful as the Buffer operator is, it doesn't nail up every single scenario. let consider a scenario of tracing the highest and lower value within a time period. for example hourly tracking of a service monitoring which produce values every second. technically we can use the Buffer... read more...

add a comment |category: |Views: 7

tags: another

the concept of async \ await (blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 27 days ago

the concept of async \ awaitthe concept of async \ await in this post I will survey the new .NET 4.5 / C# 5 concept of async / await. I will focus on how to understand what is really happens behind the new async / await syntax.What's it all about? the new async / await syntax is using the C# syntactic compiler to generate async operation from code that is looking very much like a synchronous code. but before we start we should discus the new C# 5 syntax. the syntax include 2 keywords:async - whic... read more...

add a comment |category: |Views: 12

tags: another

TPL - Continuation(blogs.microsoft.co.il)

submitted by bnayabnaya(431) 4 months, 28 days ago

TPL - ContinuationTPL - Continuation this post will discuss TPL Continuation. TPLcontinuation can chain task into a pipeline. when dealing with dependencies between parallel work units, like [encoding -> compression -> encryption], continuation is the API for scheduling work unit upon completion of other work unit. the general idea is quit similar to the old APM pattern (BeginXxx, EndXxx) callback.basic completion the syntax of continuation:Code SnippetTask tsk = Task.Factory.StartNew(() => {/* d... read more...

2 comments |category: |Views: 65

tags: another