You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by sushixiang <sh...@qq.com> on 2019/12/04 08:18:14 UTC
[ShardingScaling][Discuss] Http request APIS about shardingscaling
Hi, everybody:
Http request apis will be provided for shardingscaling to let people easily manager the scaling job.
Here are the definitions of such apis:
/shardingscaling/job/start [POST]
/shardingscaling/job/progress/${jobId} [GET]
/shardingscaling/job/stop [POST]
Above apis will be used for starting job, get job process and stop job respectively.
Here are the related issue and pr:
[1] https://github.com/apache/incubator-shardingsphere/issues/3256
[2] https://github.com/apache/incubator-shardingsphere/pull/3656
Comments or Suggestions on it are welcome!
Thanks!
Re: Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Posted by Zhiyi Yan <ca...@gmail.com>.
Hi,
I think he's just suggesting a API style, restful API treat jobs as a
resource, and do something to this resource.
Sion Yang <sc...@163.com> 于2019年12月5日周四 上午9:45写道:
> Agree. [PUT] /job/<job_id> with stop status in body is not as clear as
> using `stop` on uri directly, I think.
>
>
>
>
> --
>
> Yi Yang(Sion)
> Apache ShardingSphere
>
>
>
> At 2019-12-05 09:29:20, "sushixiang" <sh...@qq.com> wrote:
> >Hi, PUT may be used for modification, but we really not modify anything.
> And I think this may be not as straightforward as putting 'stop' in the
> url.What do you think?
> >
> >
> >
> >
> >
> >
> >------------------ Original ------------------
> >From: "xia Yanick"<yanick.xia@gmail.com>;
> >Date: Wed, Dec 4, 2019 05:10 PM
> >To: "dev"<dev@shardingsphere.apache.org>;
> >
> >Subject: Re: [ShardingScaling][Discuss] Http request APIS about
> shardingscaling
> >
> >
> >
> >HI Xiang:
> > how about that stop a job like:
> >
> > PUT /shardingscaling/job/<job_id>
> > Content-Type: application/json
> > Body: { "status": "stop" }
> >
> >
> >
> >> On Dec 4, 2019, at 17:05, sushixiang <shixiangsu@qq.com> wrote:
> >>
> >>
>
--
Zhiyi Yan (Zhyee)
Apache ShardingSphere
Re:Re: [ShardingScaling][Discuss] Http request APIS about
shardingscaling
Posted by Sion Yang <sc...@163.com>.
Agree. [PUT] /job/<job_id> with stop status in body is not as clear as using `stop` on uri directly, I think.
--
Yi Yang(Sion)
Apache ShardingSphere
At 2019-12-05 09:29:20, "sushixiang" <sh...@qq.com> wrote:
>Hi, PUT may be used for modification, but we really not modify anything. And I think this may be not as straightforward as putting 'stop' in the url.What do you think?
>
>
>
>
>
>
>------------------ Original ------------------
>From: "xia Yanick"<yanick.xia@gmail.com>;
>Date: Wed, Dec 4, 2019 05:10 PM
>To: "dev"<dev@shardingsphere.apache.org>;
>
>Subject: Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
>
>
>
>HI Xiang:
> how about that stop a job like:
>
> PUT /shardingscaling/job/<job_id>
> Content-Type: application/json
> Body: { "status": "stop" }
>
>
>
>> On Dec 4, 2019, at 17:05, sushixiang <shixiangsu@qq.com> wrote:
>>
>>
Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Posted by sushixiang <sh...@qq.com>.
Hi, PUT may be used for modification, but we really not modify anything. And I think this may be not as straightforward as putting 'stop' in the url.What do you think?
------------------ Original ------------------
From: "xia Yanick"<yanick.xia@gmail.com>;
Date: Wed, Dec 4, 2019 05:10 PM
To: "dev"<dev@shardingsphere.apache.org>;
Subject: Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
HI Xiang:
how about that stop a job like:
PUT /shardingscaling/job/<job_id>
Content-Type: application/json
Body: { "status": "stop" }
> On Dec 4, 2019, at 17:05, sushixiang <shixiangsu@qq.com> wrote:
>
>
Re: [ShardingScaling][Discuss] Http request APIS about
shardingscaling
Posted by xia Yanick <ya...@gmail.com>.
HI Xiang:
how about that stop a job like:
PUT /shardingscaling/job/<job_id>
Content-Type: application/json
Body: { "status": "stop" }
> On Dec 4, 2019, at 17:05, sushixiang <sh...@qq.com> wrote:
>
>
Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Posted by sushixiang <sh...@qq.com>.
Now, stop only means stop the job, function of resume job will be add later.
------------------ Original ------------------
From: "zhangliang@apache.org"<zhangliang@apache.org>;
Date: Wed, Dec 4, 2019 05:01 PM
To: "dev"<dev@shardingsphere.apache.org>;
Subject: Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Hi, Did the stop job mean we can resume the job, or just delete it forever?
------------------
Liang Zhang (John)
Apache ShardingSphere & Dubbo
sushixiang <shixiangsu@qq.com> 于2019年12月4日周三 下午4:42写道:
> Hi, xia Yanick:
>
>
> Stop api doesn't do a delete action, so we use [POST] and jobid will be
> transferd as request body.
> For others,Is it more readable to add such 'start', 'stop' or 'progress'?
>
>
>
>
> ------------------&nbsp;Original&nbsp;------------------
> From:&nbsp;"xia Yanick"<yanick.xia@gmail.com&gt;;
> Date:&nbsp;Wed, Dec 4, 2019 04:31 PM
> To:&nbsp;"dev"<dev@shardingsphere.apache.org&gt;;
>
> Subject:&nbsp;Re: [ShardingScaling][Discuss] Http request APIS about
> shardingscaling
>
>
>
> Hi Xiang:
> That's exactly what I needed,&nbsp; otherwise, do you want like a
> restful style?
>
> create a job:&nbsp;&nbsp;&nbsp;
> /shardingscaling/job/<job_id&gt; [POST]
> query a job status: /shardingscaling/job/<job_id&gt;
> [GET]
> stop a job /shardingscaling/job/<job_id&gt;
> [DELETE]
>
>
>
>
> &gt; On Dec 4, 2019, at 16:18, sushixiang <shixiangsu@qq.com&gt; wrote:
> &gt;
> &gt; Hi, everybody:
> &gt;
> &gt;
> &gt; Http request apis will be provided for shardingscaling to let people
> easily manager the scaling job.
> &gt;
> &gt;
> &gt; Here are the definitions of such apis:
> &gt;
> &gt;
> &gt; /shardingscaling/job/start [POST]
> &gt; /shardingscaling/job/progress/${jobId} [GET]
> &gt; /shardingscaling/job/stop [POST]
> &gt;
> &gt;
> &gt;
> &gt; Above apis will be used for starting job, get job process and stop
> job respectively.
> &gt;
> &gt;
> &gt; Here are the related issue and pr:
> &gt; [1] https://github.com/apache/incubator-shardingsphere/issues/3256
> &gt <https://github.com/apache/incubator-shardingsphere/issues/3256&gt>;
> [2] https://github.com/apache/incubator-shardingsphere/pull/3656
> &gt <https://github.com/apache/incubator-shardingsphere/pull/3656&gt>;
> &gt;
> &gt; Comments or Suggestions on it are welcome!&amp;nbsp;
> &gt;
> &gt;
> &gt;
> &gt; Thanks!
Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Posted by "zhangliang@apache.org" <zh...@apache.org>.
Hi, Did the stop job mean we can resume the job, or just delete it forever?
------------------
Liang Zhang (John)
Apache ShardingSphere & Dubbo
sushixiang <sh...@qq.com> 于2019年12月4日周三 下午4:42写道:
> Hi, xia Yanick:
>
>
> Stop api doesn't do a delete action, so we use [POST] and jobid will be
> transferd as request body.
> For others,Is it more readable to add such 'start', 'stop' or 'progress'?
>
>
>
>
> ------------------ Original ------------------
> From: "xia Yanick"<yanick.xia@gmail.com>;
> Date: Wed, Dec 4, 2019 04:31 PM
> To: "dev"<dev@shardingsphere.apache.org>;
>
> Subject: Re: [ShardingScaling][Discuss] Http request APIS about
> shardingscaling
>
>
>
> Hi Xiang:
> That's exactly what I needed, otherwise, do you want like a
> restful style?
>
> create a job:
> /shardingscaling/job/<job_id> [POST]
> query a job status: /shardingscaling/job/<job_id>
> [GET]
> stop a job /shardingscaling/job/<job_id>
> [DELETE]
>
>
>
>
> > On Dec 4, 2019, at 16:18, sushixiang <shixiangsu@qq.com> wrote:
> >
> > Hi, everybody:
> >
> >
> > Http request apis will be provided for shardingscaling to let people
> easily manager the scaling job.
> >
> >
> > Here are the definitions of such apis:
> >
> >
> > /shardingscaling/job/start [POST]
> > /shardingscaling/job/progress/${jobId} [GET]
> > /shardingscaling/job/stop [POST]
> >
> >
> >
> > Above apis will be used for starting job, get job process and stop
> job respectively.
> >
> >
> > Here are the related issue and pr:
> > [1] https://github.com/apache/incubator-shardingsphere/issues/3256
> > <https://github.com/apache/incubator-shardingsphere/issues/3256>>;
> [2] https://github.com/apache/incubator-shardingsphere/pull/3656
> > <https://github.com/apache/incubator-shardingsphere/pull/3656>>;
> >
> > Comments or Suggestions on it are welcome!&nbsp;
> >
> >
> >
> > Thanks!
Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Posted by sushixiang <sh...@qq.com>.
Hi, xia Yanick:
Stop api doesn't do a delete action, so we use [POST] and jobid will be transferd as request body.
For others,Is it more readable to add such 'start', 'stop' or 'progress'?
------------------ Original ------------------
From: "xia Yanick"<yanick.xia@gmail.com>;
Date: Wed, Dec 4, 2019 04:31 PM
To: "dev"<dev@shardingsphere.apache.org>;
Subject: Re: [ShardingScaling][Discuss] Http request APIS about shardingscaling
Hi Xiang:
That's exactly what I needed, otherwise, do you want like a restful style?
create a job: /shardingscaling/job/<job_id> [POST]
query a job status: /shardingscaling/job/<job_id> [GET]
stop a job /shardingscaling/job/<job_id> [DELETE]
> On Dec 4, 2019, at 16:18, sushixiang <shixiangsu@qq.com> wrote:
>
> Hi, everybody:
>
>
> Http request apis will be provided for shardingscaling to let people easily manager the scaling job.
>
>
> Here are the definitions of such apis:
>
>
> /shardingscaling/job/start [POST]
> /shardingscaling/job/progress/${jobId} [GET]
> /shardingscaling/job/stop [POST]
>
>
>
> Above apis will be used for starting job, get job process and stop job respectively.
>
>
> Here are the related issue and pr:
> [1] https://github.com/apache/incubator-shardingsphere/issues/3256
> [2] https://github.com/apache/incubator-shardingsphere/pull/3656
>
>
> Comments or Suggestions on it are welcome!&nbsp;
>
>
>
> Thanks!
Re:Re: [ShardingScaling][Discuss] Http request APIS about
shardingscaling
Posted by Sion Yang <sc...@163.com>.
When create job, the job_id do not generate, so can't input <job_id>.
Progress is part information of job, so I think progress word show in url is better.
--
Yi Yang(Sion)
Apache ShardingSphere
At 2019-12-04 16:31:34, "xia Yanick" <ya...@gmail.com> wrote:
>Hi Xiang:
> That's exactly what I needed, otherwise, do you want like a restful style?
>
> create a job: /shardingscaling/job/<job_id> [POST]
> query a job status: /shardingscaling/job/<job_id> [GET]
> stop a job /shardingscaling/job/<job_id> [DELETE]
>
>
>
>
>> On Dec 4, 2019, at 16:18, sushixiang <sh...@qq.com> wrote:
>>
>> Hi, everybody:
>>
>>
>> Http request apis will be provided for shardingscaling to let people easily manager the scaling job.
>>
>>
>> Here are the definitions of such apis:
>>
>>
>> /shardingscaling/job/start [POST]
>> /shardingscaling/job/progress/${jobId} [GET]
>> /shardingscaling/job/stop [POST]
>>
>>
>>
>> Above apis will be used for starting job, get job process and stop job respectively.
>>
>>
>> Here are the related issue and pr:
>> [1] https://github.com/apache/incubator-shardingsphere/issues/3256
>> [2] https://github.com/apache/incubator-shardingsphere/pull/3656
>>
>>
>> Comments or Suggestions on it are welcome!
>>
>>
>>
>> Thanks!
>
Re: [ShardingScaling][Discuss] Http request APIS about
shardingscaling
Posted by xia Yanick <ya...@gmail.com>.
Hi Xiang:
That's exactly what I needed, otherwise, do you want like a restful style?
create a job: /shardingscaling/job/<job_id> [POST]
query a job status: /shardingscaling/job/<job_id> [GET]
stop a job /shardingscaling/job/<job_id> [DELETE]
> On Dec 4, 2019, at 16:18, sushixiang <sh...@qq.com> wrote:
>
> Hi, everybody:
>
>
> Http request apis will be provided for shardingscaling to let people easily manager the scaling job.
>
>
> Here are the definitions of such apis:
>
>
> /shardingscaling/job/start [POST]
> /shardingscaling/job/progress/${jobId} [GET]
> /shardingscaling/job/stop [POST]
>
>
>
> Above apis will be used for starting job, get job process and stop job respectively.
>
>
> Here are the related issue and pr:
> [1] https://github.com/apache/incubator-shardingsphere/issues/3256
> [2] https://github.com/apache/incubator-shardingsphere/pull/3656
>
>
> Comments or Suggestions on it are welcome!
>
>
>
> Thanks!