You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Pavel Tupitsyn <pt...@apache.org> on 2020/11/08 16:12:22 UTC

[DISCUSS] Use GridNioServer in Java thin client

Igniters,

This is a continuation of "Use Netty for Java thin client" [1],
I'm starting a new thread for better visibility.

The problems with current Java thin client are:
* Socket writes block user threads
* Every connection uses a separate listener thread (with partition
awareness there is a thread for every server node within a single
IgniteClient)

GridNioServer can work in client mode and solves both of these problems.
It is the most practical choice as well at the moment - no extra
dependencies required.

A potential drawback is increased coupling between thin client and core
code,
which I'm going to mitigate by abstracting GridNioServer behind a simpler
facade,
so we can replace it with Netty or something else easier if we decide to
split the code.

Thoughts, objections?

[1]
http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Igor Sapego <is...@apache.org>.
Agree. Great job.

Best Regards,
Igor


On Thu, Nov 26, 2020 at 3:10 PM Ivan Daschinsky <iv...@gmail.com> wrote:

> Pavel, good job and great benchmark results!
>
> чт, 26 нояб. 2020 г. в 15:01, Pavel Tupitsyn <pt...@apache.org>:
>
> > PR is ready for review [1]
> >
> > I've added a simple put/get benchmark, there is some performance
> > improvement over existing implementation, see results in the PR
> > description.
> >
> > [1] https://github.com/apache/ignite/pull/8483
> >
> > On Fri, Nov 20, 2020 at 10:39 AM Pavel Tupitsyn <pt...@apache.org>
> > wrote:
> >
> > > Since there are no objections, I've updated the IEP accordingly [1]
> > > and started working on it [2]
> > >
> > > [1]
> > >
> >
> https://cwiki.apache.org/confluence/display/IGNITE/IEP-60%3A+Java+Thin+Client+Non-Blocking+Async+IO
> > > [2] https://github.com/apache/ignite/pull/8483
> > >
> > > On Mon, Nov 9, 2020 at 4:07 PM Ivan Daschinsky <iv...@gmail.com>
> > > wrote:
> > >
> > >> I suppose that the best variant -- ability to switch to netty if this
> > lib
> > >> is in classpath
> > >>
> > >> пн, 9 нояб. 2020 г. в 15:58, Igor Sapego <is...@apache.org>:
> > >>
> > >> > Sounds like a good idea to me.
> > >> >
> > >> > Best Regards,
> > >> > Igor
> > >> >
> > >> >
> > >> > On Mon, Nov 9, 2020 at 3:32 PM Alex Plehanov <
> plehanov.alex@gmail.com
> > >
> > >> > wrote:
> > >> >
> > >> > > +1 for using GridNioServer as java thin client communication
> layer.
> > >> > >
> > >> > > вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <ptupitsyn@apache.org
> >:
> > >> > >
> > >> > > > Igniters,
> > >> > > >
> > >> > > > This is a continuation of "Use Netty for Java thin client" [1],
> > >> > > > I'm starting a new thread for better visibility.
> > >> > > >
> > >> > > > The problems with current Java thin client are:
> > >> > > > * Socket writes block user threads
> > >> > > > * Every connection uses a separate listener thread (with
> partition
> > >> > > > awareness there is a thread for every server node within a
> single
> > >> > > > IgniteClient)
> > >> > > >
> > >> > > > GridNioServer can work in client mode and solves both of these
> > >> > problems.
> > >> > > > It is the most practical choice as well at the moment - no extra
> > >> > > > dependencies required.
> > >> > > >
> > >> > > > A potential drawback is increased coupling between thin client
> and
> > >> core
> > >> > > > code,
> > >> > > > which I'm going to mitigate by abstracting GridNioServer behind
> a
> > >> > simpler
> > >> > > > facade,
> > >> > > > so we can replace it with Netty or something else easier if we
> > >> decide
> > >> > to
> > >> > > > split the code.
> > >> > > >
> > >> > > > Thoughts, objections?
> > >> > > >
> > >> > > > [1]
> > >> > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> >
> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >>
> > >> --
> > >> Sincerely yours, Ivan Daschinskiy
> > >>
> > >
> >
>
>
> --
> Sincerely yours, Ivan Daschinskiy
>

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Ivan Daschinsky <iv...@gmail.com>.
Pavel, good job and great benchmark results!

