gpt4 book ai didi

c++ - 服务的静态和动态演化

转载 作者:太空狗 更新时间:2023-10-29 23:17:25 25 4
gpt4 key购买 nike

我正在阅读面向模式的软件架构第 2 卷中有关并发和网络软件的挑战。

Service access often involves invoking remote operations on resuable components like OMG event service, etc. Supporting the static and dynamic evolution of services and applications is antoher key challenge in networked software system.

Evoution can occur in following way

Interfaces to and connectivity between component service roles can change, often at run-time, and new service roles can be implemented and installed into and installed into existing components.

It is even more challenging to determine how to access services that are configured into a system 'on-demand' and whose implementations are unknown when the system was designed origanally. Here design challenge are two-fold.

  1. First, an applicatoin must export new services, even though it may not know their detailed interfaces.

  2. Second, an applicaiton must integrate these services into its own control flow and processing sequence transparently and robustly, even at run-time.

我需要你回答以下问题来帮助我理解上面的文字。

  1. 作者所说的“组件服务角色的接口(interface)和连接通常在运行时可以改变”是什么意思?要求用通俗易懂的例子来解释。

  2. 作者在上面提到的按需挑战中提到的两点是什么意思。以上两点请大家详谈。

感谢您的宝贵时间和帮助。

最佳答案

1.What does author mean by "Interfaces to and connectivity between component service roles can change, often at run-time" ?

我不确定。接口(interface)会随着时间的推移而变化,因为:

  • 可以采用新的技术标准——比如从 SOAP 迁移到 REST,或者从 XML 到 JSON,但这会随着部署的时间慢慢发生——对我来说,“运行时”是事物运行的内存空间,我看不到界面会快速改变自己 - 否则怎么会有人与它们集成?
  • API 或接口(interface)契约本身会发生变化以满足业务需求。

2.What does author mean by two points mentioned on-demand challenges which mentioned above.

嗯,好的设计模式往往会经久不衰(它们永远不会改变,因为它们永远不会被破坏——就像 SOLID)。我认为你提到的这本书是在 2000 年写的——从那以后发生了很多变化,所以虽然这种模式可能会继续存在,但我们现在描述它的方式可能已经改变了(即他所说的“导出新服务”是开放的解释)...

1.First, an application must export new services, even though it may not know their detailed interfaces.

关注点分离(基本的 OO 内容),您应用的所有部分不(不应该)天生就知道其他部分在内部做什么;同样,只要有人(包括外部系统)在满足界面,那么谁会关心它在内部是如何做到的。

2.Second, an application must integrate these services into its own control flow and processing sequence transparently and robustly, even at run-time.

我认为这意味着程序不应该中断,它应该总是编译,如果应用程序动态创建和执行代码(比如基于用户输入),那么需要就地检查以便动态代码也不会破坏应用程序。

关于c++ - 服务的静态和动态演化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18232326/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com