Showing posts with label Anders Hejlsberg. Show all posts
Showing posts with label Anders Hejlsberg. Show all posts

Sunday, December 14, 2008

LINQ and Entity Framework Posts for 12/8/2008+

Note: This post is updated daily or more frequently, depending on the availability of new articles.

Updated 12/14/2008 10:00 AM PST: Several additions 
• Updated 12/11/2008 2:30 PM PST: Additions
• Updated 12/10/2008 10:00 AM PST: Additions and minor corrections

Entity Framework and Entity Data Model (EF/EDM)

••• Simon Segal describes a promised attempt to “implement the Specification pattern and fetching strategies with a IRepository” for EF, as he did previously for LINQ to SQL, in his More Entity Framework frustration [I want my Specification Pattern] post of 12/14/2008. (See his Entity Framework - Learning Materials recommended post of 12/9/2008 post below.)

Simon says:

Now it’s late and I am starting to get annoyed with the Entity Framework. As it turns out (as far as I can tell), LINQ to SQL is far more pliable in managing dynamic queries. Why? Well EF doesn’t play nice with Expression<T>, specifically Expression<Func<T>> etc. Errors arise when you build and invoke Expressions because the Entity Framework doesn’t support Expression.Invoke() which is required to combine Expressions.

And he concludes, “As I said it’s late and so far I have a big headache but I will persist.”

••• Ritesh Rao has a similar objective (Implementation of the Specification pattern using Expressions) for LINQ to SQL, NHibernate, and EF with his NCommon project on CodePlex, which includes frameworks for implementing the Unit of Work and Repository Patterns. His Update on NCommon post of 12/12/2008 reports on the latest changes to NCommon v0.2.

Click here for more information on Ritesh’s related Rhinestone MVC-based work item/issue tracking project.

••• Julie Lerman’s Programming Entity Framework ends up at 800 pages! post of 12/13/2008 indicates that her book grew 300 pages from the original estimated length.

•• Simon Munro categorizes the LINQ to SQL vs. EF conflict as a battle between what Microsoft’s Pat Helland calls Controllers and Doers in his Controllers, Doers and the Entity Framework post of 12/20/2008. Simon says, inter alia:

Asking Microsoft to ramp up LINQ to SQL is asking them to position a Doer framework against a Controller framework - in the enterprise.  That will simply not fly - Microsoft needs a framework that makes the Controllers buy into it and that framework is the Entity Framework.  From an EA point of view, the EF is compelling - not only are developers able to use it's artifacts but they can be re-used across a wide variety of technologies and services; EF is positioned to run RESTful through ADO.NET Data Services, be viewed by SQL Reporting Services and I am sure Biztalk, MOSS and any other MS technology along the way.

•• Beth Massi’s Master-Details with Entity Framework Explicit Load post of 12/10/2008 contrasts EF’s optional eager loading of associated entities with LINQ to SQL’s default lazy loading approach.

Matthieu Mezil describes on 12/11/2008 two new extension methods, ObjectContext.Add, ObjectContext.Delete, that substitute for the AddToCategorySet() method and a DeleteOject() methods.

Tony Sneed reports on 12/11/2008 that a Bug in EF v.1 Limits N-Tier Scenarios interferes with Danny Simmons’ AttachAsModified() extension method with entities having associations. The issue is related to EF v1 ’s disdain for foreign key values, which I’ve complained about since EF’s early days. From my Drag-and-Drop Master/Details Windows Forms Still Missing from Entity Framework SP1 Beta of 8/3/2008:

I requested that EF provide optional visibility of foreign key values as item #9 in my Defining the Direction of LINQ to Entities/EDM post of May 29, 2007 to which EF architect Michael Pizzo replied in a comment:

9. Provide read-only access to foreign key values.

This is actually a feature I’m fighting to get into our final milestone for V1. Can you describe the scenarios where this is used? Do you need the ability to query on the foreign key value, or simply expose it on the domain object?

I described the scenario to Mike as emulating LINQ to SQL’s autogenerated databound grids, which let you change EntityRef foreign key values that aren’t a component of the object’s EntityKey, such as Order.Employee and Order.ShipVia.

Tony’s Better N-Tier Concurrency Management for the Entity Framework post of 11/8/2008, which I missed, describes a CreateEntityFromObject extension method, “which accepts a DTO and uses reflection to copy properties from the DTO to the Entity and create an EntityKey.”

•• David Sceppa’s IBM's ADO.NET Provider Supports the Entity Framework! post of 12/2/2008 apparently got lost in the EF shuffle because it just appeared in my reader today. The announcement on the IBM site was dated 11/28/2008.

•• Ward Bell, V.P. of Product Management for IdeaBlade, which publishes the DevForce EF application development platform that’s based on Entity Framework, has written an Is Entity Framework For Real? white paper, which is undated but written after Tim Mallalieu’s Clarifying the message on L2S Futures post of 10/31/2008. Ward’s answer is “yes,” but obviously IdeaBlade has its own agenda.

• Stu Smith’s posts in the “LINQ to SQL” section describe his preference for LINQ to SQL over EF. Jeffrey Schwartz quotes Stephen Forte, Stu Smith, and me in his Data Access Shakout: What's A DB Developer To Do? post to Redmond Developer News’ DataDriver blog of 12/10/2008.

Rick Anderson’s Explicit connection string for EF post of 12/9/2008 shows you how to customize EF when you have “multiple data models or need to pass in the the construction string at run time.

Julie Lerman posted Downloads for DevTeach Entity Framework Deep Dive session and Full Day Workshop on 12/9/2008 to the DevTeach Web site.

Simon Segal’s Entity Framework - Learning Materials recommended post of 12/9/2008 lists his initial observations about EF after deciding to move from LINQ to SQL to EF for future projects and promises to:

[H]ave a go at getting the specification pattern working with the Entity Framework as I did with LINQ to SQL previously and think about how to deal nicely with Fetching Strategies in EF.

Zeeshan Hirani offers his 500-page PDF file of content about Entity Framework and a project using Northwind as the data source as Contributions to Entity framework community in his 12/8/2008 post. Zeeshan says:

My intent was to use this document as learning guide for me and my co-workers but I felt that content is useful enough to benefit rest of the community.

LINQ to SQL

••• Scott Williams adopts the Repository pattern in his LINQ To SQL and Tight Coupling Part 4 post of 12/12/2008 after watching Rob Conery’s screencasts for his MVC Storefront project. Scott points out:

Should you decide to go with another technology, be it the Entity Framework, NHibernate, or even a non SQL Server database, you would only need to create an IRepository implementation for that particular framework/database. It can be tedious for large quantities of tables, but that is the price you might have to pay for loose coupling and a friendlier design. Of course, you could refactor that to automatically set properties through Reflection or something, but that is another article altogether.

Earlier posts in Scott’s series are:

••• Michael Desmond, founding editor of Redmond Developer News and editor at large of Redmond magazine, quotes Anders Hjelsberg in a Digital Darwinism article of 12/11/2008:

