Re: More on LINQ Providers

2014-10-27 Thread piers.williams
Also the linq-to-llblgen provider was - at least in it's first incarnation - 
not actually very good. You would constantly come up against unsupported 
operators, which again just goes to show what a significant effort writing a 
linq provider is.


(As an aside, there is also the LinqToAzure http://linq2azure.com/ API that Joe 
Albahari helped the Cash Converters team to write, but I have no idea how 
complete an implementation it is having never used it)






From: Greg Keogh
Sent: ‎Thursday‎, ‎October‎ ‎23‎, ‎2014 ‎6‎:‎26‎ ‎AM
To: ozDotNet






Just a heads-up ... I spent hours working through This Walkthrough to see what 
it necessary to create a simple LINQ provider. This very primitive example that 
wraps a web service results in about 10 non-trivial classes with about 500 
lines of statements. Most of the code is dense with generics, casts and classes 
that the average developer probably wouldn't know exist. The sample contains 
far less than I had hoped to implement even for my most modest needs. I still 
can't properly understand about 10% of the sample code.




Clearly, this area of coding is quite specialised, giving you a glimpse of how 
compilers work. Given the power of LINQ I can understand why it's so difficult 
to form and process general expressions, but sadly there are so many arcane 
classes and techniques involved that I think I will abandon my attempts to 
create a LINQ provider for now due to lack of spare time to learn something 
that is too specialised to be of use in general app development. 
Congratulations to these guys however:




Why I hate implementing Linq

Developing Linq to LLBLGen Pro (who claims to be the only known civilian who 
wrote a complete provider)




Greg K

Re: LINQ providers

2014-10-22 Thread Greg Keogh

 I assume that the ISAM data file system is a pre-requisite?
 We use an ISAM file system as well and the platform supplier has provided
 a LINQ provider for us - no such luck with your ISAM provider?


It's actually this library from Microsoft:

http://managedesent.codeplex.com/wikipage?title=ManagedEsentDocumentationreferringTitle=Documentation

