A company I used to work for relied very heavily on JMS for SOA. They were also into domain-driven design, so they organized their services by business domain in the format <domain>/<function>/<version>. For example, price/compute-foobar-maintenance-fee/1.0.
The project wasn't part of the name because different projects shouldn't have their own "version of the truth" - two apps wouldn't have their own compute-foobar-maintenance-fee service. And which application provides the service is irrelevant to naming the service. Maybe my application provides the service today but next year, my application will be retired and another will take over. As long as the contract remains the same, the client wouldn't/shouldn't know the difference.
I would suggest something that incorporates corporate group, application and version information into a namespace hierarchy.
For example: jms/mygroup.myproject.version.resource.queue
This is useful if you have disparate technical groups using the same jms server cluster. Also it prevents "crosstalk" between different versions of the same application.
发布评论
评论(2)
我曾经工作过的一家公司非常依赖 JMS for SOA。他们还热衷于领域驱动设计,因此他们按业务领域以//格式组织服务。例如,价格/compute-foobar-maintenance-fee/1.0。
该项目不是名称的一部分,因为不同的项目不应该有自己的“真相版本” “ - 两个应用程序不会有自己的compute-foobar-maintenance-fee 服务。哪个应用程序提供服务与服务命名无关。也许我的应用程序今天提供服务,但明年,我的应用程序将退役,另一个应用程序将接管。只要合同保持不变,客户就不会/不应该知道其中的差异。
A company I used to work for relied very heavily on JMS for SOA. They were also into domain-driven design, so they organized their services by business domain in the format <domain>/<function>/<version>. For example, price/compute-foobar-maintenance-fee/1.0.
The project wasn't part of the name because different projects shouldn't have their own "version of the truth" - two apps wouldn't have their own compute-foobar-maintenance-fee service. And which application provides the service is irrelevant to naming the service. Maybe my application provides the service today but next year, my application will be retired and another will take over. As long as the contract remains the same, the client wouldn't/shouldn't know the difference.
我建议将公司组、应用程序和版本信息合并到命名空间层次结构中。
例如:
jms/mygroup.myproject.version.resource.queue
如果您有不同的技术组使用相同的 jms 服务器集群,这非常有用。它还可以防止同一应用程序的不同版本之间的“串扰”。
I would suggest something that incorporates corporate group, application and version information into a namespace hierarchy.
For example:
jms/mygroup.myproject.version.resource.queue
This is useful if you have disparate technical groups using the same jms server cluster. Also it prevents "crosstalk" between different versions of the same application.