The bigger a company gets, the more there is to keep track of and the more overlap that you see because we are doing more things. Now the LINQ to SQL project was an interesting project because it was built by the C# team, but it is clearly in the data domain. We built it because we needed something real to validate LINQ, and we strongly felt that LINQ would be nothing without a strong O-R mapper to support it. …

LINQ to SQL is not dead. I can assure you, it is not dead. Nothing ever goes away. We have never done that and we never will. [Emphasis added.]

••• Andy Conrad’s IUpdateable for Linq to Sql - Fixing a few issues post of 12/11/2008 provides a fix for the IUpdateable.ResetResource() method for his IUpdatable for LINQ to SQL implementation. Andy also mentions that “there is some considerable work to do” on his ADO.NET Data Services port for SubSonic. (See the SubSonic posts in the “LINQ to Objects, …” section.”)

•• Jeffrey Schwartz quotes Stephen Forte, Stu Smith, and me in his Data Access Shakout: What's A DB Developer To Do? post to Redmond Developer News’ DataDriver blog of 12/10/2008. Jeff’s story continues the LINQ to SQL vs. EF v1 and v2 saga.

• Stu Smith rings in on the LINQ to SQL vs. EF issue with his LINQ-to-Entities: The Blackberry Storm of ORMs? post of 12/3/2008, analyzes problems and omissions in LINQ to Entities and concludes:

In my opinion, we seem to have given up on a perfectly good, working ORM solution (LINQ-to-SQL), and replaced it with a buggy, half-baked one (LINQ-to-Entities). I sure hope v2 improves matters, because for now, switching to the entity framework is a downgrade.

and continues with a list of five more objections to EF in LINQ-to-Entities: Follow-Up of 12/4/2008. He also points to Simon Munro’s Move over LINQ to SQL - you have served your purpose post of 11/2/2008. (Thanks to Kristofer Andersson for the heads-up on these posts I missed.)

Stephen Forte’s Is Linq to SQL Dead? Yes, but.… essay of 12/7/2008 proposes the list of actions Microsoft must take to make EF the “preferred data access solution in .NET 4.0. Presumably he’ll make his requirements official at the next ADO.NET Advisory Council meeting, whenever that might be.

So far, Stephen hasn’t responded to my request to provide a link to Stephen was kind enough to send me a PDF copy of:

Data Direct Technologies’s recent .NET Data Access Trends Survey (November 24th, 2008) [that shows] 8.5% of production .NET applications use L[INQ] to SQL as their primary data access method.

Be sure to read the comments. (If he or I find a link to the survey, I’ll post it.)

Mark Blomsma contests Stephen’s conclusion that LINQ to SQL is dead because it’s one of the topics of Mark’s recently completed MCTS Self-Paced Training Kit (Exam 70-561): Microsoft® .NET Framework 3.5 ADO.NET Application Development. Mark says in a comment of 9/2/2008 to the preceding post:

I've just finished up writing the LINQ to SQL chapter for the "MCTS Self-Paced Training Kit (Exam 70-561): Microsoft® .NET Framework 3.5—ADO.NET Application Development".

If you want to certify yourself as a .NET 3.5 certified developer and you pick this exam, then you'll have to learn LINQ to SQL to pass the exam.

Like you say Steve, the technology will be around for a while

Damien Guard’s LINQ to SQL templates updated post of 9/7/2008 includes a link to a 27-second, quick-shuffle mini-screencast showing how to use the templates.

LINQ to Objects, LINQ to XML, et al.

Bob Beauchemin asks Is LINQ the next OLE DB? "LINQ-ed" Server as a rowset source? and then answers with this conclusion:

The impression I get (I could be wrong) is that LINQ might become the next OLE DB. OLE DB was supposed to go beyond relational data sources to provide extensions to the column-row paradigm and provide "data access" over non-relational systems. … Anything that has any API that can implement IQueryable/IUpdateable. Yes, LINQ to SQL (or LINQ to Entities) doesn't always generate exactly the most optimal SQL that generates the best query plans. NO argument. But T-SQL/PL-SQL/etc doesn't always generate the most optimal query plans for the storage engine 100% of the time either.

The list of third-party LINQ to Whatever implementations makes me agree wholeheartedly with Bob’s conclusion.

Rob Conery reports that SubSonic 3: Alpha Is Ready as of 12/10/2008. He notes that SubSonic 3 Alpha shares the following features with LIINQ to SQL:

    • ForiegnKey properties on the Class template, so you can now access Product.Suppliers a la Linq To Sql.
    • Validation methods for each property on the Class template, so when you set a property you can override a "OnEmailChanged" and "OnEmailChanging(string value)" - just like in Linq To Sql.
    • Inflector to the Utility class, allowing you access to methods such as Pluralize(), PluralToSingular(), ToProperCase, ToPascalCase, etc. This is a class for naming only and is part of the templates. (LINQ to SQL offers PluralToSingular() only.)

Rob credits Matt Warren for the LINQ to SQL-like features:

These aren't the only changes - Matt Warren released part 12 of his Linq tutorial which addressed 99% of the issues people were finding, including the use of variables in the Linq call. Hi IQToolkit is awesome, and is the backbone of SubSonic 3.0.

Rob posted SubSonic 3 Alpha Updated later the same day.

Rob Conery asks for assistance in his SubSonic Linq Support - Help Me post of 12/8/2008. Here’s what he says is in the work for SubSonic 3.0:

I have a few ideas, but before I get to that here's what I think we'll need to handle:

  • Linq Support. SubSonic will be a "vector" for people learning linq. I want to be able to help them
  • Pattern Support. There are some new approaches in SubSonic 3 (Repository, Unit of Work, etc)
  • T4 template support and sharing. This is CORE to what I want to do, and I think these t4 files should be easy to find, ratable, etc.
  • Standard support stuff (installation, extension, etc)
  • Source integration - I want people to be able to browse the code
  • Bug Tracker - this really should be part of the site as one unit
  • Wiki?

Rinat Abdullin discusses the DbLinq provider’s dynamic expression parser in his Dynamic Linq and Expression Parsing in .NET as a hint of C# compiler extensibility post of 12/8/2008.

ADO.NET Data Services (Astoria)

••• Raju Phani’s Customizing Serialization of Entities in the ADO.NET Data Services Client Library post of 12/11/2008 explains how to prevent properties that aren’t present on the server from being serialized into the ATOM payload and throwing exceptions.

The ADO.NET Data Services Team announce on 12/10/2008 that Their Forum Has Moved! Visit the New Forums Platform Today! The forum was locked down for the move when this post was updated. Update 12/12/2008: The new ADO.NET Data Services forum is operational (without “Pre-Release” in the title.)

ASP.NET Dynamic Data (DD)

••• Steve Naughton offers 13 Great Links for Dynamic Data from David Ebbo (7), Scott Hunter (1), and Rick Anderson (5) in this 12/12/2008 post.

