The World’s Leading Microsoft .NET Magazine
   
 
The .NET Addict's Blog

My Top Tags

                                                           

My RSS Feeds








Latest Diggs - Programming

Internet Blogs - Blog Top Sites

Site Hits

Total: 2,551,710
since: 19 Jan 2005

Continuous LINQ v1.0.0.0 Released

posted Tue 08 Jan 08

The February edition of Dr. Dobb's Journal is running an article on Continuous LINQ and I thought it would be appropriate to get the source code for CLINQ published so that people reading the magazine might be able to download the code :)

As a result, I've created a new CodePlex project right here: http://www.codeplex.com/clinq. The source code is available here as well as a downloadable ZIP file containing it all. I will be uploading some demo applications to the site within the next few days.

As you may or may not already know, CLINQ is a library that allows you to use the LINQ syntax to write queries against continually changing result sets. These result sets can be changing for any number of reasons, including (but not limited to), network messages being received, events being fired, or even triggers being hit from databases.

For example, you could write queries that looks like this:

var msftTicks = from tick in MarketData.Ticks
            where tick.Price < 100 && tick.Price > 80 && tick.Symbol == "MSFT"
            select tick;
var appleTicks = from tick in MarketData.Ticks
                         where tick.Symbol == "AAPL"
                         select tick;

Using conventional LINQ, you would have to create some kind of timer to re-run this query and then re-bind the data to your GUI so that your system stays in sync with the flood of traffic coming in from your market data feed. Using CLINQ, however, you could have a single background thread that is maintaining the MarketData.Ticks collection from the incoming network messages, and all of your GUI can be bound to CLINQ queries which are updating themselves constantly as data in the underlying collection changes.

I've got a couple demos cooking that use WCF to transmit network messages and I've got a console app monitoring one query and 2 WPF apps that are monitoring 2 different queries. They don't use timers, they don't use polling loops, and they don't use semaphores - all of the updating is continuous and thread-safe.

tags:      

links: digg this    del.icio.us    technorati    reddit




1. Joe left...
Tue 08 Jan 08 1:47 pm :: http://joew.spaces.live.com

Great, I've been waiting for this. Interesting to see how you did it.


Tag Related Posts

CLINQ v1.1.0.0 Released!

Fri 02 May 08 5:38 P GMT-05
tags:          

Why is O'Reilly Condoning iPhone Hacking?

Mon 11 Feb 08 3:55 P GMT-05

CLINQ v1 Demo - Network Message Filtering

Wed 09 Jan 08 7:47 P GMT-05
tags:        

Continuous LINQ v1.0.0.0 Released

Tue 08 Jan 08 4:53 P GMT-05

November is National Novel Writing Month!

Thu 01 Nov 07 12:42 P GMT-05

On Writing

Thu 13 Sep 07 1:44 P GMT-05

Building a Ledger Style for WPF Grids

Tue 21 Aug 07 3:30 P GMT-05
tags:    

Continuous LINQ - Can I write games with it?

Mon 13 Aug 07 3:09 P GMT-05
tags:        

Continuous LINQ

Mon 06 Aug 07 1:21 P GMT-05
tags: