LINQ Panel: Whadya wanna Know?

Don Box's Spoutlet

Syndication

I'm moderating a panel tomorrow at PDC on the LINQ project.
 
I have no shortage of ideas for topics/questions, but I'd love to hear from the rest of the world what y'all want to hear folks who've been creating and using this stuff.
 
Please use the comments on this blog, as my email is pretty sporadic while here at PDC.  I'm mainly looking for fodder, so expect me to mangle your ideas to fit the event.

Posted Sep 15 2005, 03:12 PM by don-box

Comments

Mark Mehelis wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 10:23 AM
Don I have some fears of LINQ - and so does my lead dev...

Ramblings--- intentionally going awry...

1. I need to create a data-storage mechanism for my app.
I need to store data to the hard drive (say via the
file system). I can then create objects that read and
write to the file-system to persist data (i.e., objects
like CustomerCarRental.saveAgreement(), etc).

2. The file-system I use needs to be faster, so I need to
create index files and create some background processes
that use n-tree (binary, 2-3 trees, etc) methods to
keep the data stored correctly for performance.

3. This makes it difficult when I insert or update data
in this scheme. So, I would *really* like an engine
that handles this, so I done keep duplicating this over
and over.

4. It would be nice if the interface into this engine was
standard. I do not want to touch ISAM (Indexed
Sequential Access Method) files directly, so it would
be great if there was an interprettive script-parsing
layer that fit on top of the database.

5. Now that I interface with the database via scripts, it
would *really* be nice if there was some standardization
of the syntax of the scripts. Maybe a Standard Query
Language would be nice (it would be great if we set up
an American National Standards Institute that would make
the language standard for all of us trying to create
database engines. That way, when I realize that my engine
sucks, I can use my buddies, knowing that my interface
to the database will be the same through the same scripts.

6. Hey, the idea of using scripts is really cool, since now
I can dynamically generate the scripts (like I do HTML)
to create adhoc-browse windows. Users can filter based
on, say, "LIKE" and "IN" and other cool filter criteria.
Now I can understand what is going on in my buddy's app
when he executes "select CustomerName, CustomerAddress,
RentalDate from Agreements where CustomerName like
'%Smith%'". This is cool since I can also change the
SQL a bit to get better performance, too (i.e., joining
with major-filters bottom-right and going to top-left
for the more in-depth filtering, or whatever).

7. I like this interpretter-pattern thing for interfacing
with the database. Now, I can go to any application and
understand what is going on, since I know the scripting
language. I can look into my buddy's CustomerCarRental
object to see that the "save()" method is executing a
script like "insert into Agreements ( CustomerName,
CustomerAddress, RentalDate, ReturnDate, Price ) values
( 'Joe Smith', '123 J St. Napa, CA 94553', '10/01/2005',
'10/15/2005', '$225.00' )".

8. Man-oh-man. This is great. The *last* thing I need is
for someone to de-standardize this great thing we have
going. I don't to learn some one-off way of interacting
with the database (ie. "x=TL.locateUpdatableRec('somecriteria');
x.setCustomerName('J Smith'); x.setCustomerAddress( 'xxx' );
etc, etc, x.commitData();" vs the insert from (7)). Man
it would also suck since I couldn't tweek the SQL for
performance, either (see (6)). I would probably have to
use a lesser-functional means to get *larger* sets of
data, then "interrogate" the data sets to filter down
to what I want... or something.

9. I sure hope that if someone *did* decide to build a mapped-
object layer, that they wouldn't require a code-generator
to "create" code that gets shoved into by code-base. It
would only be able to be modified through the external
tool used to created it. It would such to generate, tweek &
modify-to-suit, change the database, re-generate and lose
my changes (or maybe we would need to add a level of
complexity to the development scheme--- "always cut-and-
save changes before re-genning the db objects"... or
something).

10. I sure hope that if someone *did* decide to build a mapped-
object layer, that they wouldn't try to get fancy and
cache-stuff from the database. That would suck if an
external process or application changed the database without
the db-object-layer (ORM) knowing about it. It would also suck
since my application-servers would need to be clustered,
and any disperate applications of processes would now need
to talk through a proprietary interface to *my* application
instead of talking SQL directly with the database. Now I
would need to create my own listener-scheme (i.e.,
web-services, RMI calls, etc) instead putting that burden
on the database (i.e., EJB.RemoteCustomerCarRental.blahBlah(),
etc).

11. But it would not suck if I was the guy setting up this
entire architecture. I'd weasle-in, become the sole entry
point to the database, then up my maintenance rates. Who
the hell else could be brought in and up-to-speed on all of
my proprietary makings? I would *own* my customers! I'd be
a monopoly and millionare by attrition! Ya, baby!

Chris Woodruff wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 10:40 AM
Don --

I have followed Comega for a while and really was excited about the language and if it could be brought into the C# superset. I love that LINQ will allow the developer to use relation and XML data easily in the .NET universe. Maybe this question is not the best asked here but I will still ask it. What about all the cool other language constructs that Comega had? Will any of these be added to .NET (or have they and I just missed them):
1. Stream types
2. Anonymous structs ("tuple types")
3. Choice types
4. Content classes

Thanks and have a good time with LINQ. I have been waiting for this for 10 years. Cannot wait until I can use it in production development.
Keith J. Farmer wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 12:15 PM
Don:

I've been playing with the bits, and I'm pretty excited about this (I just wish it were RTM here, now). The following would be of interest to people on my end:

1 -- Extending DLinq to other databases. Oracle for example, any RDBMS in general, any tabular store (csv files on the file system, for example) for bonus points. DLinq over Web Services would be, well, amazing.

2 -- GLinq, for Linq over graphs in general.

3 -- Choice types would be of *incredible* help for a project we have. It would solve some very difficult problems we're having in designing a framework. If you want, email me and I can explain.

3 -- Streams: do we need them now that we have yield?
Mark Miller wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 12:17 PM
* What is a projection for release? It seems to be targetted at Orcas, but since we have some bits in our hands now, will we see incremental production releases against whidbey?
* What is the plan for working with other DB providers like Oracle? Things like handling the type disconnect between DBs like Oracle and .NET (which is less than elegant at the moment). Those situations will be magnified by pulling those into the language.
* There doesn't seem to be a complete story on interop with Indigo. For instance, how will this technology change Indigo? I can definitely see dealing with services as query-able datasources.
* Large, "read-only" style apps (data visualization, etc) seem to need a voice in this design. For instance, they don't need the overhead of change tracking, identity management and some of the other things that the DataContext seems to be forcing on the model, we just need large streams of data. Also, relationships in such scenarios are not defined by an object model or hierarchy, how can these be described more concisely in the query (where's the JOIN statement).
Sean Chase wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 1:14 PM
lambda lambda lambda for all of use LISP-Losers. :-)
Marcus Widerberg wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 1:55 PM
1. There has been no talk on polyphonic c#, is the plan for it to be included in C# 3.0 / undecided / or no?

2. Suggestion: I would like to know a little more about the implementation (current + ideas) of the different features. Ex: How are extension methods implemented? That would explain how are extension method calls are dispatched, which I would like to know. Ie, is there a performance penalty for that (and the other features).
WWs Blog wrote The LINQ Project
on 09-15-2005 3:11 PM
Microsoft has a really interesting project, codename LINQ, that will extend the .NET Framework. It's...
Scott wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 3:54 PM
I'll second the call for more info on the Lambda expressions. How do we use them? Can the be created for our custom types? Generic types?
Barry Gervin's Software Architecture Perspectives wrote More on LINQ, XLinq and perspectives.
on 09-15-2005 4:06 PM
William Stacey wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 6:13 PM
The Provider model needs to simple and also rich with a .Net template. Naturally, many Linq providers come to mind quickly:
- AD (Add, change, delete user/groups, etc)
- Exchange (ACID mail and mailboxes)
- Local Hardware (enum)
- NTFS/FAT (ACID)
- File properties. (file size, attributes, etc)
- Process/Threads (including kill)
- Perf Mon
- Instrament the app.
- Eventlog and app eventlog (Add/ch/del)
- Shares/Active users
- RSS
- Registry

Really almost all apps should export a Linq provider so that you can at least do management and export data as needed. The "var" thing is causing some strange looks on the c# groups. Looks great however for the day I have been looking at it. Thanks MS.
--William Stacey [MVP]
William Stacey wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 6:22 PM
- Basically, the Dlinq stuff is an object wrapper which outputs a Sql string. Do you ever see a time where this could be done more directly?
- Are direct .Net types in the database ever going to happen to eliminate lossy behavior and type translation pain.
Eric A. wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 11:22 PM
@Mark Mehelis: Interestingly, VB9.0 implements a more "SQL" approach to the querying process:

[shamelessly taken from MSDN]
Class Country
Public Property Name As String
Public Property Area As Float
Public Property Population As Integer
End Class

Dim Countries = _
{ new Country{ _
.Name = "Palau", .Area = 458, .Population = 16952 }, _
new Country{ _
.Name = "Monaco", .Area = 1.9, .Population = 31719 }, _
new Country{ _
.Name = "Belize", .Area = 22960, .Population = 219296 }, _
new Country{ _
.Name = "Madagascar", .Area = 587040, .Population = 13670507 } _
}

Dim SmallCountries = Select Country _
From Country In Countries _
Where Country.Population < 1000000
For Each Country As Country In SmallCountries
Console.WriteLine(Country.Name)
Next
[/shamelessly taken from MSDN]

As seems apparent, the data retrieval of SmallCountries is much more similar to SQL as it is written today.

What odd folks over there in Redmond.

Regards,
Eric
Eric A. wrote re: LINQ Panel: Whadya wanna Know?
on 09-15-2005 11:23 PM
Sorry, I should have included the source of the shameless theft:

http://msdn.microsoft.com/vbasic/future/default.aspx?pull=/library/en-us/dnvs05/html/vb9overview.asp

Regards,
Eric A.
Richard Reukema wrote re: LINQ Panel: Whadya wanna Know?
on 09-16-2005 8:09 AM
I haven't seen anything in regard to stored procs? I personnelly don't issue selects directly against tables from my code - there are no examples of taking the data from a stored proc, and getting it into a collection. Did I miss something?
Mark Mehelis wrote re: LINQ Panel: Whadya wanna Know?
on 09-16-2005 8:16 AM
Thanks Eric... that is good to see something that is more SQL like.

I just don't like the idea of taking my data access and sprinkling it amongst the code. I see a major headache in trying to maintain any application that is not trivial in size.

How can I "tune" the data access via this code that is generated?

What happens to my data access when I add a column, subtract a column, modify a column? Currently in SQL as long as I don't "touch" a column from the SQL I can make changes at the Database and not break other applications which touch the database.

If I have this data accessed in memory what happens when a trigger fires and makes a change to the database or another application I co-exist with changes the data underneith me. My in memory data is now dirty... how is this handled?

If for some reason I need to take my application to say Oracle from SQL server or the other way around... is the SQL that is generated genaric enough to not blow up?

- Mark
Bryant Likes wrote re: LINQ Panel: Whadya wanna Know?
on 09-16-2005 9:27 AM
1) If we drink the linq coolaid, what should we start doing today to make moving to linq easier in the future?

2) What happens to linq objects that get passed between app domains? What about returning linq generated objects from a web service?
Chris Woodruff wrote re: LINQ Panel: Whadya wanna Know?
on 09-16-2005 10:05 AM
I agree with Richard about stored procedures. I almost never use inline SQL for data retrieval. Will LINQ have the ability to interrogate my stored procedure return dataset and allow me to work with said dataset? That is what I also need.
Bryant Likes wrote re: LINQ Panel: Whadya wanna Know?
on 09-16-2005 10:25 AM
3) Can the schemas in XLink be generated the same way they are in DLink by using .NET classes?
Mark Mehelis wrote re: LINQ Panel: Whadya wanna Know?
on 09-16-2005 10:33 AM
The syntax between the different languages within .NET should be the same IMHO. My reasoning would be that say I have a LINQ query that I can't get to work they way I want and I go to my neighbor and ask for help... sorry dude you write VB.NET I write C# ... I don't understand your specific dialect of LINQ.

So if nothing else atleast standardize within MS on LINQ and how the language syntax works. It would suck to have to throw out an application because my VB/C# coder quit and I don't have anyone else to fill his/her shoes immediately and I don't have another coder in that particular language.
YanivG wrote re: LINQ Panel: Whadya wanna Know?
on 09-20-2005 12:43 AM
Check out the discussion on LINQ syntax at Eran's blog at http://dotnetdebug.blogspot.com/.
christophep@avanade.com wrote re: LINQ Panel: Whadya wanna Know?
on 09-21-2005 2:07 AM
it should be better to increase the speed of the collections namespace and incorporate into it things like ones we have in STL (C++) rather than finding experimental stuff. In real world projetcs (not PPT ones), we used stored proc and I a guy have the idea to use a ISAM provider or a custom tree algorythm, the management is not possible anymore. We have left the isam area, we have powerfull structures, iterators and algorythms, so... C# does not make me smile.
In fact, finding and entry in a 5 row struct it not very cool & smart.
Sorry Don.
christophep@avanade.com wrote re: LINQ Panel: Whadya wanna Know?
on 09-21-2005 2:09 AM
erratum: C# 3.0 does not make me smile.
but C# 2.0 is excellent.
Marc Brooks wrote re: LINQ Panel: Whadya wanna Know?
on 09-23-2005 3:52 PM
Can we campaign to get 'var' change to something less overloaded with "variant" and "variable typed" overtones? How about "let". Here's the link for LadyBug

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=f181f2bd-6348-410e-b010-92349da4f80b
xlink and linq wrote xlink and linq
on 07-07-2008 5:18 AM

Pingback from  xlink and linq

Add a Comment

(required)  
(optional)
(required)  
Remember Me?