••• David Ebbo’s Using Dynamic Data with multiple databases post of 12/11/2008 uses LINQ to SQL and EF data sources from Northwind to demonstrate multiple database use and simulate naming conflicts. Sample code is available for download.

SQL Data Services (SDS) and Cloud Computing

••• Roger Jennings reports in Test Harnesses Compare Amazon EC2 with SQL Server and SimpleDB Performance of 12/13/2008 on his first round of comparing the performance of Amazon EC2 with SQL Server Express, Amazon EC2 with SimpleDB, and Azure Table Services with Northwind’s Customers table/entities as a data source. As expected EC2 with SQL Server Express outperformed the alternatives. (Updated 12/14/2008.)

••• Larry Dignan’s Handicapping cloud computing: The big picture post of 11/12/2008 quotes from a Bernstein Report named “The Long View: Netbooks, Wireless and Cloud Computing — Client Software’s Imperfect Storm” by analyst Jeffrey Lindsay:

Although Amazon was arguably a pioneer of cloud web services and some analysts got swept up in the “Books to Bits” hype we think the revenues generated by Amazon’s web services are effectively negligible. …

We expect the software and applications environment to remain heterogeneous for the foreseeable future – more in line with Microsoft’s vision than Google’s. We disagree with the “computers as a utility” and “device as dumb terminal” models where all applications run in the cloud.

Dignan copies an interesting diagram of “online utilities and applications” for cloud computing or software as a service, which includes the usual suspects, Amazon, Google, Microsoft, and SalesForce, along with a few other firms not usually associated with cloud computing.

Dignan adds his own out-of-context observation:

What’s notable is how much Sun has been a player in cloud infrastructure yet has failed to capitalize.

It’s ironic that Sun announced on 12/9/2008 that it was “phasing out” its Network.com service and “will be implementing in new services from its Cloud Computing division,” according to Charles Babcock’s Sun Discloses Plans To Enter Cloud Computing post of 12/10/2008 for InformationWeek. Babcock notes that “neither spokesman [at the December 9 press conference] committed Sun to supply specific [cloud] services within a specific timeframe.”

••• Pat Helland’s Building on Quicksand" Paper for CIDR (Conference on Innovative Database Research) post of 12/12/2008 contains an abstract and link to the paper he coauthored with David Campbell for the CIDR conference, which will be held at the Asilomar Conference Grounds*. The paper deals with building reliable systems with unreliable components and a “relaxed model for fault tolerance,” which implies:

1) Everything promised by the primary is probabilistic. There is always a chance that an untimely failure shortly after the promise results in a backup proceeding without knowledge of the commitment. Hence, nothing is guaranteed!

2) Applications must ensure eventual consistency. Since work may be stuck in the primary after a failure and reappear later, the processing order for work cannot be guaranteed.

Note that it’s the application that must ensure eventual consistency. Pat uses Amazon’s Dynamo Storage system (“a replicated blob store implemented with a Distributed Hash Table”) and Shopping Cart application as an example. Pat says:

Dynamo is interesting in many ways including its conscious choice to support availability over consistency. Dynamo always accepts a PUT to the store even if this may result in an inconsistent GET later on.

* The Asilomar Conference Grounds, located on the shoreline of Monterey Bay, is part of the Asilomar State Beach and Conference Grounds State Park. The original lodgings were designed by noted Northern California architect Julia Morgan, and the Grounds are listed in the National Register of Historic Places.

••• Mike Amundsen asks POST to Azure tables w/o PartitionKey/RowKey: that's a bug, right? in this 12/13/2008 thread in the Windows Azure forum. Sure looks like a bug to me.

••• Kevin Hoffman’s Azure Storage Authentication Failing when it shouldn't thread of 12.12.2008 in the Windows Azure forum complains about the amount of configuration tweaking required between local and cloud deployment. I haven’t run into that problem with Azure’s table storage authentication. I have both local and cloud config data in my ServiceConfiguration.cscfg file and comment out one or the other.

••• Mike Amundsen describes the “cleaned up” version of his Azure.exe command-line app for manipulating Azure tables in his Azure.exe command-line app posted post of 12/12/2008. He’s also posted a ZIP set that includes all the source for Azure.exe and the Amundsen.Utilities assembly.

Mike’s Azure.exe sample app posted and Azure Examples @ github threads of the same date in the Windows Azure forum provide additional details, including syntax examples.

••• Rocky Lhotka’s Some thoughts on Windows Azure post of 12/11/2008 underscores the need for Microsoft to 1) define it’s pricing model for the Azure Services Platform and solve the lock-in problem, which Rocky (and I) believe “will be the biggest single roadblock to adoption for most organizations (assuming reasonable pricing - which I think is a given).” However, the main point of Rocky’s post is:

[T]he biggest benefit to Azure is one important concept: an abstract runtime. [Emphasis added] …

I think Azure (whether it succeeds or fails) illustrates a different solution to the [inelegant and inefficient “host a virtual machine”] problem. Azure defines a limited architecture for applications. It isn't a new architecture, and it isn't the simplest architecture. But it is an architecture that is known to scale. And Azure basically says "if you want to play, you play my way". None of this random use of platform features. There are few platform features, and they all fit within this narrow architecture that is known to work.

Rocky then goes on to make an articulate and reasoned argument that abstract runtimes are “the real future of the cloud.” I agree.

Update: Rocky added Windows Azure and the value of restricted platforms/architectures on 12/12/2008 in reply to comments to his earlier post on the abstract runtime topic.

••• David Burela explains in his Silverlight hosted on Windows Azure post of 12/10/2008 how to start a Azure-hosted Silverlight project and in his WCF services hosted on Windows Azure post of 12/9/2008 how to get WCF services running under Windows Azure (despite the bugs). His earlier Guest post: Windows Azure - review from a developer article for Long Zheng’s I Started Something blog is a brief introduction to Azure.

•• David Aiken describes his Windows Azure Online Log Reader that’s available for download as of 12/11/2008. The reader eliminates the need to manually download logs and displays the data from copied logs in a GridView control.

•• John Foley’s Microsoft's Billion-Dollar Cloud Business post of 12/10/2008 for InformationWeek’s Plug Into the Cloud Blog quotes Stephen Elop, president of Microsoft's $18.9 billion Business Division, prediction at a New York analysts meeting about the future of Microsoft's software-as-a-service business:

Microsoft foresees half of Exchange, SharePoint, and Dynamics CRM revenue coming from online versions of those products within five years.

Foley continues:

Microsoft has been criticized, and rightly so, for being late to the game in cloud computing. After dragging its heels, Microsoft introduced its Windows Azure cloud operating system and the related Azure Services Platform in October. But Microsoft is noncommittal on delivery dates for its Azure technologies and services, an indication that, although its strategy has firmed up, much of the development work lies ahead. Elop had nothing new to share in terms of an Azure timeline that would help customers with their own planning.

It appears to me from the above diagram that the Azure team considers at least SharePoint and Dynamics CRM services as part of their platform, as well as SQL Services. Almost every Azure and SQL Data Services PDC 2008 session included the preceding diagram in the slide deck.

•• Andy Patrizio casts doubt on the preceding optimistic view of cloud service revenue in his Google, Microsoft Back Off on Datacenter Plans article of 12/10/2008 for internetnews.com. Andy says:

In the case of Microsoft (NASDAQ: MSFT), a source close to the construction of its planned Chicago, Ill. datacenter said work has been scaled back and many modular containers being used at the site are just being parked but not hooked up. Also, the company has yet to begin construction on a West Des Moines, Iowa datacenter despite announcing it with much fanfare last year. …

Microsoft has publicly said it is cutting back datacenter expenses. On the last quarterly conference call to discuss the first fiscal quarter of 2009, CFO Chris Liddell said Microsoft would trim capital investments by $300 million, and he specifically said it would be on the datacenter side.

•• Jim Nakashima’s Multiple Service Configurations for a Windows Azure Cloud Service post of 12/10/2008 describes a workaround that lets you specify separate service configuration files for local and cloud deployment of ASP.NET applications. The workaround doesn’t lift the limit of one staged and one production project deployment.

•• Robert Zhu offers a “brief tour” of the The CardSpace "Geneva" Control Panel Applet in this 12/10/2008 post.

• Eugenio Pace continues setting the scene for his VeryBigCorp/SuperCloudySoftware Architecting Cloud Applications for the Enterprise saga with his Part III - SuperCloudySoftware meets VeryBigCorp CIO post of 12/10/2008.

• Mike Amundsen announces in his Azure Exampes @ github thread in the Windows Azure forum that his “plain old WebRequest/WebResponse” samples have “full support for Tables (GET, POST, DELETE) and Entities (GET, POST, PUT, MERGE, DELETE). … [S]upport for ad-hoc queries … should happen by tomorrow.” The samples don’t require Vista, Windows Server 2008, the Azure SDK or .NET 3.5+; they will run under .NET 2.0 and Windows XP.

• Om Malik’s Amazon Launches EC2 in Europe post of 12/10/2008 notes the addition of an EU site for EC2’s basic hosting service instances, but Windows 2003/SQL Server 2005 hosting isn’t available yet. Werner Vogels’ earlier Expanding the Cloud: Amazon EC2 in Europe article provides added details and links to additional resources.

Roger Jennings updated Windows Azure Test Harness Is Live! on 12/9/2008 to announce that entity deletion, recreation, and updating is now enabled for the publicly deployed version. Give the harness a test drive at http://oakleaf.cloudapp.net/. (The layout problem with Firefox 3 was fixed on 12/10/2008.)

Daryl Plummer, a Gartner analyst whose purview includes Cloud Computing, describes Instant Experts Floating in the Cloud in his post of 12/9/2008. Daryl suggests:

  • Use Instant Experts like scalpels. You need them to do sanity checks on all those new things you keep hearing about and to pull out synergies with your current plans.
  • Make sure your “Instant Experts” don’t just Google all of their information. Go to the source or to trusted industry advisors (shameless Gartner plug).
  • Have your instant experts challenge one another. If they can’t explain it to each other, you won’t be able to explain it to the business.

It’s a good read.

Roger Jennings asked Is the Order of Attributes Returned by GETs on Entities Consistent? on 12/8/2008 in the Windows Azure forum. As far as I can determine, Microsoft orders their attributes alphabetically by attribute name. But, like Amazon, their response is that they make no guarantee of a consistent order.

Eugenio Pace’s Architecting Cloud Applications for the Enterprise - Part II - VeryBigCorp buys IssueTracker post of 12/7/2008 tells the story of VeryBigCorp signing up for SuperCloudySoftware’s IssueTracker™ service. (Still no sample app or source code.) Eugenio’s first episode was Architecting Cloud Applications for the Enterprise - Part I - Introducing the Actors of 9/5/2008.

Shan McArthur’s Cloud Services Introduction post of 11/4/2008 and Design Strategies to Prepare for Azure and SQL Data Services of 11/5/2008 are very useful overviews of Azure and SQL Data Services by an active participant in the Windows Azure and SQL Data Services (SDS) - Getting Started forums. (I missed these when Shan posted them.)

SQL Server Compact (SSCE) 3.5 and Sync Services

No significant new posts as of 12/9/2008 5:00 PM PST.

Miscellaneous (WPF, WCF, MVC, Silverlight, etc.)

Nicholas Allen reminds developers on 12/9/2008 that the WCF team has posted several new WCF Virtual Labs episodes, with REST, AJAX, and Web 2.0 in Windows Communication Framework being the latest. Earlier labs are:

Aaron Skonnard’s Screencast: Configuring WAS for TCP endpoints of 12/8/2008 continues his series of WCF tutorials. Earlier episodes are:

Brad Chen’s Native Client: A Technology for Running Native Code on the Web announced on 12/8/2008 the anticipated new browser OS: A sandboxed i86 instance for Firefox, Safari and Chrome browsers running under Windows, Linux or MacOS. Matthew Ingram weighs in on 12/9/2009 with Google: Fulfilling Netscape’s Original Vision, an analysis piece that concludes:

Is the world ready for a Google-ized version of ActiveX? Perhaps not. But if the company does manage to get enough support for Native Client, the web OS could become a reality — and the knife that Google is already holding to Microsoft’s neck with its web apps could cut a little deeper.

Thursday, October 04, 2007

LINQ and Entity Framework Posts for 10/2/2007+

Dino Esposito Discusses Ordered Sequences in LINQ and Relational Sets

Dino Esposito, one of the most respected authorities for AJAX in ASP.NET 3.5, writes in his LINQ Syntax and Linq-to-SQL post of October 4, 2007:

[I]t is key to note that LINQ operators are defined against an ordered sequence of elements. The T-SQL language (as well as any other SQL-based language) works instead with unordered sets of values.

It's my understanding from The .NET Standard Query Operators that:

The Standard Query Operators operate on sequences. Any object that implements the interface IEnumerable<T> for some type T is considered a sequence of that type.

which doesn't imply ordering. The preceding white paper goes on to say:

Operators in the OrderBy/ThenBy family of operators order a sequence according to one or more keys

to produce one of eight variations on the OrderedSequence<TSource> type.

The LINQ: .NET Language-Integrated Query white paper goes on to say:

To allow multiple sort criteria, both OrderBy and OrderByDescending return OrderedSequence<T> rather than the generic IEnumerable<T>. Two operators are defined only on OrderedSequence<T>, namely ThenBy and ThenByDescending which apply an additional (subordinate) sort criterion. ThenBy/ThenByDescending themselves return OrderedSequence<T>, allowing any number of ThenBy/ThenByDescending operators to be applied.

I'd say although LINQ (and thus LINQ to SQL) process collections sequentially, it seems to me that there's no guarantee of sequential order without applying OrderBy/ThenBy operators to generate an OrderedSequence<TSource> collection.

Added: 10/4/2007

Frans Bouma Takes on .NET Source Code, Deferred Execution and Consuming Expression Trees

