LINQ support in Ignite.NET via re-linq library

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

LINQ support in Ignite.NET via re-linq library

Pavel Tupitsyn-3
Igniters,

I'm working on LINQ support in Ignite.NET ([1]).

For the uninitiated, LINQ will allow cache SQL queries in a strongly-typed
way, which is awesome:
  cache.ToQueryable().Where(person => person.Age > 20)
instead of
  cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))

To greatly simplify the task of transforming expression tree to Ignite SQL,
I'm going to use re-linq [2].
* It is an industry standard LINQ library, used in Entity Framework and
NHibernate for the same purpose
* License is Apache 2.0, same as ours

Any thoughts or objections?


[1] https://issues.apache.org/jira/browse/IGNITE-1630
[2] https://relinq.codeplex.com/

--
--
Pavel Tupitsyn
GridGain Systems, Inc.
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: LINQ support in Ignite.NET via re-linq library

Sergi
Looks cool to me.

Sergi

2016-01-22 18:04 GMT+03:00 Pavel Tupitsyn <[hidden email]>:

> Igniters,
>
> I'm working on LINQ support in Ignite.NET ([1]).
>
> For the uninitiated, LINQ will allow cache SQL queries in a strongly-typed
> way, which is awesome:
>   cache.ToQueryable().Where(person => person.Age > 20)
> instead of
>   cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
>
> To greatly simplify the task of transforming expression tree to Ignite SQL,
> I'm going to use re-linq [2].
> * It is an industry standard LINQ library, used in Entity Framework and
> NHibernate for the same purpose
> * License is Apache 2.0, same as ours
>
> Any thoughts or objections?
>
>
> [1] https://issues.apache.org/jira/browse/IGNITE-1630
> [2] https://relinq.codeplex.com/
>
> --
> --
> Pavel Tupitsyn
> GridGain Systems, Inc.
> www.gridgain.com
>
Reply | Threaded
Open this post in threaded view
|

Re: LINQ support in Ignite.NET via re-linq library

Valentin Kulichenko
Looks nice, but what is ToQueryable() method for? Is the cache initially
not queryable? :)

-Val

On Fri, Jan 22, 2016 at 9:49 AM, Sergi Vladykin <[hidden email]>
wrote:

> Looks cool to me.
>
> Sergi
>
> 2016-01-22 18:04 GMT+03:00 Pavel Tupitsyn <[hidden email]>:
>
> > Igniters,
> >
> > I'm working on LINQ support in Ignite.NET ([1]).
> >
> > For the uninitiated, LINQ will allow cache SQL queries in a
> strongly-typed
> > way, which is awesome:
> >   cache.ToQueryable().Where(person => person.Age > 20)
> > instead of
> >   cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
> >
> > To greatly simplify the task of transforming expression tree to Ignite
> SQL,
> > I'm going to use re-linq [2].
> > * It is an industry standard LINQ library, used in Entity Framework and
> > NHibernate for the same purpose
> > * License is Apache 2.0, same as ours
> >
> > Any thoughts or objections?
> >
> >
> > [1] https://issues.apache.org/jira/browse/IGNITE-1630
> > [2] https://relinq.codeplex.com/
> >
> > --
> > --
> > Pavel Tupitsyn
> > GridGain Systems, Inc.
> > www.gridgain.com
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: LINQ support in Ignite.NET via re-linq library

Pavel Tupitsyn-3
Val, ToQueryable comes from standard IQueryable/IEnumerable interfaces.
IEnumerable is a very basic interface that all the collections implement
(lists, arrays, etc).
IQueryable implements IEnumerable, but adds Provider which evaluates the
query.

Our ICache is already IEnumerable (it delegates to IgniteCache.iterator()
in Java).
So you can already say 'cache.Where(e => e.Key > 10)' and so on, but the
filtering will occur locally, as opposed to 'ToQueryable().Where(...)'.

I think this is a good design. Any cache can be iterated, but queries have
to be configured, and ToQueryable clearly states that user wants to use SQL
queries.

Thoughts?

On Sat, Jan 23, 2016 at 9:58 AM, Valentin Kulichenko <
[hidden email]> wrote:

> Looks nice, but what is ToQueryable() method for? Is the cache initially
> not queryable? :)
>
> -Val
>
> On Fri, Jan 22, 2016 at 9:49 AM, Sergi Vladykin <[hidden email]>
> wrote:
>
> > Looks cool to me.
> >
> > Sergi
> >
> > 2016-01-22 18:04 GMT+03:00 Pavel Tupitsyn <[hidden email]>:
> >
> > > Igniters,
> > >
> > > I'm working on LINQ support in Ignite.NET ([1]).
> > >
> > > For the uninitiated, LINQ will allow cache SQL queries in a
> > strongly-typed
> > > way, which is awesome:
> > >   cache.ToQueryable().Where(person => person.Age > 20)
> > > instead of
> > >   cache.Query(new SqlQuery(typeof(Person), "age > ?", 20))
> > >
> > > To greatly simplify the task of transforming expression tree to Ignite
> > SQL,
> > > I'm going to use re-linq [2].
> > > * It is an industry standard LINQ library, used in Entity Framework and
> > > NHibernate for the same purpose
> > > * License is Apache 2.0, same as ours
> > >
> > > Any thoughts or objections?
> > >
> > >
> > > [1] https://issues.apache.org/jira/browse/IGNITE-1630
> > > [2] https://relinq.codeplex.com/
> > >
> > > --
> > > --
> > > Pavel Tupitsyn
> > > GridGain Systems, Inc.
> > > www.gridgain.com
> > >
> >
>



--
--
Pavel Tupitsyn
GridGain Systems, Inc.
www.gridgain.com