You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by wjm wjm <zz...@gmail.com> on 2020/05/22 09:32:20 UTC

[disscuss][java-chassis] provide new mechanism: Filter, which can replace old extensions

please read content in:  https://issues.apache.org/jira/browse/SCB-1929#

Re: [disscuss][java-chassis] provide new mechanism: Filter, which can replace old extensions

Posted by wjm wjm <zz...@gmail.com>.
another way is not conside compatible
old project use old extensions, but we mark old extensions deprecated, and
delete them after months
new project use new filter extension

wjm wjm <zz...@gmail.com> 于2020年5月26日周二 上午9:39写道:

> in compatible mode, default filter chain is:
>
> servicecomb:
>   filter-chains:
>     enabled: true
>     producer:
>       rest:
>         default: schedule, http-server-filters, handlers
>
>
> in this chains:
> 1. http-server-filters wrap all old http server filters, their execute
> logic same to old version
> 2. handlers wrap old handler chain, their execute logic same to old version
>
>
> Willem Jiang <wi...@gmail.com> 于2020年5月26日周二 上午8:06写道:
>
>> It looks like the handlers are assembled in the filter chain in the
>> WrapHandlersToFilter class.
>> How can we setup the order between the filter and handler?
>>
>> Willem Jiang
>>
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Mon, May 25, 2020 at 3:37 PM wjm wjm <zz...@gmail.com> wrote:
>> >
>> > thanks for the reply,
>> >
>> > for your question, the wrapper maybe like:
>> >
>> > class WrapHandlersToFilter implements Filter{
>> >   private List<Handler> handlers;
>> >
>> >   public CompletableFuture<Response> onFilter(Invocation invocation,
>> > FilterNode nextNode) {
>> >     process all handler
>> >   }
>> > }
>> >
>> >
>> >
>> > the priority of filters, is their order in the configuration.
>> >
>> > and i update the configuration description, make it simpler.
>> >
>> > Willem Jiang <wi...@gmail.com> 于2020年5月23日周六 上午10:04写道:
>> >
>> > > Hi wjm,
>> > >
>> > > It's great that we can keep polishing the ServiceComb Java-Chassis.
>> > > I just add a comment by asking some question about this new feature
>> on the
>> > > JIRA.
>> > >
>> > > Willem Jiang
>> > >
>> > > Twitter: willemjiang
>> > > Weibo: 姜宁willem
>> > >
>> > > On Fri, May 22, 2020 at 5:32 PM wjm wjm <zz...@gmail.com> wrote:
>> > > >
>> > > > please read content in:
>> https://issues.apache.org/jira/browse/SCB-1929#
>> > >
>>
>

Re: [disscuss][java-chassis] provide new mechanism: Filter, which can replace old extensions

Posted by wjm wjm <zz...@gmail.com>.
in compatible mode, default filter chain is:

servicecomb:
  filter-chains:
    enabled: true
    producer:
      rest:
        default: schedule, http-server-filters, handlers


in this chains:
1. http-server-filters wrap all old http server filters, their execute
logic same to old version
2. handlers wrap old handler chain, their execute logic same to old version


Willem Jiang <wi...@gmail.com> 于2020年5月26日周二 上午8:06写道:

> It looks like the handlers are assembled in the filter chain in the
> WrapHandlersToFilter class.
> How can we setup the order between the filter and handler?
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Mon, May 25, 2020 at 3:37 PM wjm wjm <zz...@gmail.com> wrote:
> >
> > thanks for the reply,
> >
> > for your question, the wrapper maybe like:
> >
> > class WrapHandlersToFilter implements Filter{
> >   private List<Handler> handlers;
> >
> >   public CompletableFuture<Response> onFilter(Invocation invocation,
> > FilterNode nextNode) {
> >     process all handler
> >   }
> > }
> >
> >
> >
> > the priority of filters, is their order in the configuration.
> >
> > and i update the configuration description, make it simpler.
> >
> > Willem Jiang <wi...@gmail.com> 于2020年5月23日周六 上午10:04写道:
> >
> > > Hi wjm,
> > >
> > > It's great that we can keep polishing the ServiceComb Java-Chassis.
> > > I just add a comment by asking some question about this new feature on
> the
> > > JIRA.
> > >
> > > Willem Jiang
> > >
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> > > On Fri, May 22, 2020 at 5:32 PM wjm wjm <zz...@gmail.com> wrote:
> > > >
> > > > please read content in:
> https://issues.apache.org/jira/browse/SCB-1929#
> > >
>

Re: [disscuss][java-chassis] provide new mechanism: Filter, which can replace old extensions

Posted by Willem Jiang <wi...@gmail.com>.
It looks like the handlers are assembled in the filter chain in the
WrapHandlersToFilter class.
How can we setup the order between the filter and handler?

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Mon, May 25, 2020 at 3:37 PM wjm wjm <zz...@gmail.com> wrote:
>
> thanks for the reply,
>
> for your question, the wrapper maybe like:
>
> class WrapHandlersToFilter implements Filter{
>   private List<Handler> handlers;
>
>   public CompletableFuture<Response> onFilter(Invocation invocation,
> FilterNode nextNode) {
>     process all handler
>   }
> }
>
>
>
> the priority of filters, is their order in the configuration.
>
> and i update the configuration description, make it simpler.
>
> Willem Jiang <wi...@gmail.com> 于2020年5月23日周六 上午10:04写道:
>
> > Hi wjm,
> >
> > It's great that we can keep polishing the ServiceComb Java-Chassis.
> > I just add a comment by asking some question about this new feature on the
> > JIRA.
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Fri, May 22, 2020 at 5:32 PM wjm wjm <zz...@gmail.com> wrote:
> > >
> > > please read content in:  https://issues.apache.org/jira/browse/SCB-1929#
> >

Re: [disscuss][java-chassis] provide new mechanism: Filter, which can replace old extensions

Posted by wjm wjm <zz...@gmail.com>.
thanks for the reply,

for your question, the wrapper maybe like:

class WrapHandlersToFilter implements Filter{
  private List<Handler> handlers;

  public CompletableFuture<Response> onFilter(Invocation invocation,
FilterNode nextNode) {
    process all handler
  }
}



the priority of filters, is their order in the configuration.

and i update the configuration description, make it simpler.

Willem Jiang <wi...@gmail.com> 于2020年5月23日周六 上午10:04写道:

> Hi wjm,
>
> It's great that we can keep polishing the ServiceComb Java-Chassis.
> I just add a comment by asking some question about this new feature on the
> JIRA.
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Fri, May 22, 2020 at 5:32 PM wjm wjm <zz...@gmail.com> wrote:
> >
> > please read content in:  https://issues.apache.org/jira/browse/SCB-1929#
>

Re: [disscuss][java-chassis] provide new mechanism: Filter, which can replace old extensions

Posted by Willem Jiang <wi...@gmail.com>.
Hi wjm,

It's great that we can keep polishing the ServiceComb Java-Chassis.
I just add a comment by asking some question about this new feature on the JIRA.

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Fri, May 22, 2020 at 5:32 PM wjm wjm <zz...@gmail.com> wrote:
>
> please read content in:  https://issues.apache.org/jira/browse/SCB-1929#