Swimming against the congratulatory tide surrounding future access to Microsoft's .NET Framework source code, Frans warns: Don't look at the sourcecode of .NET licensed under the 'Reference license' in his October 4, 2007 post. He's building a commercial software product so he must be very reticent about examining others' source code. He also mentions that "Using [Lutz Roeder's Reflector] is technically breaking the EULA." However, I think the issue relates more to copyright statutes than patent law. Software patents (ugh!) apply whether you look at the source code or not.

Update: 10/7/2007: Mono's Miguel de Icaza appears to agree with Frans' position that developers of potentially competiting products should avoid reviewing the source code. He says this about Mono contributors in his Microsoft Opens up the .NET Class Libraries Source Code of October 3, 2007:

But like Rotor, the license under which this code is released is not open-source. People that are interested in continuing to contribute to Mono, or that are considering contributing to Mono's open source implementation of those class libraries should not look at this upcoming source code release.

In Deferred execution in Linq pitfall(s) of October 3, 2007, Frans finds strangeness in local literals of private methods being accessible when deferred execution occurs in the caller. I find that strange, too.

The "Creating LINQ Provider for LLBLGen Pro" continues with October 3, 2007's Developing Linq to LLBLGen Pro, Day 5, which delves into the trials and tribulations of consuming expression trees and non-deterministic expression trees and the need for special-casing as a workaround. He justifiably laments the impossibility to prove code with special-casing is "correct."

Tip: Be sure to read the comments in all three posts.

Kirupa Chinnathambi Compares LINQ and E4X

Kirupa's October 3, 2007 Anders Hejlsberg’s "A Lap Around LINQ" + What is LINQ? post provides a brief introduction to LINQ and a comparison of LINQ with the ECMAScript for XML (E4X) language in Action Script 3. He says:

The main difference between E4X and LINQ is that E4X is limited primarily to XML, and the syntax is, in my view, less readable than LINQ's SQL-like syntax. E4X is great for accessing or creating data and filtering the data you access by attributes or any combination of query-like conditions you set. What sets LINQ apart though, is that it not only allows you to access your data, but it also allows you to manipulate your data in more ways.

Of course, while E4X only deals with XML and LINQ deals with a wider variety of data sources, that isn't a fair comparison to make since E4X, short for ECMAScript for XML, is designed (as its name implies) only for XML.

Added: 10/4/2007

Chris Buckett Continues His Quest for a Mock Entity Framework Provider

His Update on developing a “mock” entity framework provider post of October 3, 2007 outlines the issue he faces in emulating in memory the database side of unit tests for Entity Framework code. He concludes:

Once I have a working sample project, I’ll probably chuck it up on codeplex (if David Sceppa’s happy for me to, as it will use a large part of the sample entity framework code - I’ll have to check).

I'm sure David Sceppa won't object.

Mike Taulty on Deleting Entities and Cascading Deletions

