What SOA architecture?

https://blog.csdn.net/u013343616/article/details/79460398

 

What SOA is? SOA is in English Service-Oriented Architecture, Chinese meant Chinese service-oriented programming, it is an idea, a methodology, a distributed services architecture (specifically Baidu).

     Uses: SOA to solve the messy problem of multi-service, SOA architecture to address the complexity of data services, while SOA have a name, called service governance.

     We look through a system architecture evolution (Distributed by the unification to):

   

        When our project is relatively small, we have only one system, and writes them together, on a server, but as more and more platforms, increasing amount of data, we have to go through sub-libraries, the multi database modules are placed on the corresponding server too, each module can call your own subsystem.

     

     With prompt further complexity of our system, we have to further improve the performance of the system, we have multiple modules into multiple subsystems, multiple subsystems directly call each other (because SOA is generally used for large-scale projects, more complex, it is generally the total system will not be integrated, multiple splits were made services, call each other). When our electricity supplier UI task orders under a multiple service calls directly to each other via a data bus system, subsystem can call for, respectively.

     Enterprise Data Bus: enterprise data bus is not a module integrates multiple sub, where he serves as a role data channel, the data bus do not care about business, data bus according to the address and protocol to transfer service, the top do not care where the service is what is , only to find the data bus.

     Above several figures should be relatively clear, with in-depth business, we had to adjust the system, namely the split of the data and services, across from the end of each subsystem to provide services.

     Also mentioning point is below that figure, the following IP libraries and subsystems are several public service functions are provided upward, it is also part of SOA methodology.

Two, the SOA primary usage scenarios, as shown below:

   

通过上面的图我们可以看出,多个子系统直接相互交互,相互调用非常凌乱,这样我们就很不爽,所以我们就用到了我们的SOA架构,SOA又叫服务治理,SOA就是帮助我们把服务之间调用的乱七八糟的关系给治理起来,然后提供一个统一的标准,把我们的服务治理成下图所示,以前我们的服务是互相交互,现在是只对数据总线进行交互,这样系统就变得统一起来。

统一标准:各系统的协议、地址、交互方式。

新的交互方式:各个系统分别根据统一标准向数据总线进行注册,各子系统调用其他子系统时,我们并不关心如果找到其他子系统,我们只招数据总线,数据总线再根据统一标准找其他子系统,所以数据总线在这里充当一个只路人的作用。

SOA的好处:

  1、降低用户成本,用户不需要关心各服务之间是什么语言的、不需要知道如果调用他们,只要通过统一标准找数据总线就可以了。

 2、程序之间关系服务简单

 3、识别哪些程序有问题(挂掉)

缺点:提示了系统的复杂程度,性能有相应影响。

三、数据总线是什么?

      其实我在上面写了,数据总线是起到调度服务的作用,数据总线不是集成服务,数据总线更新一个调度框架,每个服务需要根据约定向数据总线注册服务,那么如何注册那?其实数据总线就像一个字典结构,

      数据总线里面一个key对于一个value,key指的是服务名,value则是服务的调度方式,还有一点需要说明的是,数据总线只是指路人,服务是不经过数据总线的,如上图的黄色线的路径。

     数据总线通过域名解析实现:一个域名绑定多台服务器,ajax也可以,dns也可以,解析域名嘛。

     其实数据总线还有一些高级应用,比如心跳检测,实现负载均衡等等,就不细说了,目前应用数据总线的有阿里的dubbo,还有zookeeper。

     

Guess you like

Origin www.cnblogs.com/mark5/p/11655427.html