服务是可以伸缩的
c)Services are available.
服务是可用的
d)Services are responsive.
服务是可以相应的
e)Services are disciplined and do not block their clients for long.
服务是遵守规则的,不能长时间阻塞客户端进程。
Essentials
设计要点
1.Place service code in a class library, not in any hosting EXE.
服务类应该定义在类库而不是exe宿主里。
2.Do not provide parameterized constructors to a service class, unless it is a singleton
that is hosted explicitly.
不要给服务类提供参数化的构造函数,除非其是singleton单例模式,并且确定宿主。
3.Enable reliability in the relevant bindings.
在相关的绑定里启用可靠性。
4.Provide a meaningful namespace for contracts.For outward-facing services, use your company’s URL or equivalent URN with a year and month to support versioning.
For example:
为契约定义有意义的命名空间。暴露的外部服务,使用公司的URL或URN,并附上年月日等支持版本化。
例如:
[ServiceContract(Namespace = "http://www.idesign.net/2009/06")]
interface IMyContract
{...}
For intranet services, use any meaningful unique name, such as MyApplication.
对于企业内部服务,使用唯一的有意义的名字,比如MyApplication。
For example:
例如: