You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by Weijie Wu <wu...@qq.com> on 2020/08/01 04:03:11 UTC
Re: [ElasticJob] Discuss about use RESTful API or socket for
elasticjob's remote API
Using socket like SnapshotService is convenient for command line interface.
But there are too many APIs in elasticjob-cloud-scheduler. It's not easy
to keep the commands as simple as {echo 'dump@jobName' | nc IP port}.
And I think it's unnecessary to define a new format of commands.
The gRPC transfer data using ProfoBuf, which is unfriendly for "nc" or
"telnet" because of binary transmission. It requires user to get a tool
which supports ProfoBuf.
RESTful is widely used, such as Docker, Kubernetes, Elasticsearch...
And we can still using "telnet" or "nc" like {echo "GET /api/job/list
HTTP/1.1\n" | nc IP port}.
We can refactor cloud-scheduler with Netty-HTTP, which is more lighter
than Spring Boot technology stack.
In my opinion, RESTful is almost the best choice for
elasticjob-cloud-scheduler.
Sincerely,
Weijie Wu (TeslaCN)
On 2020/07/31 05:48:53, "z...@apache.org" wrote:
> How about using gRPC for remote API only?>
>
> ------------------>
>
> Sincerely,>
> Liang Zhang (John)>
> Apache ShardingSphere>
>
>
> Sheng Wu 于2020年7月31日周五 下午1:09写道:>
>
> > For more cloud natively, gRPC and GraphQL are much better than either>
> > private tcp/socket or rest.>
> > Also, today, CLI is the real solution for communicating with
platform like>
> > k8s.>
> >>
> > Sheng Wu 吴晟>
> > Twitter, wusheng1108>
> >>
> >>
> > guo jiwei 于2020年7月31日周五 下午12:30写道:>
> >>
> > > Hi,>
> > > I think we'd better support both of them.>
> > > Kernel-level API can trace or dump data to monitor ElasticJob and
make>
> > > it more friendly to reliability and stability.>
> > > And high level can provide more base functional operations for
users.>
> > >>
> > > Regards>
> > > Jiwei Guo (Tboy)>
> > >>
> > >>
> > > On Fri, Jul 31, 2020 at 12:02 PM zhangliang@apache.org <>
> > > zhangliang@apache.org> wrote:>
> > >>
> > > > Hi all,>
> > > >>
> > > > The current elasticjob's remote API used RESTful API for cloud
and>
> > socket>
> > > > for lite, they are in-consist for now.>
> > > >>
> > > > I'd like to discuss how to deal with the remote APIs?>
> > > >>
> > > > Choose socket or RESTful only, or both?>
> > > >>
> > > > If both, we can design for the socket (used with nc or telnet)
for>
> > > > kernel-level remote API, and add a additional module for
RESTful API>
> > for>
> > > > high level usage.>
> > > >>
> > > > Any suggestions?>
> > > >>
> > > > ------------------>
> > > >>
> > > > Sincerely,>
> > > > Liang Zhang (John)>
> > > > Apache ShardingSphere>
> > > >>
> > >>
> >>
>