The old API work as a proxy which is much same as the Sharding-Sphere does.
BTW, Current old saga core can work without Spring.


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Mon, Jul 2, 2018 at 11:01 PM, Zheng Feng <zh.f...@gmail.com> wrote:

> Hi,
>
> It should be great to integrate with the Sharding-Sphere and the
> ServiceComb Saga. I just wonder why it is a proposal to the *old* saga api
> design ? I think we could consider the current Omega and the Alpha
> implementation which used the Java annotations. Maybe you do not want to
> use the spring-boot framework ?
>
> Thanks,
> Amos Feng
>
> 2018-07-02 21:51 GMT+08:00 张永伦 <15810310...@163.com>:
>
> > Hi all,
> >
> >
> > I'm a developer from Sharding-Sphere(https://github.com/sharding-sphere
> ).
> > I'd like to make a proposal on integrating Sharding-Sphere(SS) with Saga.
> >
> >
> > SS starts a transaction via Saga API(https://github.com/apache/
> > incubator-servicecomb-saga/blob/old-saga/docs/api/api.md). The API looks
> > like this:
> > {
> >   "policy": "",
> >   "requests": [
> >     {
> >       "id": "",
> >       "type": "",
> >       "serviceName": "",
> >       "parents": [
> >
> >       ],
> >       "transaction": {
> >         "method": "",
> >         "path": "",
> >         "params": {
> >
> >         }
> >       },
> >       "compensation": {
> >         "method": "",
> >         "path": "",
> >         "params": {
> >
> >         }
> >       }
> >     }
> >   ]
> > }
> > Logic SQLs in a SS transaction will be treated as one Saga Request
> > separately. Users of SS should supply the compensatory SQLs
> correspondingly:
> > transaction:
> > INSERT INTO `t_order` (`order_id`, `user_id`, `status`) VALUES (?, '10',
> > 'INIT');
> > compensation:
> > DELETE FROM `t_order` WHERE `order_id`=?;
> >
> >
> > SS need to implement method of both transaction and compensation for
> Saga.
> > The path parameter seems to have no use for SS, and should be ignored.
> >
> >
> > The content of params should include SQL and the parameter of SQL, may
> > implement by currently form parameters.
> >
> >
> > At last, id and serviceName will be generated by SS uniquely. Saga can
> use
> > these identifier to find transactions.
> >
> >
> >
> >
> > Thanks,
> > Zhang Yonglun
>

Reply via email to