简体   繁体   English

什么是面向服务的架构?

[英]What is service-oriented architecture?

什么是面向服务的架构?

SOA is way to develop service oriented applications and WCF is technology which can be used to develop service oriented applications. SOA是开发面向服务的应用程序的方法,WCF是可用于开发面向服务的应用程序的技术。 BUT SOA defines strict rules (known as SOA tenets) for applications. 但SOA为应用程序定义了严格的规则(称为SOA原则)。 If you don't follow these rules you are building services but these services do not conform to SOA. 如果您不遵循这些规则,那么您正在构建服务,但这些服务不符合SOA。

WCF allows you to develop plenty of types of services. WCF允许您开发大量类型的服务。 You can develop interoperable SOAP services which conform to SOA or which doesn't. 您可以开发符合SOA或不符合SOA的可互操作SOAP服务。 You can develop pure .NET services with non interoperable features and you can develop REST services. 您可以使用不可互操作的功能开发纯.NET服务,并且可以开发REST服务。

Moreover in SOA service can have different meaning than in WCF. 此外,在SOA服务中可以具有与WCF不同的含义。 In WCF service is collection of functionality exposed on endpoints. 在WCF中,服务是端点上公开的功能集合。 In SOA the service can be whole application (set of WCF like services) - difference between small and big SOA. 在SOA中,服务可以是整个应用程序(WCF集合服务) - 小型和大型SOA之间的差异。

SOA tenets are: SOA原则是:

  • Boundaries are explicit - service doesn't share anything with other services (even database tables and data can't be shared) 边界是显式的 - 服务不与其他服务共享任何内容(即使数据库表和数据也无法共享)
  • Services are autonomous - each service is independent, can be separately deployed and versioned 服务是自治的 - 每个服务都是独立的,可以单独部署和版本化
  • Services share schema and contract, not class - services are described in WSDL, transported data are described in XSD, orchestrations (aggregation) are described in BPEL 服务共享模式和契约,而不是类 - 服务在WSDL中描述,传输的数据在XSD中描述,编排(聚合)在BPEL中描述
  • Services compatibility is based upon policy - WSDL contains WS-Policies to describe configuration needed for interoperability 服务兼容性基于策略 - WSDL包含用于描述互操作性所需配置的WS-Policies

As you see especially first two tenets can be easily violated when building WCF service. 如您所见,特别是在构建WCF服务时,可能很容易违反前两个原则。

SOA is a way to design a complete solution, it is a set of commonly accepted practices for communication, state management, compatibility, etc. In software architecture specifically, SOA is a set of services (not necessarily Web Services) that are built independently to support a range of client applications. SOA是一种设计完整解决方案的方法,它是一组普遍接受的通信,状态管理,兼容性等实践。在软件架构中,SOA是一组独立构建的服务(不一定是Web服务)。支持一系列客户端应用程序。 The modular design helps maintenance, business collaboration. 模块化设计有助于维护和业务协作。 SOA also provides some guidelines for development: SOA还提供了一些开发指南:

  • Constraints over backward compatibility 向后兼容性的限制
  • Metadata exposure 元数据暴露
  • Discoverability of services 服务的可发现性

On the other hand, WCF is just a supporting technology that helps you build the services in .NET. 另一方面,WCF只是一种支持技术,可以帮助您在.NET中构建服务。

You can create a SOA without WCF, just as creating a bunch of WCF services does not make your architecture a service oriented one. 您可以在没有WCF的情况下创建SOA,就像创建一堆WCF服务不会使您的架构成为面向服务的架构一样。

Service Oriented Architecture is a software architectural concept where one or more services interact with each other. 面向服务的体系结构是一种软件体系结构概念,其中一个或多个服务相互交互。 Here, service means unit of work to accomplish a purpose. 在这里,服务意味着完成目的的工作单元。 For an example, selling online ticket for railways is a service, online hotel booking is a service, procuring online payment is a service etc. Now, let's consider a hotel company sells its rooms online from its own website. 例如,销售铁路的在线机票是一种服务,在线酒店预订是一种服务,采购在线支付是一种服务等。现在,让我们考虑一家酒店公司从其自己的网站在线销售其房间。 In this case the website is using a local service. 在这种情况下,该网站使用本地服务。 The same hotel can also sell rooms through a third party travel portal. 同一家酒店还可以通过第三方旅游门户网站销售客房。 In the second case the third party travel portal is using a remote service or web service. 在第二种情况下,第三方旅行门户使用远程服务或Web服务。 Selling hotel bookings online through a travel portal is an example of a Service Oriented Architecture . 通过旅游门户在线销售酒店预订是面向服务架构的一个例子。 In service oriented architecture two or more parties interact with each other using web services. 在面向服务的体系结构中,两个或多个方使用Web服务相互交互。 Among them few are web service providers and few are web service consumers. 其中很少是Web服务提供商,很少是Web服务消费者。 A software component can be built by following Service Oriented Architecture by using web services. 可以通过使用Web服务遵循面向服务的体系结构来构建软件组件。 WCF is a technology to build a service. WCF是一种构建服务的技术。

SOA is just a method through which we can interact between different technologies like in .NET and JAVA using Web Services. SOA只是一种方法,通过它我们可以使用Web服务在.NET和JAVA等不同技术之间进行交互。 For this you have to be a knowledge in few things shown as follow. 为此,您必须了解如下所示的一些事项。

  1. XML XML
  2. WSDL WSDL
  3. UDDI UDDI
  4. SOAP 肥皂

after knowing these things you can easily apply this SOA 了解这些内容后,您可以轻松应用此SOA

WCF是一种使构建服务更容易的技术,它不仅可以在所有传输上运行,因此它比仅适用于Http的Web服务更通用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 面向服务的设置中基于WCF的联合安全性 - WCF-based federated security in a service-oriented setup 托管面向服务的架构 - Hosting service oriented architecture 使用WCF的面向服务的体系结构 - Service Oriented Architecture using WCF 在面向服务的体系结构中为服务调用定义方法签名的最佳实践是什么? - What is the best practice to define method signature in Service oriented architecture for service call? SOA(面向商业智能和服务的体系结构)中的报告 - Reports in SOA (Business Intelligence & Service Oriented Architecture) 这是什么类型的服务架构? - what type of service architecture is this? 面向服务的体系结构和不断发展的应用程序之间共享的对象 - Service Oriented Architecture and evolving objects shared between applications 在企业体系结构上的WCF服务中实现身份验证的最佳方法是什么? - What is the best way to implement authentication in a WCF service on an enterprise architecture? WCF服务和IIS如何集成在一起,传入请求的体系结构和流程是什么 - How is a WCF Service and IIS integrated, what is the architecture and flow for incoming requests 具有服务架构的MVC - MVC with Service architecture
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM