Aracılığıyla paylaş


Delegation and Exposure of Application System Behavior

In System Designer, you can specify which members of an application system provide or consume behavior for that system. You can perform this task by delegating the behavior of endpoints on that system to its members. You can also selectively expose the behavior of endpoints on that system's members. When you complete these tasks, proxy endpoints appear on the definition of that system.

For more information about adding members to systems, see How to: Add Members to Application Systems.

Delegating and Exposing Behavior through Proxy Endpoints

When you delegate endpoint behavior from a system definition to a member, Visual Studio copies the endpoint from the system definition to the member, creates a proxy endpoint on the system definition, and connects the proxy endpoint to the new member endpoint. When you expose the behavior of an endpoint on a member, Visual Studio adds a new proxy endpoint for that member to the boundary of the system definition.

Note

Before you can successfully validate a particular system definition for deployment, you must eventually delegate endpoint behavior on that system definition and on all systems included in that system definition.

Proxy endpoints allow you to provide access to the members within a system and to expose the behavior of those members externally outside that system. Members that you do not expose through proxy endpoints do not have access outside the system. Systems and applications that are on the outside of that system cannot access those members.

For example, suppose you have a system that contains an ASP.NET application with a Web service provider endpoint. This system also contains an external database that is connected to the ASP.NET application. You can restrict access to the database from outside the system by exposing only the Web service provider endpoint as a proxy endpoint. The system now only exposes one point of access to the database through the Web service, preventing a direct connection to the database from outside the system.

When you add proxy endpoints to the definition of a system, you define constraints that Distributed System Designers respect when you add that system to other systems and evaluate deployment for the systems that contain that system.

Note

Visual Studio does not perform any checks to enforce these constraints at run time. Therefore, make sure that the constraints you define as proxy endpoints are enforced at run time to secure access to members of a system.

However, when you eventually deploy the system, that system and its proxy endpoints do not exist as tangible entities. Ultimately, all proxy endpoints delegate their behavior to application endpoints. At deployment, a system delegates its behavior to endpoints on its members. If those members are systems, those systems delegate their behavior to their members, and so on. Through this process, you can delegate behavior through any number of system layers. The deployment process resolves the configuration of a system and leaves only the connected application endpoints with any overridden application settings.

Proxy Endpoints on Application Systems

When you add a proxy endpoint to a system definition, a delegation line connects the proxy endpoint to the endpoint on the member. A proxy endpoint always has the same type and role as the endpoint to which it delegates or exposes behavior. For example, a proxy endpoint that exposes behavior for a provider endpoint will also be a provider endpoint. Its delegation line will point from the proxy endpoint to the provider endpoint. Likewise, a proxy endpoint that exposes behavior for a consumer endpoint will also be a consumer endpoint. Its delegation line will point from the consumer endpoint to the proxy endpoint. For more information about endpoints, see Overview of Endpoints on Applications.

Note

A consumer endpoint on a member typically requires a connection to a suitable provider endpoint or a delegation to a proxy endpoint for the member to function correctly and for the system to be valid. However, the choice to connect a consumer endpoint is optional. For more information, see Communication within Application Systems.

A proxy endpoint on system definition can have only one delegation to a single endpoint on a member within that system definition. Outside that system definition, a proxy endpoint can connect to other endpoints under the same rules that apply to connecting the endpoint type it exposes with the following additional considerations:

  • For a proxy endpoint with provider type, you can connect it to one or more consumer endpoints outside the system that defines the proxy endpoint. At the same time, you can also expose it as another proxy endpoint on an outer system definition.

  • For a proxy endpoint with consumer type, you can either connect it to a single provider endpoint or expose it as another proxy endpoint on an outer system definition.

See Also

Tasks

How to: Delegate Application System Behavior to Members

How to: Expose Behavior of Members in Application Systems

Concepts

Overview of Application Systems

Other Resources

Delegating and Exposing Behavior of Application Systems