面向新手的实用 SOA

发布于 2024-07-17 13:55:30 字数 1094 浏览 7 评论 0原文

我对 SOA 世界来说是个新手。 因此,我正在研究一些“SOA 框架/技术”,并尝试了解如何利用它们来构建高度可扩展的(Facebook 类)网站。

我在这里试图解决几个“难题”:

  1. 可组合性(+管理依赖项、发布/订阅)、
  2. 服务的语言独立性、
  3. 可扩展性和可扩展性。 性能
  4. 高可用性

我研究了一些满足上述标准子集的技术:

  1. Thrift - Facebook 的交叉-platform RPC 平台
  2. WCF - 支持 SOAP、JSON 和 REST,因此可以认为它是语言可互操作的。 生成可用于生成 java 代理的 WSDL 文件。
  3. Microsoft DSS - 刚刚将其包含在我的调查中,但它似乎并不相关,因为它是高度状态驱动且特定于 .NET 的。
  4. Web 服务

现在,我了解了如何从上述内容中获得可组合性和语言独立性的某些方面。 但是,我还没有找到关于如何使用上述/其他工具实现可扩展性和高可用性的具体信息(不是嗡嗡声)。 最后,我提出了我的问题:

如何利用 SOA 技术来解决我上面定义的难题?在哪里可以找到这方面的技术指南? 我寻找的不仅仅是系统图,而是实际的库、代码示例、API...

I am a total newbie to the world of SOA. As such, I am looking at some "SOA frameworks/technologies", and trying to understand how to utilize them to build a highly scalable (Facebook class) website.

There are several "pains" I am trying to solve here:

  1. Composability (+ managing dependencies, Pub/Sub)
  2. Language-independence of services
  3. Scalability & Performance
  4. High availability

I looked into some technologies that answer a subset of the above criteria:

  1. Thrift - Facebook's cross-platform RPC platform
  2. WCF - supports SOAP, JSON & REST, so it can be considered language-interoperable. Generates WSDL files that can be use to generate java proxies.
  3. Microsoft DSS - just inclued it in my survey, but it doesn't seem relevant as it is highly state-driven and .NET specific.
  4. Web Services

Now, I understand how I get some aspects of composability and language-independence out of the above. But, I haven't found much concrete information (not buzz) about how to use the above / other tools for scalability and high availability. So finally I get to my question:

How does one leverage SOA technologies to solve the pains I defined above? Where can I find technical guides for that? I am looking for more than just system diagrams, but rather actual libraries, code samples, APIS...

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

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

发布评论

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

评论(7

霓裳挽歌倾城醉 2024-07-24 13:55:30

我认为这个问题更多地与所涉及的概念有关,而不是与工具有关。 问题答案:

  1. 理解并内化有界上下文。 将不相关的部分分开对于在不同的服务上获得真正的重用非常重要。 相关技术不会在这方面为您提供帮助,而是您将应用程序分离到适当的上下文中,您可以将其适当地重用于不同的服务。
  2. 基于已知协议的清晰通信端点允许使用不同技术实现不同的部分
  3. 让操作流程类似于基于不同协议的独立操作,为您提供了很多可以添加层的地方。 是整个流程中的一个特定子流程,使用大量资源,服务器无法再承受,只需移至单独的服务器即可。 负载不断增长,并且该服务器不再承受,请添加额外的服务器和负载平衡。 您还有更多机会使用缓存和连接池。
  4. 有一个需要始终可用的关键子流程,添加服务器以便可以进行故障转移。 拥有一个需要始终“可用”的整体流程,对可以稍后处理的片段使用队列。

您真的需要支持这种类型的负载吗? 设置与特定场景相关的适当性能/负载/互操作性目标。 如果您确实需要支持这种类型的负载,我建议您找一个处理过该负载的人。

如果最终可能是针对负载的,请识别有界上下文并设计具有 SOA 思维方式的交互。 剩下的事情就是保持代码整洁,在代码库中使用 TDD、松散耦合、集中集成测试等。 有了好的代码,如果以后需要分离系统的各个部分,就会容易得多。

I think the question has more to do with the concepts involved than the tools. Answers to the items:

  1. Understand and internalize bounded context. Keeping unrelated pieces separate its important to get real reuse on different services. Related technologies won't help you on this, its you that separate the app in appropriate contexts, which you can appropriately reuse for different services.
  2. Clear endpoint for communication based on known protocols allows implementing different pieces with different technologies
  3. Having the operations flow like independent actions based on different protocols, gives you a lot of places where you can add tiers. Is a particular sub-process of the overall process using lots of resources and the server can't take it anymore, just move to a separate server. Load kept growing, and that server isn't taking it anymore, add an additional server and load balance. You also have more opportunity to use caching and connection pooling.
  4. Have a critical sub-process that needs to be available all the time, add a server so you can have a fail over. Have an overall process that needs to be "available" all the time, use queues for pieces that can be processed later.

Do you really need to support that type of load? Set appropriate performance/load/interoperability targets that relate to the specific scenario. If you really need to support that type of load, I recommend you get someone on board who has dealt with it.

If it is something for a load that might eventually be, identify the bounded contexts and design the interaction between those with a SOA mindset. Keeping the code clean is all you have to do for the rest, use TDD, loose coupling, focused integration tests, etc in your code base. With good code, if you later need to separate pieces of the system, it will be a lot easier.

没有伤那来痛 2024-07-24 13:55:30

Amazon 首席技术官 Werner Vogels 对服务和架构说了一些有趣且相关的内容:

There are interesting and relevant things said about services and architecture by Amazon's CTO - Werner Vogels:

失退 2024-07-24 13:55:30

IDesign.net 有一堆很棒的 WCF 下载

IDesign.net has a bunch of great downloads for WCF.

四叶草在未来唯美盛开 2024-07-24 13:55:30

查看 Mule 项目,该项目捆绑了 CXF 服务堆栈以及提供 RESTful 替代方案的 Mule REST 包。 我想您会发现它解决了您所有的难题,并且文档和发行版中有很多示例。

Check out the Mule project which bundles the CXF services stack and also the Mule REST pack which provides RESTful alternatives. I think you'll see it addresses all of your pains and there are lots of examples in the documentation as well as the distribution.

穿透光 2024-07-24 13:55:30

我可以推荐一本书:Springer Verlag 出版的《Enterprise Service Oriented Architectures》。

May I recommend the book: Enterprise Service Oriented Architectures published by Springer Verlag.

橘香 2024-07-24 13:55:30

这里的所有建议都很好,但除非您确实需要,否则不要担心。

专注于构建人们真正喜欢的可用的、功能性的应用程序。 当你开始遇到问题时,就开始处理瓶颈。

您永远无法预见应用程序失败的所有方式,因此您如何判断 [[在此插入技术]] 是否是您的答案?

All of the advice here is well and good, but don't worry about it until you really need to.

Focus on building a usable, functional application that people really like. When you start running into problems, then start handling bottlenecks.

You will never be able to foresee every way an application will fail, so how can you tell if [[insert tech here]] is your answer?

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