Git Product home page Git Product logo

Comments (7)

yedf2 avatar yedf2 commented on August 18, 2024

说明一下,dtm和seata有很大不同,dtm一开始就支持HTTP/gRPC这类对云原生友好的协议,dtm本身完全不需要注册中心。因此dtm可以很好的与K8S结合在一起,把dtm当做一个普通的HTTP/gRPC服务进行部署,设定副本数就具备了高可用。

dtm同时也支持微服务协议,例如go-zero,kratos,dapr,以及其他的,对这些微服务协议的支持都在驱动层完成。这些微服务协议支持哪些注册中心,那么dtm就直接支持,直接使用。业务使用时,只需要加载相关的驱动即可。

from dtm.pub.

bilinxing avatar bilinxing commented on August 18, 2024

如果使用的是内部自研的微服务框架,想要把dtm注册到consul、nacos等注册中心,在不改动dtm源码的前提下是否可行?

from dtm.pub.

yedf2 avatar yedf2 commented on August 18, 2024

那么这就相当于让dtm多支持一种微服务协议,过程是,写好了dtmdriver-微服务 驱动之后,提一个PR(一行代码,加载驱动)到dtm,这样就行了。

参考go-zero和kratos等驱动是如何编写的

from dtm.pub.

bilinxing avatar bilinxing commented on August 18, 2024

是不是可以提供更友好方式?比如kratos的服务注册可以按照提供的interface自行实现具体的注册逻辑,然后替换到默认的注册实现,这样服务注册就跟框架自身解耦,就不用往框架仓库提交代码。

from dtm.pub.

yedf2 avatar yedf2 commented on August 18, 2024

你再想想,你业务的代码能否跟微服务框架无关?能否今天用你自研的微服务框架,改天用另一个框架go-zero,然后都不需要重新编译?
dtm要支持一个新的微服务协议,一行代码不改,不重新编译,那么新的微服务协议的逻辑,怎么进入dtm呢?

from dtm.pub.

bilinxing avatar bilinxing commented on August 18, 2024

我先研究下go-zero和kratos的驱动。或许可以实现dtmdriver-consul 、dtmdriver-nacos、dtmdriver-etcd等注册中心的驱动,毕竟使用java的,只是想要把dtm的服务做一个服务发现,发现dtm的http、grpc调用地址

from dtm.pub.

yedf2 avatar yedf2 commented on August 18, 2024

go-zero - etcd 跟 kratos-etcd是不一样的,无法一个dtmdriver-etcd同时支持go-zero和kratos

from dtm.pub.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.