1

Is database connection through WCF Service slower than direct database connection by nature? Or it is a question of how to implement it?
Is there something specific that makes it impossible for a WCF service connection to be as fast as a direct one: XML-based format, transmission protocol used or something else?

My question is a rather general one, that's because I'm trying to grasp the essense of the issue. For example to understand: can it be possible, in principle, that there would be no difference (regarding performance of an app) whether a database is located inside a local network or somewhere in the Cloud?

4

2 回答 2

5

我讨厌对任何事情说“总是”,但在所有其他条件相同的情况下,直接连接总是会更快。

单独序列化/反序列化的成本会产生开销。

于 2011-07-21T21:00:12.973 回答
1

是的,除非你为很多客户提供服务。WCF 将允许您作为服务运行,单个应用程序调用数据库而不是每个客户端一个,更少的 TCP 开销,更少的打开连接,随着您的增长而提高性能,以及更好的安全模型。

于 2011-08-24T20:01:40.060 回答