I just noticed they've added basic LINQ support to the accompanying
PersistentDictionary
http://managedesent.codeplex.com/wikipage?title=PersistentDictionaryDocumentationreferringTitle=Home
class (which I don't use), so I downloaded the source for a look about how
it was done ... I can tell you immediately that unless you have some
experience with this sort of coding that it will look like gibberish.

*Greg*


Re: LINQ providers

2014-10-22 Thread Steven Parish
Hi Greg,

Are you locked into this specific ISAM provider - can you replace with
another?

*Regards,*



*Steven Parish*

*Managing Director*


 *BusinessCraft Pty Ltd*

*Address:* Level 1, 270 Turton Road, New Lambton NSW 2305

*Mail:* PO Box 57, Lambton NSW 2299

*M:* 0417 688 599 | *T:* 02 4965  | *F:* 02 4965 5333

*www.businesscraft.com.au http://www.businesscraft.com/*

On 22 October 2014 17:34, Greg Keogh g...@mira.net wrote:

 I assume that the ISAM data file system is a pre-requisite?
 We use an ISAM file system as well and the platform supplier has provided
 a LINQ provider for us - no such luck with your ISAM provider?


 It's actually this library from Microsoft:


 http://managedesent.codeplex.com/wikipage?title=ManagedEsentDocumentationreferringTitle=Documentation

 I just noticed they've added basic LINQ support to the accompanying
 PersistentDictionary
 http://managedesent.codeplex.com/wikipage?title=PersistentDictionaryDocumentationreferringTitle=Home
 class (which I don't use), so I downloaded the source for a look about how
 it was done ... I can tell you immediately that unless you have some
 experience with this sort of coding that it will look like gibberish.

 *Greg*



Re: LINQ providers

2014-10-22 Thread Greg Keogh

 Are you locked into this specific ISAM provider - can you replace with
 another?


Do you know of any other in-process, small footprint, transactional,
high-performance, high-capacity, zero-configuration, zero-installation ISAM
libraries I could replace ESENT with? -- *Greg*


Re: LINQ providers

2014-10-22 Thread Steven Parish
We have been developing using the synergy/de platform for 30+ years. 

The synergy isam meets a lot of your criteria.

There is a runtime required for their main environment, however they have 
recently released an entry into the no SQL arena which I believe is free and 
is just a rebadge of their isam - company name is Synergex from Sacramento in 
ca / I have a regular monthly Skype call with their CEO this Friday - and can 
ask some questions for you. They are a great company to deal with.

See their web site www.synergex.com  the no SQL product is called kittaro

 Happy to have a chat offline

Regards,
Steven Parish

Sent from my iPhone

On 23/10/2014, at 7:26 AM, Greg Keogh g...@mira.net wrote:

 Are you locked into this specific ISAM provider - can you replace with 
 another?
 
 Do you know of any other in-process, small footprint, transactional, 
 high-performance, high-capacity, zero-configuration, zero-installation ISAM 
 libraries I could replace ESENT with? -- Greg


More on LINQ Providers

2014-10-22 Thread Greg Keogh
Just a heads-up ... I spent hours working through This Walkthrough
http://msdn.microsoft.com/en-us/library/vstudio/bb546158(v=vs.110).aspx
to see what it necessary to create a simple LINQ provider. This very
primitive example that wraps a web service results in about 10 non-trivial
classes with about 500 lines of statements. Most of the code is dense with
generics, casts and classes that the average developer probably wouldn't
know exist. The sample contains far less than I had hoped to implement even
for my most modest needs. I still can't properly understand about 10% of
the sample code.

Clearly, this area of coding is quite specialised, giving you a glimpse of
how compilers work. Given the power of LINQ I can understand why it's so
difficult to form and process general expressions, but sadly there are so
many arcane classes and techniques involved that I think I will abandon my
attempts to create a LINQ provider for now due to lack of spare time to
learn something that is too specialised to be of use in general app
development. Congratulations to these guys however:

Why I hate implementing Linq
http://ayende.com/blog/4675/why-i-hate-implementing-linq
Developing Linq to LLBLGen Pro
http://weblogs.asp.net/fbouma/developing-linq-to-llblgen-pro-day-1 (who
claims to be the only known civilian who wrote a complete provider)

*Greg K*


LINQ providers

2014-10-21 Thread Greg Keogh
Folks, I have a simple ISAM data source which can get-by-key or seek on
arbitrary indexes. I'm only using an Int32 primary key at the moment and
haven't needed to create more indexes so far. For a few thousand records
the performance is good, but as it grows and you ask for something like
this:

var smiths = mydb.ListCustomer().Where(c = c.Surname =
Smith).OrderBy(c = c.Postcode);

It slows because this query inefficiently Lists the complete database
over the primary Int32 index and then uses LINQ-to-objects to give me the
result. In this case it's no better than reading a txt file.

I realised of course that the real solution is to make my data source a
LINQ Provider that it can use its internal DB smarts to answer queries
efficiently. By looking at these articles: *Walkthrough: Creating an
IQueryable LINQ Provider
http://msdn.microsoft.com/en-us/library/vstudio/bb546158(v=vs.110).aspx*
and *Enabling a Data Source for LINQ Querying
http://msdn.microsoft.com/en-us/library/bb882640.aspx* I realised I was
up for a full-time specialist job for a few months. The latter page
describes how you can decide to make a *simple*, *medium* or *complex*
provider and it warns: Developing a complex provider requires a
significant amount of effort. After reading about expression trees I
realise this is a highly specialised and complex topic. Even Oren who
created RavenDB says it took him longer to write the LINQ provider for the
database than it took to write the database itself, which is pretty
sobering!

I'd still like to turn my data source into a *simple* LINQ provider if
possible, but lord knows where to start, maybe at the huge walkthrough in
my first link. I found re-linq https://relinq.codeplex.com/ which
apparently takes some of the pain of working with expression trees, but I
haven't even found a tutorial on it yet.

Has anyone got experience or comments on this subject?

*Greg K*


Re: LINQ providers

2014-10-21 Thread Steven Parish
Hi Greg,

I assume that the ISAM data file system is a pre-requisite?

We use an ISAM file system as well and the platform supplier has provided a
LINQ provider for us - no such luck with your ISAM provider?

*Regards,*



*Steven Parish*

*Managing Director*


 *BusinessCraft Pty Ltd*

*Address:* Level 1, 270 Turton Road, New Lambton NSW 2305

*Mail:* PO Box 57, Lambton NSW 2299

*M:* 0417 688 599 | *T:* 02 4965  | *F:* 02 4965 5333

*www.businesscraft.com.au http://www.businesscraft.com/*

On 22 October 2014 10:14, Greg Keogh g...@mira.net wrote:

 Folks, I have a simple ISAM data source which can get-by-key or seek on
 arbitrary indexes. I'm only using an Int32 primary key at the moment and
 haven't needed to create more indexes so far. For a few thousand records
 the performance is good, but as it grows and you ask for something like
 this:

 var smiths = mydb.ListCustomer().Where(c = c.Surname =
 Smith).OrderBy(c = c.Postcode);

 It slows because this query inefficiently Lists the complete database
 over the primary Int32 index and then uses LINQ-to-objects to give me the
 result. In this case it's no better than reading a txt file.

 I realised of course that the real solution is to make my data source a
 LINQ Provider that it can use its internal DB smarts to answer queries
 efficiently. By looking at these articles: *Walkthrough: Creating an
 IQueryable LINQ Provider
 http://msdn.microsoft.com/en-us/library/vstudio/bb546158(v=vs.110).aspx*
 and *Enabling a Data Source for LINQ Querying
 http://msdn.microsoft.com/en-us/library/bb882640.aspx* I realised I was
 up for a full-time specialist job for a few months. The latter page
 describes how you can decide to make a *simple*, *medium* or *complex*
 provider and it warns: Developing a complex provider requires a
 significant amount of effort. After reading about expression trees I
 realise this is a highly specialised and complex topic. Even Oren who
 created RavenDB says it took him longer to write the LINQ provider for the
 database than it took to write the database itself, which is pretty
 sobering!

 I'd still like to turn my data source into a *simple* LINQ provider if
 possible, but lord knows where to start, maybe at the huge walkthrough in
 my first link. I found re-linq https://relinq.codeplex.com/ which
 apparently takes some of the pain of working with expression trees, but I
 haven't even found a tutorial on it yet.

 Has anyone got experience or comments on this subject?

 *Greg K*