Mike analyzes in his LINQ to Entities - Deleting post of October 3, 2007 some mysteries of the Entity Framework's entity deletion techniques:

  • You must use a LINQ query to return the objects you want to delete. (As with Entity SQL, there's no DML syntax, such as an ObjectContext.DeleteEntities() method.)
  • You must load dependent (order and line item) entities you want to delete when deleting a parent (customer) entity. If you don't want to load the entities to delete, you must enable cascading deletions in the database. 
  • If you enable cascading deletions in the database, you must also add <OnDelete Action="Cascade"> to the <End Role="Customer"></End> node of the Conceptual Model's <Association> element.

LINQ to SQL also exhibits strangeness with cascading deletions, as I noted in my Cascade Deletion Problem with LINQ to SQL Beta 2 of September 5, 2007.

Julie Lerman Proposes a Remote Facade Pattern for Serializing Entities

Julie's October 2, 2007 XML Serializing Entity Framework entities with their children for SOA post describes a technique that's similar to Martin Fowler's Remote Facade pattern, which "[p]rovides a coarse-grained facade on fine-grained objects to improve efficiency over a network." As Fowler observes:

[A]ny object that's intended to be used as a remote objects needs a coarse-grained interface that minimizes the number of calls needed to get some-thing done. Not only does this affect your method calls, it also affects your objects. Rather than ask for an order and its order lines individually, you need to access and update the order and order lines in a single call. This affects your entire object structure. You give up the clear intention and fine-grained control you get with small objects and small methods. Programming becomes more difficult and your productivity slows.

Julie creates a coarse-grained Remote Facade structure based on nested List<T> generic collections. She concludes:

The OrderwithDetails class that implements the facade will need these features:

  1. A property to contain List(Of Order)
  2. A property to contain List(Of OrderDetails)
    1. If we are going deeper then this property should be List(Of OrderDetailswithChildren)
  3. Instantiation code needs to take in the original object and construct the lists
  4. A method that knows how to deserialize the object and return the real object, not the lists of it's parts
  5. If this is going to be used in a [WCF] service, the class needs to be marked as a DataContract and the properties should be marked as DataMembers.

Forcing developers to jump through these kinds of hoops to use the Entity Framework (EF) in a service-oriented environment indicates to me a strange lack of foresight by the EF architects.

This is undoubtedly the reason (or at least one of the reasons) that we haven't seen the definition of "support for n-tier architectures and ... non-trivial, loosely-coupled sample projects with WCF" that I requested from Mike Pizzo in item #10 of my Defining the Direction of LINQ to Entities/EDM post of May 29, 2007. (See the "Julie Lerman Demonstrates Detached Updates with Entity Framework" topic in LINQ and Entity Framework Posts for 9/28/2007+).

Luke Hoban Gets the Most Complex LINQ Query Award (and PLINQ Compatibility)

Luke Hoban, a program manager on the C# compiler team, is a fan of ray-tracing graphics programing. He wrote a C++ ray-tracer in high school and ported the app to Scheme in college. When he joined the C# team three years ago, he reported the (C++, I assume) app to C#, and recently the updated it to C# 3.0 (see his A Ray Tracer in C#3.0 post of April 3, 2007).

The C# 3.0 version had LINQ islands in it but his current version, which he reproduces in his Taking LINQ to Objects to Extremes: A fully LINQified RayTracer post of October 1, 2007, "captures the complete raytracing algorithm" in a single, 60-line LINQ to Objects query. The source code is available for downloading.

The obvious advantage of moving from "conventional" C# 3.0 constructs to a single LINQ query is Parallel LINQ (PLINQ, which is part of the ParallelFX or PFX program) compatibility for simplified parallel processing on multi-core machines. There's a substantial Microsoft team at work on PLINQ and the October 2007 issue of MSDN Magazine carries a "Running Queries On Multi-Core Processors" story about PLINQ by Joe Duffy and Ed Essey.

Joe plans to release a PFX CTP in 2007. Watch his blog for details.

Daan Leijen and Judd Hall describe the more complex forthcoming Task Parallel Library (TPL) in an "Optimize Managed Code For Multi-Core Machines" article in the same issue. The C# 3.0 ray-tracer version upgraded with TPL will be an sample application in the PFX CTP.

It will be interesting to compare how the performance of the TPL and PLINQ samples compares with their predecessors on dual and quad-core machines.

My PLINQ Gathers Momentum post of December 8, 2006 (last updated 7/30/2007) includes many links to early PLINQ articles.

Tuesday, April 17, 2007

LINQ-Related Sessions at MIX 07

Four of the 122 sessions of Microsoft's MIX 07 conference, which runs from April 30 to May 2 at Las Vegas's Venetian Hotel, have LINQ-related content. Here's are the details from the Sessions page:

Building Silverlight Applications using .NET (Part 1 of 2) Building Silverlight Applications using .NET (Part 2 of 2) Speakers: Jamie Cool - Microsoft, Nick Kramer - Microsoft Audience: Developer

This session demonstrates building a rich interactive application (RIA) using Silverlight and managed code. We'll cover how to use Visual Studio to create applications, how to create UI using XAML markup and code, how to build a custom control, how to retrieve data from a Web service, how to manipulate data with XML and LINQ, and how to use the available programming languages in Silverlight.

Note: Microsoft appears to have redefined RIA from rich Internet application (the common usage) to rich interactive application.

Deep Dive on Data Driven Experiences Speakers: Aaron Dunnington - Microsoft, Tim Scudder - Microsoft Audience: Developer

Update 4/28/2007 from Channel9 Buzzcast #13: In this episode, Aaron Dunnington, Program Manager on the Data Programmability XML Team talks about harnessing the power of the semantic web using Microsoft XML technology stack.

Come learn how technologies like Silverlight, Language INtegrated Query (LINQ), and SQL Server 2005 can help developers build impactful, dynamic applications that reach the broadest possible audience.

Comment: OK folks, what is this session really about? SQL Server, XML, or SQLXML?

Using LINQ to Dramatically Improve Data Driven Development in Web Applications Speaker: Anders Hejlsberg - Microsoft Audience: Developer

Modern applications operate on data in several different forms: Relational tables, XML documents, and in-memory objects. Each of these domains have profound differences in semantics, data types, and capabilities, and much of the complexity in today's applications is the result of these mismatches. Anders Hejlsberg, Microsoft Technical Fellow and Chief Architect for Microsoft Visual C# and LINQ, will explain how LINQ (Language Integrated Query) unifies these programming models and dramatically improves the experience of creating data intensive Web applications. Anders promises to have few slides and lots of live code demos!

Note: Anders appears to have expanded his title of Chief Architect for Microsoft Visual C# to include LINQ. This might explain the dearth of LINQ sample code in Visual Basic.

Update 4/28/2007: This session should shed some light on the forthcoming LINQDataSource for ASP.NET. Beth Massi says, "Be sure not to miss Anders typing the 'Dim' keyword!"

Bonus Session: Pablo Castro promises to put a Web spin on the Entity Framework, which might include a side trip for LINQ to Entities. Will Pablo disclose more details about CloudDB or Blue/Cloud, a.k.a. Pacifica? Don't miss:

Accessing Data Services in the Cloud Speaker: Pablo Castro - Microsoft Audiences: Designer, Developer

Come learn about new Microsoft technologies that enable you to make your data available over the Web through a simple REST interface and using open formats such as plain XML, JSON or even RDF. We also discuss the underlying entity framework that makes it easy to model, publish, and program against your data over the Web.

Office Pool: How many years ago was Pablo's mug shot for DevTeach taken?

Update 4/29/2007: Pablo's presentation should be even more interesting considering that Microsoft announced last night that Orcas has dropped "the underlying entity framework."

Andrew Conrad, one of the members of the original ObjectSpaces team, says he's been working on the following project for the last year:

Rapidly Building Data Driven Web Pages with Dynamic ADO.NET Speakers: Samuel Druker Polita Paulus - Microsoft, Shyam Pather - Microsoft Audience: Developer

Update 4/28/2007 New description: ASP.NET dynamic data controls are part of a powerful, rich new framework that lets you create data driven ASP.NET applications extremely easily. ASP.NET dynamic data controls do this by automatically discovering the schema at runtime, deriving behavior from the database and finally creating an ASP.NET page. Anything that can be inferred from the schema works with almost no user effort. If needed, the page can be further customized either by using static languages such as Microsoft Visual C# or Visual Basic .NET, or dynamic languages such as IronPython, Visual Basic, Jscript, etc. In this talk, we show you how to build rich, database driven Web applications from scratch, such as TaskList along with other demos. [Emphasis added.]

Come learn about how new technologies from Microsoft bring together the concepts of dynamic languages and ADO.NET and allow you to quickly develop data driven web pages using ASP.NET dynamic data controls, scalable to even the most complex databases.

Notice that "dynamic ... Visual Basic" in the preceding description is plain VB, not VB .NET. Polita is the developer of Blinq, so there might be a LINQ hook in the session.

Andrew says:

More information to come in the new few weeks, but all I can say at this point is that the experience has been very dynamic. And if you can’t make it to Mix07, we should have some screen casts and white papers available some time in the next several weeks. [Emphasis Andrew's,]

Update 4/18/2007: Minor edits and major additions. Update 4/24/2007: Read Mary Jo Foley's ‘Volta’: Microsoft’s dev platform in the Cloud? article about the "Live development platform" that Soma Somasegar plans to divulge at MIX 07.

Wednesday, April 04, 2007

LINQ Featured in Redmond Developer News

"Looking to LINQ: Will Microsoft's Language Integrated Query transform programmatic data access?" is the cover story for the April 2007 issue of Redmond Developer News. The story by Jeffrey Schwartz and Michael Desmond leads with a quote from Julie Lerman, who gained her introduction to LINQ at the 2005 Microsoft Professional Developers Conference (PDC) in Los Angeles:

"I was jumping up and down," recalls Lerman, who describes herself as an old FoxPro hand. ... "It's very powerful and it's a really important addition to the languages and to .NET," Lerman says.

If you don't catch the significance of "an old FoxPro hand" in the preceding quotation, you might not be aware that FoxPro, dBASE, Clipper and all other early xBase dialects supported query reserved words such as USE, LIST [ALL], REPLACE [ALL], and FOR as elements of the programming language in commands like the following:

USE employees
REPLACE ALL salary WITH salary * 1.1 FOR supervises > 0
LIST ALL fname, lname, salary TO PRINT

SELECT, FROM, WHERE, ORDER, BY, IN, and JOIN later became reserved words in Visual FoxPro's more expansive xBase dialect.

Similarly, LINQ supports SQL-like From, In, Join, Select, Where, and Order By instructions as C# 3.0 and VB 9.0 reserved words. One of the reasons I'm partial to LINQ is that I started my database programming career with dBASE III+ and later moved to Clipper.

"The View Beyond Redmond" section quotes Curt Cotner, an IBM Fellow and CTO for database servers:

"I don't think there's anything along the same lines in the Java world," he says. "I think this is an area Microsoft has innovated and gone in a direction that is different than a lot of the other programming languages have gone."

That praise comes from someone who would know. Regarded as one of the early innovators of relational database technology, Cotner is the chief architect of IBM's mainframe-based DB2 and the architect of database connectivity for IBM's WebSphere application server line.

The article also includes a LINQ FAQ by—and quotes from an interview with—Anders Hejlsberg.

Update 4/5/2007: Julie Lerman added her own post about the article.

Thursday, December 14, 2006

Anders Hejlsberg's Recent LINQ/C# 3.0 Presentations

Anders Hejlsberg, Microsoft Technical Fellow and chief architect of the C# language, gave two LINQ-related presentations at Tech•Ed Developers 2006 (a.k.a. Tech•Ed Europe 2006) held in Barcelona on November 7 to 10. Microsoft EMEA recently posted videos and slides of the two sessions on their "ShOtime" site. There isn't much new in the presentation contents but—if you're new to LINQ and C# 3.0—you should find the topics interesting. Visual Studio: The .NET Language Integrated Query (LINQ) Framework Overview

Modern applications operate on data in several different forms: Relational tables, XML documents, and in-memory objects. Each of these domains can have profound differences in semantics, data types, and capabilities, and much of the complexity in today's applications is the result of these mis-matches. Anders Hejlsberg, Technical Fellow and chief architect of the C# language will explain how the Orcas release of Visual Studio aims to unify the programming models through LINQ capabilities in C# and Visual Basic, a strongly typed data access framework, and an innovative Application Programming Interface (API) for manipulating and querying XML.
Length: 1:05. Download slides here. Main session topics:
  • The LINQ Project
  • Demo: LINQ to Objects
  • C# 3.0 Language Innovations
  • LINQ to SQL and XML
  • Demo: LINQ to SQL and LINQ to XML
  • LINQ Architecture & Components
C# 3.0: Future Directions in Language Innovation

Join Anders Hejlsberg for an in-depth walkthrough of the new language features in C# 3.0. Understand how features like extension methods, lambda expressions, type inference, and anonymous types make it possible to create powerful Application Programme Interfaces (APIs) for expressing queries and interacting with objects, XML, and databases in a strongly typed, natural way.

Length: 1:06. Download slides here. Main session topics:

  • The Evolution of C#
  • Extension Methods and Lambda Expressions
  • Demo: Lambda Expressions and Extension Methods
  • Initializers and Query Expressions
  • Anonymous Types and Expression Trees
  • Demo: Expression Trees
  • Automatic Properties and LINQ Technical Preview

Technorati Tags: Orcas, LINQ, C# 3.0

Saturday, December 09, 2006

Jon Udell Moves from InfoWorld to Microsoft

Veteran technology writer, analyst and eclectic Web developer Jon Udell will cease writing his "Strategic Developer" column and "Jon's Radio" blog for IDG's InfoWorld magazine on December 15, 2006. After a month's hiatus, he'll start his new job as a Microsoft "evangelist for the Net." Jon will report to Jeff Sandquist who runs Microsoft's Channel9 and On10 sites. Jeff Sandquist is Robert Scobel's former boss. Note: Robert worked for Fawcette Technical Publications when I wrote my first article for Visual Basic Programmer's Journal, now Visual Studio Magazine. Jon described his future activities at Microsoft on December 8, 2006 in A conversation with Jon Udell about his new job with Microsoft:

That means blogging, podcasting, and screencasting on topics that I think are interesting and important; it means doing the kinds of lightweight and agile R&D that I've always done; and it means brokering connections among people, software, information, and ideas—again, as I've always done.
He went on to clarify his role and expectations in a new JonUdell WordPress blog. He'll continue working from his office in Keene, NH and spend about one week per month in Redmond. Jon as an XML Evangelist I worked with XML Web services in the early .NET 2002 days, wrote a book on the topic and ended up one of the winners of a Microsoft .NET Web Services contest. But it was Jon's early promotion of semi-structured XML for data interchange that got me interested in XML as a data-interchange format with Jean Paoli's InfoPath and resulted in my writing Introducing Microsoft Office InfoPath 2003 for Microsoft Press. Over the almost five-year period from 1/3/2002 to 11/15/2006, Jon wrote 148 columns, blog posts, analyses, and reviews that contained the term XML. Note: I ran this InfoWorld power search to return a table with rows for each article, imported the table into Excel and then into Access to improve searching and sorting. Jon's articles and posts on XQuery encouraged me to abandon Transact-SQL for a few days and try Microsoft's original XQuery implementation for .NET 1.0—an interactive preview of and downloadable code for the Microsoft.Xml.XQuery classes, which was at http://131.107.228.20 in mid-2002. The interactive demo—shown in the screen capture below—and its use cases worked well enough that I wrote a "Get Ready for XQuery" article and a downloadable .NET Web form app for Fawcette's XML & Web Services Magazine (free registration required for page 2 and beyond).

(Click screenshot above for full-size image.)

Jon's November 15, 2006 "Strategic Developer" column, XQuery and the power of learning by example, stresses the importance of use cases as XQuery tutorials and laments the lack of use cases in Extensible Business Reporting Language (XBRL). Notice the start of a list of W3C Use Cases in the left frame of the preceding Web page.

Microsoft's removal of XQuery support from .NET 2.0 was a major disappointment for me, but the SQL Server 2005 xml data type's XQuery support compensates—at least in part—for its 11th-hour excision from the .NET Framework. Jon's April 26, 2005 A conversation with Michael Rys about SQL Server 'Yukon' blog post provides a succinct overview of SQL Server 2005's XML and XQuery support and is a great companion piece to my slightly earlier "Exploit Yukon's XML Data Type" article. Jon's other XQuery articles greatly influenced Chapter 12, "Exploring the XML Data Type," of Expert One-on-One Visual Basic 2005 Database Programming.

Note: Now that XQuery 1.0 is a W3C Proposed Recommendation, hopefully Microsoft will implement the missing Let keyword and incorporate the XQuery classes as an Orcas add-on to the .NET Framework. Although LINQ to XML (formerly XLinq) and LINQ to XSD (a.k.a. LINQ to XML Objects) has a more elegant, SQL-like query syntax, XQuery is finally closing in on Recommendation status. Jon on Language Integrated Query (LINQ) Jon was one of the early proponents of Microsoft's LINQ technologies. He first wrote about LINQ in his September 13, 2005 An interview with Bill Gates from PDC 2005 blog/podcast, which includes a transcription. His initial take on LINQ:

The biggest round of applause, I think, went to Anders Hjelsberg, whose LINQ technoloogy was shown issuing SQL-like queries, as native C# syntax, to query in-memory CLR objects, to query SQL tables, and to perform joins between both. On the XML side, LINQ was used to construct XML, though not to query it—I'll want to ask Anders about that when we meet later this week.

He followed up with a September 21, 2005 Microsoft driving toward .Net unity "Strategic Developer" column based on PDC 2005 presentations:

LINQ is an extraordinary innovation that turns traditional query inside out. But the bigger story from PDC 2005 is that the .Net vision of unifying many balkanized disciplines within the Microsoft ecosystem is finally becoming a reality.

His LINQ 101 blog post a week later demonstrated the code for a three-way join across an XML data source and two CLR objects. His conclusion:

Could you the same thing in XQuery? Sure, given three sources of equivalent XML data. And in fact the preview includes implementations of the XQuery use cases. LINQ's home base, though, is the domain of CLR objects. From there it extends its generalized query operators into the realms of objects, XML, and relational data. All of the capabilities of the .NET Framework are available within -- and across -- these contexts. What's more, you can invent new query operators using C# and the Framework.

When I said that LINQ turns query inside out, I wasn't kidding. There is a lot here to think about and explore.

Jon got his chance to interview Anders Hjelsberg for his May 12, 2006 A conversation with Anders Hejlsberg about the May 06 preview of LINQ podcast (with transcript). Here's Jon's conclusion:

I'm not certain myself how much of LINQ is genuinely new, and how much is a creative synthesis of pre-existing ideas, but I do know that I'm fascinated by what it can do and where it might go. Its reach will ultimately be determined by the extent to which non-Microsoft databases of all flavors—relational, object, XML—are willing and able to plug into the LINQ framework. To that end, one of the most significant points in today's interiew is the announcement of IQueryable, an interface that formalizes how providers plug into LINQ. Watching the uptake of this mechanism by third parties over the next year or so will tell us a lot about whether LINQ will be a Microsoft-only phenomenon or something that more broadly influences the industry.

Well said. I'd like to hear Jon's thoughts on LINQ for XSD, despite it's Alpha 0.1 preview status, and PLINQ, which doesn't yet have a publicly available implementation.

So here's hoping that Jon won't expend all his Channel9 and On10 efforts on the Web, social networking, public libraries, and the like, but will continue evangelizing XML, XSD, XSLT, XQuery, and LINQ and analyzing trends in these technologies in his new role at Microsoft.

And here's wishing Jon best of luck at Microsoft. As I said in my comment to Jon's blockbuster post: "It’s by luring folks of your stature that Microsoft succeeds."

Technorati Tags: Jon Udell, XML, XSD, XML Schema, XQuery, LINQ to XSD, LINQ to XML Objects, LINQ to XML, XLinq, LINQ to SQL, DLinq, C# 3.0, VB 9.0, Orcas

Note: I've added a Jon Udell tag to all OakLeaf blog posts the mention Jon.

Friday, December 08, 2006

PLINQ Gathers Momentum

Parallel Language Integrated Query or Parallel LINQ (PLINQ) finally emerged from the shadows with Microsoft Program Manager Joe Duffy's December 1, 2006 "A new role for me at Microsoft" post:

I recently left the CLR team to join a new team focusing on parallelism on Microsoft's platform in the 3-10 year timeframe. I am leading design and development of the Parallel LINQ (PLINQ) project that I alluded to here.

We're looking for supersmart technical people to join the team and help change the face of programming for anybody writing code on the CLR or VC++. PLINQ isn't the only project. Solid CS skills are a must, but you don't necessarily have to be a concurrency guru (right away).

These [22] job postings have some detail. If something catches your eye, respond on the jobs site or send me your resume directly at joedu AT you-know-where DOT com (i.e. microsoft DOT com).

I'll of course still be blogging about everything concurrency related, so you won't notice much of a difference content-wise. And I'm still happy to answer any CLR related questions and help you find the right folks inside the team to listen to your feedback.
Joe is the author of an MSDN Magazine January 2006 "{END BRACKET}" column, "Transactions for Memory," and September 2006 "CLR Inside Out" column, "Using Concurrency for Scalability." There's no mention of LINQ in either article, but the handwriting was on the wall.

The first concrete information about PLINQ came from an August 28, 2006 eWeek article, "Microsoft's PLinq to Speed Program Execution," by Darryl K. Taft, who quotes Anders Heljsberg:

"With PLinq, effectively you write the code the same way, but we arrange for it to run on multiple CPUs," Hejlsberg said in an interview at Microsoft in early August. "So the queries get split up and run on multiple CPUs, and then you just wait for all the results to arrive. And lo and behold, without any changes your program just ran six times faster. It's instant gratification. ...

"It doesn't necessarily mean that every program is going to run six times faster, but there are classes of programs that we can make run faster without the user having to get into the nitty-gritty business of writing concurrent constructs."

Danny Thorpe, formerly Borland's Chief Scientist and now Microsoft Sr. Product Manager/Architect, noted in a September 2005 blog post announcing Borland's Delphi would support LINQ, that LINQ had parallel computing potential. Taft's September 27, 2005 eWeek article, "Borland Plans to Support MS LINQ in Delphi Platform" quotes Danny:

"LINQ presents an enormous opportunity to put parallel computing in a package that everyday coders can use safely and easily. Exploit those multicore processors! Even qrid computing is within reason."

I don't usually write about projects that don't have at least at least a public preview or alpha version available for testing. However, it appears that Microsoft is staffing to deliver PLINQ in the Orcas timeframe. So following the PLINQ story looks worthwhile.

Don Domsak's recent Parallel Language Integrated Query (PLINQ) post adds fuel to the PLINQ fire with this conclusion:

Overall, this stuff looks very cool. And it seems that LINQ is going to be a big part of how they plan to implement it, giving me even more of a reason to get going on LINQ before all the cool kids realize that WPF, WCF and WF are yesterday's news, and LINQ is where it is at ;).

Note: Don Domsak, better known as DonXML is a Microsoft MVP for XML and a VB .NET fan. Don recently gave presentations on LINQ and the Entity Framework at the Heartland Developer Conference (HDC) 2006.

Question of the day: Will the PLINQ moniker morph to initial-letter-capped Plinq (a la Blinq), PLinq (per the original DLinq and XLinq API names), or adopt the LINQ to Whatever style as LINQ to Cores?

Update: 7/30/2007: Mary Jo Foley posted What will next-generation multicore apps look like? today, which quotes the presentation that Craig Mundie, Microsoft's Chief Research and Strategy Officer, gave to last week's Financial Analysts Meeting. There's no mention of PLINQ in the transcript that Mary Jo cites or the PowerPoint slides. It's surprising that PLINQ wasn't part of the presentation because it's probably Microsoft's first concrete implementation of declarative languages for multi-core processing.

Update 1/23/2007: Joe Duffy updated his post about PLINQ talk at the Declarative Aspects of Multicore Programming (DAMP) workshop he gave at POPL 2007 earlier in January by adding a link to his slides.

Update 12/12/2006: Anders Hejlsberg discusses PLINQ, concurrent programming, and LINQ for Orcas in an 8:29 interview from Tech•Ed: Developers 2006 Barcelona. The page also includes links to Eric Rudder's 1:15:00 Windows Vista, 2007 Office System and AJAX keynote, and brief interviews with Scott Guthrie, Paul Andrew, and Keith Smith.

Technorati Tags: Orcas, PLINQ, LINQ, C# 3.0, VB 9.0