SOA 与数据库

发布于 2024-11-05 08:08:17 字数 335 浏览 2 评论 0原文

我一直在阅读有关 WCF 的内容,并且我们并没有太多使用 Web 服务,所以我试图找出使用 Web 服务相对于数据库的相对优势。我可以肯定的是,当您尝试与外部应用程序交互时,例如从库存管理应用程序到供应商订单放置应用程序自动订购材料。但在内部,我试图看到它的用处。

可以在中央数据库上在内部与两个不同系统上使用不同语言的两个不同应用程序进行通信。假设您有一位客户下了订单,您用 Java 编写的应用程序将其存储在您的 MySql 数据库中,然后装运车间的人员通过他的应用程序接收订单,该应用程序会通过程序自动检查来自 MySql 的新订单。所以我不确定 Web 服务在内部适合整个计划的哪个部分。您希望在数据库上使用 SOA 的情况有哪些?

I have been reading up on WCF and coming from a background where we didn't use web services that much I am trying to figure out the comparative advantages of using a Webservice over a database. I can definitely that when you are trying to interface with a with an outside application say to auto order materials from your inventory management application to the vendors order placement application. But internally I am trying to see the usefulness.

Communicating with two different applications in different languages on two different systems internally can be done on a central database. Say you have a customer places an order you application written in Java stores it in your MySql database and then the person on the shipping floor receives the order through his application that checks for new orders automatically from MySql through the program. So I am not sure where web services fit into the whole scheme of things internally. What are some examples of times when you would want to use a SOA over a Database?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

墨小沫ゞ 2024-11-12 08:08:17

我不确定您是否可以将 SOA(如此广泛的术语)与数据库进行比较。维基百科中 SOA 的定义是

面向服务的架构(SOA)
一套灵活的设计原则
在系统阶段使用
的发展和整合
基于 SOA 的系统将功能打包为一套可互操作的服务,这些服务可以在来自多个业务领域的多个独立系统中使用。 引自维基百科

因此,正如您所说,它不仅仅是两个与数据库通信的应用程序。这是对整个业务系统进行更广泛的审视。 SOA层将为所有可以被视为消费者的上游应用程序提供服务。 SOA 层可能与任意数量的数据库进行通信。可能同时是 MySQL、SQL Server、Informix。这些 SOA 层的使用者不必担心下游系统,他可以使用服务中可用的业务功能。

希望这能让您了解 SOA 的含义。要深入了解 SOA 是什么,请阅读这篇 Wikipedia 文章 http://en.wikipedia.org/维基/面向服务的架构

I am not sure if you can even compare SOA (such a broad term), with database. The definition for SOA in Wikipedia is

Service-oriented architecture (SOA) is
a flexible set of design principles
used during the phases of systems
development and integration in
computing.A system based on a SOA will package functionality as a suite of interoperable services that can be used within multiple, separate systems from several business domains. Quoted from Wikipedia

So its not just about two applications that talk to a database as you have stated. It's about a broader look in to your whole business system. The SOA layer will provide services to all the upstream applications that can be considered as consumers. The SOA layer might be communicating with any number of databases. May be to a MySQL, SQL Server, Informix all at the same time. The consumer of these SOA layer won't have to bother about the downstream systems and he can use the business functionalities available in the services.

Hope this gets you a hint on what SOA is all about. For a good read on what SOA is go through this Wikipedia article http://en.wikipedia.org/wiki/Service-oriented_architecture

ペ泪落弦音 2024-11-12 08:08:17

很多时候使用数据库进行集成并不是一个好主意

  1. 使用数据库时,您访问其他应用程序的数据层 - 您无法访问业务层(除非作为存储过程实现)

  2. 当直接访问数据库时,您无法在不更改数据库模式的情况下更改数据库模式更新其他应用程序

这些只是一些示例 - 还有更多

Using a database for integration is many times not a very good idea

  1. when working with a data base you access the data layer of the other application - you can't access the business layer (unless implemented as stored procedures)

  2. when accessing directly the database you can't change the DB schema with out updating the other applications

these are just a few examples - there are more

轮廓§ 2024-11-12 08:08:17

您通常会使用数据库作为服务的存储机制 - 这不是 SOA 与数据库的选择 - 这是一个“我是否需要在组织边界之外公开我的数据/服务?”的问题。是的? ->使用服务。不? ->只要有一个数据库就可以了。

You would usually use a database as the storage mechanism for your service - it's not a choice of SOA vs Database - it's a question of "do I need to expose my data/service outside the boundaries of my organisation?" Yes? -> use a service. No? -> Just have a database.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文