You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Vyacheslav Daradur <da...@gmail.com> on 2018/03/05 15:07:28 UTC

Use of lambdas and other Java 8 features

Hi, Igniters!

Since we official support Java 8, I want to find out the following question:

Are there any restrictions on using lambdas and other Java 8 features?

-- 
Best Regards, Vyacheslav D.

Re: Use of lambdas and other Java 8 features

Posted by Vyacheslav Daradur <da...@gmail.com>.
Dmitry, Vladimir, thank you for the clarification!

On Mon, Mar 5, 2018 at 6:23 PM, Dmitry Pavlov <dp...@gmail.com> wrote:
> By the way, usage of lambdas instead of anonymous class may have positive
> performance effect.
>
> And Java 8 provides us a number of new features, which allows Ignite
> operate faster (e.g. Arrays.parrallelSort, list.sort(), etc).
>
> пн, 5 мар. 2018 г. в 18:15, Vladimir Ozerov <vo...@gridgain.com>:
>
>> Hi Vyacheslav,
>>
>> I would not recommend using them without strong reasons. While convenient
>> for developers in general, some of these features has hidden pitfails,
>> which may affect performance and serialization. But as our product is very
>> performance sensitive, it is better to have slightly more code which is
>> simple and expressive, rather than save several lines of code and loose
>> understanding on what is going on.
>>
>> On Mon, Mar 5, 2018 at 6:07 PM, Vyacheslav Daradur <da...@gmail.com>
>> wrote:
>>
>> > Hi, Igniters!
>> >
>> > Since we official support Java 8, I want to find out the following
>> > question:
>> >
>> > Are there any restrictions on using lambdas and other Java 8 features?
>> >
>> > --
>> > Best Regards, Vyacheslav D.
>> >
>>



-- 
Best Regards, Vyacheslav D.

Re: Use of lambdas and other Java 8 features

Posted by Dmitry Pavlov <dp...@gmail.com>.
By the way, usage of lambdas instead of anonymous class may have positive
performance effect.

And Java 8 provides us a number of new features, which allows Ignite
operate faster (e.g. Arrays.parrallelSort, list.sort(), etc).

пн, 5 мар. 2018 г. в 18:15, Vladimir Ozerov <vo...@gridgain.com>:

> Hi Vyacheslav,
>
> I would not recommend using them without strong reasons. While convenient
> for developers in general, some of these features has hidden pitfails,
> which may affect performance and serialization. But as our product is very
> performance sensitive, it is better to have slightly more code which is
> simple and expressive, rather than save several lines of code and loose
> understanding on what is going on.
>
> On Mon, Mar 5, 2018 at 6:07 PM, Vyacheslav Daradur <da...@gmail.com>
> wrote:
>
> > Hi, Igniters!
> >
> > Since we official support Java 8, I want to find out the following
> > question:
> >
> > Are there any restrictions on using lambdas and other Java 8 features?
> >
> > --
> > Best Regards, Vyacheslav D.
> >
>

Re: Use of lambdas and other Java 8 features

Posted by Vladimir Ozerov <vo...@gridgain.com>.
Hi Vyacheslav,

I would not recommend using them without strong reasons. While convenient
for developers in general, some of these features has hidden pitfails,
which may affect performance and serialization. But as our product is very
performance sensitive, it is better to have slightly more code which is
simple and expressive, rather than save several lines of code and loose
understanding on what is going on.

On Mon, Mar 5, 2018 at 6:07 PM, Vyacheslav Daradur <da...@gmail.com>
wrote:

> Hi, Igniters!
>
> Since we official support Java 8, I want to find out the following
> question:
>
> Are there any restrictions on using lambdas and other Java 8 features?
>
> --
> Best Regards, Vyacheslav D.
>

Re: Use of lambdas and other Java 8 features

Posted by Dmitry Pavlov <dp...@gmail.com>.
Hi Vyacheslav,

It is possible to use lambdas in test code and node local-only code (e.g.
checkpointing, page memory, etc).

In other words any other classes, which are transferred/may be trasnferred
into network, can't use lambdas.

There is also recommendation to avoid mass change of anonymous classes to
lambdas because of difficulties of backporting.

Sincerely,
Dmitriy Pavlov

пн, 5 мар. 2018 г. в 18:07, Vyacheslav Daradur <da...@gmail.com>:

> Hi, Igniters!
>
> Since we official support Java 8, I want to find out the following
> question:
>
> Are there any restrictions on using lambdas and other Java 8 features?
>
> --
> Best Regards, Vyacheslav D.
>