I was thinking about how to rewrite an old (2009) WCF middle-tier service, and have been thinking about George Tsiokos's recent TPL vs. RxNet post.
I think a middle-tier service is perfect to illustrate how I see the strengths and weaknesses of these two.  Specifically the scenario:

Complex Middle-Tier:  Startup vs. Message Handling

TPL might be great for startup tasks.  There is one 'global' task, Initialize, that has many sequences and chunks (in TPL these could be child tasks) that can have different degrees of parallelization.  It also requires global 'command and control' and 'top-down' composition and error handling (a type of event correlation).  If any critical part of startup fails then tear-down the service (cancel outstanding parallel tasks) and exit the service quickly.  So global handling and command-control programming style (root of the call hierarchy has all control).

Once everything is initialized you want bottom-up event correlation and error handling.  The function at the top of the callstack has no control (usually a WCF operation or I/O completion callback).  You only want global state to be touched when absolutely necessary, not touched by ignorable infrastructure errors, and not by errors that are ignorable according to business rules.

Startup, large complex top-down composable work:
TPL

Streams, composable business logic (streams that include error/end):
RxNet

With .NET 5 the TPL dataflow libraries might change things again, but for now I much prefer RxNet for composing and routing 'messages' between layers.  We recently used it in a project and when you have to correctly handle error scenarios it shines.  Imagine a WCF callback for a business operation that is completely async, where business logic has to fire if the notification fails (delivery of the data to the client).  The code isn't pretty in either case, but is better and can be handled at the right level of the lego blocks with RxNet.
0

Add a comment

'Better together' VS + Windows is over

VS can't run 64-bit web apps, and can't open IIS projects when not elevated. File links can't run an app elevated, and an EXE can't be marked to always run elevated ... so My_IIS_App.sln is always broken. With VS elevated you have to turn UAC off to drag-drop files from OS folders to VS IDE b/c Win8 explorer.exe cannot run elevated. "This app can't be activated when UAC is disabled." when clicking .PDF on #Win8 w/ UAC off. I switched PDF to open in Chrome. No VS IDE support for new powerfull OS shell script, Powershell 3.0.  Powershell_ISE doesn't understand VS TFS. Is seems very apparent to me that MS refused to accept that desktop Windows is now a 'truck OS', so the OOB dev experience is crap.

In Windows 8 the 'default browser' is more complicated. I like IE10 in Metro mode (Chrome just doesn't seem to fit here). But all other times I like chrome.

At the end of the day while watching Comedy Central (via a Win8 app) or NBC News (via a Win8 app) I find myself browsing in Metro IE with way too many keystrokes to get the same page in Chrome, which has my password manager extension, Google auto-signin, mobile tab sync to iOS Chrome, etc..

So I wrote a bridge.

Lately I post most of my tech thoughts to Google Plus.

I'm running Windows 8 on a laptop and Windows Server on my desktop/workstation.  I'm using Input Director to share Mouse & Keyboard with desktop and laptop.

Why Server?  I use Hyper-V, so same HW can run multiple DEV servers through MSDN license.

OK, background info done.  This post is about Input Director.  I wasted an hour trying to figure out why Input Director wasn't working.  Windows Firewall was blocking it on the Server side.

We're looking at a custom server build for work. I did some research last night and wanted to record some finding regarding RAID.

Windows SW RAID has come a long way since the Windows 2000 days (when I last tried it). Stripped (RAID0) SSDs are easy, but to get performance benefit from Mirrored (RAID1/10/6) requires a 'good' RAID controller. LSI seems to dominate the performance-conscious market with their MegaRaid controllers.

My Google Apps...

I just ran a little experiment and ran an HTA app under debugger (by adding //X as the arguments to MSHTA.exe). In the app version string it reports Trident 6.0 (a.k.a. IE 10) as the rendering engine. This is interesting, because I think they could have chosen to run HTA apps in compatibility mode with IE 8 (which shipped with the last OS) but they continued to move MSHTA to use the latest IE engine, like they alway have. This means local HTA apps have CSS3 and other HTML5 enhancements.

I'm not sure how to approach the following technology migrations my team needs to tackle, especially planning, story weights, and customer benefit language.

SQL 2008 R2 -> SQL 2012 Geometry/Geography improvements VS 2010 -> VS 2012 IDE Performance, integrated SL tools, improved HTML/js tools production .NET 4.0 -> .NET 4.5 Hoping to see better startup performance, and use new APIs. The following are also changes I think are needed but which I haven't sold the team on yet.

I have VS 2012 running on my main 2 solutions and things are running smoothly. I recently hit a significant problem.
1

Visual Studio 2012 doesn't have allow the 'compare' command when merging changes from one branch to another.

Here is the uservoice request to add the feature to VS 2012.  If you know me please vote for it.  :)

http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2947191-always-allow-compare-in-pending-changes-for-br

It does allow it when VS is configured to use an external compare tool.  My favorite is SourceGear DiffMerge (free).
1
Blog Archive
Contributors
Contributors
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.