чт, 26 нояб. 2020 г. в 15:01, Pavel Tupitsyn <pt...@apache.org>:

> PR is ready for review [1]
>
> I've added a simple put/get benchmark, there is some performance
> improvement over existing implementation, see results in the PR
> description.
>
> [1] https://github.com/apache/ignite/pull/8483
>
> On Fri, Nov 20, 2020 at 10:39 AM Pavel Tupitsyn <pt...@apache.org>
> wrote:
>
> > Since there are no objections, I've updated the IEP accordingly [1]
> > and started working on it [2]
> >
> > [1]
> >
> https://cwiki.apache.org/confluence/display/IGNITE/IEP-60%3A+Java+Thin+Client+Non-Blocking+Async+IO
> > [2] https://github.com/apache/ignite/pull/8483
> >
> > On Mon, Nov 9, 2020 at 4:07 PM Ivan Daschinsky <iv...@gmail.com>
> > wrote:
> >
> >> I suppose that the best variant -- ability to switch to netty if this
> lib
> >> is in classpath
> >>
> >> пн, 9 нояб. 2020 г. в 15:58, Igor Sapego <is...@apache.org>:
> >>
> >> > Sounds like a good idea to me.
> >> >
> >> > Best Regards,
> >> > Igor
> >> >
> >> >
> >> > On Mon, Nov 9, 2020 at 3:32 PM Alex Plehanov <plehanov.alex@gmail.com
> >
> >> > wrote:
> >> >
> >> > > +1 for using GridNioServer as java thin client communication layer.
> >> > >
> >> > > вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <pt...@apache.org>:
> >> > >
> >> > > > Igniters,
> >> > > >
> >> > > > This is a continuation of "Use Netty for Java thin client" [1],
> >> > > > I'm starting a new thread for better visibility.
> >> > > >
> >> > > > The problems with current Java thin client are:
> >> > > > * Socket writes block user threads
> >> > > > * Every connection uses a separate listener thread (with partition
> >> > > > awareness there is a thread for every server node within a single
> >> > > > IgniteClient)
> >> > > >
> >> > > > GridNioServer can work in client mode and solves both of these
> >> > problems.
> >> > > > It is the most practical choice as well at the moment - no extra
> >> > > > dependencies required.
> >> > > >
> >> > > > A potential drawback is increased coupling between thin client and
> >> core
> >> > > > code,
> >> > > > which I'm going to mitigate by abstracting GridNioServer behind a
> >> > simpler
> >> > > > facade,
> >> > > > so we can replace it with Netty or something else easier if we
> >> decide
> >> > to
> >> > > > split the code.
> >> > > >
> >> > > > Thoughts, objections?
> >> > > >
> >> > > > [1]
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
> >> > > >
> >> > >
> >> >
> >>
> >>
> >> --
> >> Sincerely yours, Ivan Daschinskiy
> >>
> >
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Pavel Tupitsyn <pt...@apache.org>.
PR is ready for review [1]

I've added a simple put/get benchmark, there is some performance
improvement over existing implementation, see results in the PR description.

[1] https://github.com/apache/ignite/pull/8483

On Fri, Nov 20, 2020 at 10:39 AM Pavel Tupitsyn <pt...@apache.org>
wrote:

> Since there are no objections, I've updated the IEP accordingly [1]
> and started working on it [2]
>
> [1]
> https://cwiki.apache.org/confluence/display/IGNITE/IEP-60%3A+Java+Thin+Client+Non-Blocking+Async+IO
> [2] https://github.com/apache/ignite/pull/8483
>
> On Mon, Nov 9, 2020 at 4:07 PM Ivan Daschinsky <iv...@gmail.com>
> wrote:
>
>> I suppose that the best variant -- ability to switch to netty if this lib
>> is in classpath
>>
>> пн, 9 нояб. 2020 г. в 15:58, Igor Sapego <is...@apache.org>:
>>
>> > Sounds like a good idea to me.
>> >
>> > Best Regards,
>> > Igor
>> >
>> >
>> > On Mon, Nov 9, 2020 at 3:32 PM Alex Plehanov <pl...@gmail.com>
>> > wrote:
>> >
>> > > +1 for using GridNioServer as java thin client communication layer.
>> > >
>> > > вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <pt...@apache.org>:
>> > >
>> > > > Igniters,
>> > > >
>> > > > This is a continuation of "Use Netty for Java thin client" [1],
>> > > > I'm starting a new thread for better visibility.
>> > > >
>> > > > The problems with current Java thin client are:
>> > > > * Socket writes block user threads
>> > > > * Every connection uses a separate listener thread (with partition
>> > > > awareness there is a thread for every server node within a single
>> > > > IgniteClient)
>> > > >
>> > > > GridNioServer can work in client mode and solves both of these
>> > problems.
>> > > > It is the most practical choice as well at the moment - no extra
>> > > > dependencies required.
>> > > >
>> > > > A potential drawback is increased coupling between thin client and
>> core
>> > > > code,
>> > > > which I'm going to mitigate by abstracting GridNioServer behind a
>> > simpler
>> > > > facade,
>> > > > so we can replace it with Netty or something else easier if we
>> decide
>> > to
>> > > > split the code.
>> > > >
>> > > > Thoughts, objections?
>> > > >
>> > > > [1]
>> > > >
>> > > >
>> > >
>> >
>> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
>> > > >
>> > >
>> >
>>
>>
>> --
>> Sincerely yours, Ivan Daschinskiy
>>
>

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Pavel Tupitsyn <pt...@apache.org>.
Since there are no objections, I've updated the IEP accordingly [1]
and started working on it [2]

[1]
https://cwiki.apache.org/confluence/display/IGNITE/IEP-60%3A+Java+Thin+Client+Non-Blocking+Async+IO
[2] https://github.com/apache/ignite/pull/8483

On Mon, Nov 9, 2020 at 4:07 PM Ivan Daschinsky <iv...@gmail.com> wrote:

> I suppose that the best variant -- ability to switch to netty if this lib
> is in classpath
>
> пн, 9 нояб. 2020 г. в 15:58, Igor Sapego <is...@apache.org>:
>
> > Sounds like a good idea to me.
> >
> > Best Regards,
> > Igor
> >
> >
> > On Mon, Nov 9, 2020 at 3:32 PM Alex Plehanov <pl...@gmail.com>
> > wrote:
> >
> > > +1 for using GridNioServer as java thin client communication layer.
> > >
> > > вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <pt...@apache.org>:
> > >
> > > > Igniters,
> > > >
> > > > This is a continuation of "Use Netty for Java thin client" [1],
> > > > I'm starting a new thread for better visibility.
> > > >
> > > > The problems with current Java thin client are:
> > > > * Socket writes block user threads
> > > > * Every connection uses a separate listener thread (with partition
> > > > awareness there is a thread for every server node within a single
> > > > IgniteClient)
> > > >
> > > > GridNioServer can work in client mode and solves both of these
> > problems.
> > > > It is the most practical choice as well at the moment - no extra
> > > > dependencies required.
> > > >
> > > > A potential drawback is increased coupling between thin client and
> core
> > > > code,
> > > > which I'm going to mitigate by abstracting GridNioServer behind a
> > simpler
> > > > facade,
> > > > so we can replace it with Netty or something else easier if we decide
> > to
> > > > split the code.
> > > >
> > > > Thoughts, objections?
> > > >
> > > > [1]
> > > >
> > > >
> > >
> >
> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
> > > >
> > >
> >
>
>
> --
> Sincerely yours, Ivan Daschinskiy
>

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Ivan Daschinsky <iv...@gmail.com>.
I suppose that the best variant -- ability to switch to netty if this lib
is in classpath

пн, 9 нояб. 2020 г. в 15:58, Igor Sapego <is...@apache.org>:

> Sounds like a good idea to me.
>
> Best Regards,
> Igor
>
>
> On Mon, Nov 9, 2020 at 3:32 PM Alex Plehanov <pl...@gmail.com>
> wrote:
>
> > +1 for using GridNioServer as java thin client communication layer.
> >
> > вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <pt...@apache.org>:
> >
> > > Igniters,
> > >
> > > This is a continuation of "Use Netty for Java thin client" [1],
> > > I'm starting a new thread for better visibility.
> > >
> > > The problems with current Java thin client are:
> > > * Socket writes block user threads
> > > * Every connection uses a separate listener thread (with partition
> > > awareness there is a thread for every server node within a single
> > > IgniteClient)
> > >
> > > GridNioServer can work in client mode and solves both of these
> problems.
> > > It is the most practical choice as well at the moment - no extra
> > > dependencies required.
> > >
> > > A potential drawback is increased coupling between thin client and core
> > > code,
> > > which I'm going to mitigate by abstracting GridNioServer behind a
> simpler
> > > facade,
> > > so we can replace it with Netty or something else easier if we decide
> to
> > > split the code.
> > >
> > > Thoughts, objections?
> > >
> > > [1]
> > >
> > >
> >
> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
> > >
> >
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Igor Sapego <is...@apache.org>.
Sounds like a good idea to me.

Best Regards,
Igor


On Mon, Nov 9, 2020 at 3:32 PM Alex Plehanov <pl...@gmail.com>
wrote:

> +1 for using GridNioServer as java thin client communication layer.
>
> вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <pt...@apache.org>:
>
> > Igniters,
> >
> > This is a continuation of "Use Netty for Java thin client" [1],
> > I'm starting a new thread for better visibility.
> >
> > The problems with current Java thin client are:
> > * Socket writes block user threads
> > * Every connection uses a separate listener thread (with partition
> > awareness there is a thread for every server node within a single
> > IgniteClient)
> >
> > GridNioServer can work in client mode and solves both of these problems.
> > It is the most practical choice as well at the moment - no extra
> > dependencies required.
> >
> > A potential drawback is increased coupling between thin client and core
> > code,
> > which I'm going to mitigate by abstracting GridNioServer behind a simpler
> > facade,
> > so we can replace it with Netty or something else easier if we decide to
> > split the code.
> >
> > Thoughts, objections?
> >
> > [1]
> >
> >
> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
> >
>

Re: [DISCUSS] Use GridNioServer in Java thin client

Posted by Alex Plehanov <pl...@gmail.com>.
+1 for using GridNioServer as java thin client communication layer.

вс, 8 нояб. 2020 г. в 19:12, Pavel Tupitsyn <pt...@apache.org>:

> Igniters,
>
> This is a continuation of "Use Netty for Java thin client" [1],
> I'm starting a new thread for better visibility.
>
> The problems with current Java thin client are:
> * Socket writes block user threads
> * Every connection uses a separate listener thread (with partition
> awareness there is a thread for every server node within a single
> IgniteClient)
>
> GridNioServer can work in client mode and solves both of these problems.
> It is the most practical choice as well at the moment - no extra
> dependencies required.
>
> A potential drawback is increased coupling between thin client and core
> code,
> which I'm going to mitigate by abstracting GridNioServer behind a simpler
> facade,
> so we can replace it with Netty or something else easier if we decide to
> split the code.
>
> Thoughts, objections?
>
> [1]
>
> http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-Use-Netty-for-Java-thin-client-td49732.html
>