You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dolphinscheduler.apache.org by Sheng Wu <wu...@gmail.com> on 2020/02/27 03:12:51 UTC

Re: [Proposal] ApiServer interface transform to Resutful api

Where are these API for? Take a look at GraphQL, GitHub and many systems
are using this kind of design.
Personally, I like it, and SkyWalking has used it for several years and
works well.

Sheng Wu 吴晟
Twitter, wusheng1108


qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:10写道:

> Hello ALL :
>
> 1,Query parameters must be encapsulated by the entity class, otherwise,
> once there are many parameters, too many method parameters
>
> 2,interface can support GET,POST,PUT,DELETE request,each interface resource
> path can support four types of requests
>
> Thx
>
> ________________________________
>
> Best Regards
> ---------------
> DolphinScheduler(Incubator) PPMC
> Zhanwei Qiao 乔占卫
> qiaozhanwei@outlook.com<ma...@outlook.com>
> ---------------
>

Re: Re: [Proposal] ApiServer interface transform to Resutful api

Posted by Wu Baoqi <wu...@gmail.com>.
But anyway,  the case "firewall blocks HTTP DELETE/PUT" should  be rare
(only happens in some big old company), so, I don't "-1" for change REST
API to 4 HTTP API, I think both way will be fine.   Also, I think graphql
is good, we may take a look.

On Thu, Feb 27, 2020 at 2:53 PM Wu Baoqi <wu...@gmail.com> wrote:

> Hi, Zhanwei,
>     About "interface can support GET,POST,PUT,DELETE request,each
> interface resource path can support four types of requests", I think just
> keep the current GET/POST is also fine. Although it seems use 4 HTTP
> operations seems match to CRUD, and a little more RESTful.  But some
> company's Firewall blocks HTTP DELETE and PUT totally, I encountered this
> situation before. So, we may also consider the real benefit of changing all
> existing REST API currently
>
> Thanks,
> Baoqi
>
> On Thu, Feb 27, 2020 at 1:55 PM Sheng Wu <wu...@gmail.com>
> wrote:
>
>> Your posted link is not SkyWalking protocol. This is,
>> https://github.com/apache/skywalking-query-protocol, pre-definition,
>> value
>> verification, type sensitive, object-oriented.
>>
>> Sheng Wu 吴晟
>> Twitter, wusheng1108
>>
>>
>> qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:36写道:
>>
>> > no problem,but Restful Api may be more regulated
>> >
>> > I took a look skywalking and shardingsphere interface , shardingsphere
>> > interface is Resutful api ,skywalking part is ,for
>> >
>> >
>> https://github.com/apache/skywalking/blob/master/test/plugin/scenarios/feign-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestController.java
>> >
>> > main thing is that the query conditions of DS are not encapsulated. If
>> > there are too many request parameters, the interface will appear
>> bloated.
>> >
>> >
>> > ________________________________
>> >
>> > Best Regards
>> > ---------------
>> > DolphinScheduler(Incubator) PPMC
>> > Zhanwei Qiao 乔占卫
>> > qiaozhanwei@outlook.com<ma...@outlook.com>
>> > ---------------
>> >
>> > From: Sheng Wu<ma...@gmail.com>
>> > Date: 2020-02-27 11:12
>> > To: dev<ma...@dolphinscheduler.apache.org>
>> > Subject: Re: [Proposal] ApiServer interface transform to Resutful api
>> > Where are these API for? Take a look at GraphQL, GitHub and many systems
>> > are using this kind of design.
>> > Personally, I like it, and SkyWalking has used it for several years and
>> > works well.
>> >
>> > Sheng Wu 吴晟
>> > Twitter, wusheng1108
>> >
>> >
>> > qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:10写道:
>> >
>> > > Hello ALL :
>> > >
>> > > 1,Query parameters must be encapsulated by the entity class,
>> otherwise,
>> > > once there are many parameters, too many method parameters
>> > >
>> > > 2,interface can support GET,POST,PUT,DELETE request,each interface
>> > resource
>> > > path can support four types of requests
>> > >
>> > > Thx
>> > >
>> > > ________________________________
>> > >
>> > > Best Regards
>> > > ---------------
>> > > DolphinScheduler(Incubator) PPMC
>> > > Zhanwei Qiao 乔占卫
>> > > qiaozhanwei@outlook.com<ma...@outlook.com>
>> > > ---------------
>> > >
>> >
>>
>

Re: Re: [Proposal] ApiServer interface transform to Resutful api

Posted by Wu Baoqi <wu...@gmail.com>.
Hi, Zhanwei,
    About "interface can support GET,POST,PUT,DELETE request,each interface
resource path can support four types of requests", I think just keep the
current GET/POST is also fine. Although it seems use 4 HTTP operations
seems match to CRUD, and a little more RESTful.  But some company's
Firewall blocks HTTP DELETE and PUT totally, I encountered this situation
before. So, we may also consider the real benefit of changing all existing
REST API currently

Thanks,
Baoqi

On Thu, Feb 27, 2020 at 1:55 PM Sheng Wu <wu...@gmail.com> wrote:

> Your posted link is not SkyWalking protocol. This is,
> https://github.com/apache/skywalking-query-protocol, pre-definition, value
> verification, type sensitive, object-oriented.
>
> Sheng Wu 吴晟
> Twitter, wusheng1108
>
>
> qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:36写道:
>
> > no problem,but Restful Api may be more regulated
> >
> > I took a look skywalking and shardingsphere interface , shardingsphere
> > interface is Resutful api ,skywalking part is ,for
> >
> >
> https://github.com/apache/skywalking/blob/master/test/plugin/scenarios/feign-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestController.java
> >
> > main thing is that the query conditions of DS are not encapsulated. If
> > there are too many request parameters, the interface will appear bloated.
> >
> >
> > ________________________________
> >
> > Best Regards
> > ---------------
> > DolphinScheduler(Incubator) PPMC
> > Zhanwei Qiao 乔占卫
> > qiaozhanwei@outlook.com<ma...@outlook.com>
> > ---------------
> >
> > From: Sheng Wu<ma...@gmail.com>
> > Date: 2020-02-27 11:12
> > To: dev<ma...@dolphinscheduler.apache.org>
> > Subject: Re: [Proposal] ApiServer interface transform to Resutful api
> > Where are these API for? Take a look at GraphQL, GitHub and many systems
> > are using this kind of design.
> > Personally, I like it, and SkyWalking has used it for several years and
> > works well.
> >
> > Sheng Wu 吴晟
> > Twitter, wusheng1108
> >
> >
> > qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:10写道:
> >
> > > Hello ALL :
> > >
> > > 1,Query parameters must be encapsulated by the entity class, otherwise,
> > > once there are many parameters, too many method parameters
> > >
> > > 2,interface can support GET,POST,PUT,DELETE request,each interface
> > resource
> > > path can support four types of requests
> > >
> > > Thx
> > >
> > > ________________________________
> > >
> > > Best Regards
> > > ---------------
> > > DolphinScheduler(Incubator) PPMC
> > > Zhanwei Qiao 乔占卫
> > > qiaozhanwei@outlook.com<ma...@outlook.com>
> > > ---------------
> > >
> >
>

Re: Re: [Proposal] ApiServer interface transform to Resutful api

Posted by Sheng Wu <wu...@gmail.com>.
Your posted link is not SkyWalking protocol. This is,
https://github.com/apache/skywalking-query-protocol, pre-definition, value
verification, type sensitive, object-oriented.

Sheng Wu 吴晟
Twitter, wusheng1108


qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:36写道:

> no problem,but Restful Api may be more regulated
>
> I took a look skywalking and shardingsphere interface , shardingsphere
> interface is Resutful api ,skywalking part is ,for
>
> https://github.com/apache/skywalking/blob/master/test/plugin/scenarios/feign-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestController.java
>
> main thing is that the query conditions of DS are not encapsulated. If
> there are too many request parameters, the interface will appear bloated.
>
>
> ________________________________
>
> Best Regards
> ---------------
> DolphinScheduler(Incubator) PPMC
> Zhanwei Qiao 乔占卫
> qiaozhanwei@outlook.com<ma...@outlook.com>
> ---------------
>
> From: Sheng Wu<ma...@gmail.com>
> Date: 2020-02-27 11:12
> To: dev<ma...@dolphinscheduler.apache.org>
> Subject: Re: [Proposal] ApiServer interface transform to Resutful api
> Where are these API for? Take a look at GraphQL, GitHub and many systems
> are using this kind of design.
> Personally, I like it, and SkyWalking has used it for several years and
> works well.
>
> Sheng Wu 吴晟
> Twitter, wusheng1108
>
>
> qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:10写道:
>
> > Hello ALL :
> >
> > 1,Query parameters must be encapsulated by the entity class, otherwise,
> > once there are many parameters, too many method parameters
> >
> > 2,interface can support GET,POST,PUT,DELETE request,each interface
> resource
> > path can support four types of requests
> >
> > Thx
> >
> > ________________________________
> >
> > Best Regards
> > ---------------
> > DolphinScheduler(Incubator) PPMC
> > Zhanwei Qiao 乔占卫
> > qiaozhanwei@outlook.com<ma...@outlook.com>
> > ---------------
> >
>

Re: Re: [Proposal] ApiServer interface transform to Resutful api

Posted by qiao zhanwei <qi...@outlook.com>.
no problem,but Restful Api may be more regulated

I took a look skywalking and shardingsphere interface , shardingsphere  interface is Resutful api ,skywalking part is ,for
https://github.com/apache/skywalking/blob/master/test/plugin/scenarios/feign-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestController.java

main thing is that the query conditions of DS are not encapsulated. If there are too many request parameters, the interface will appear bloated.


________________________________

Best Regards
---------------
DolphinScheduler(Incubator) PPMC
Zhanwei Qiao 乔占卫
qiaozhanwei@outlook.com<ma...@outlook.com>
---------------

From: Sheng Wu<ma...@gmail.com>
Date: 2020-02-27 11:12
To: dev<ma...@dolphinscheduler.apache.org>
Subject: Re: [Proposal] ApiServer interface transform to Resutful api
Where are these API for? Take a look at GraphQL, GitHub and many systems
are using this kind of design.
Personally, I like it, and SkyWalking has used it for several years and
works well.

Sheng Wu 吴晟
Twitter, wusheng1108


qiao zhanwei <qi...@outlook.com> 于2020年2月27日周四 上午11:10写道:

> Hello ALL :
>
> 1,Query parameters must be encapsulated by the entity class, otherwise,
> once there are many parameters, too many method parameters
>
> 2,interface can support GET,POST,PUT,DELETE request,each interface resource
> path can support four types of requests
>
> Thx
>
> ________________________________
>
> Best Regards
> ---------------
> DolphinScheduler(Incubator) PPMC
> Zhanwei Qiao 乔占卫
> qiaozhanwei@outlook.com<ma...@outlook.com>
> ---------------
>