20

Service Model Programming Model Only WCF Services can leverage AppFabric

  • View
    225

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 2: Service Model Programming Model Only WCF Services can leverage AppFabric

Service Model

Programming Model

Page 3: Service Model Programming Model Only WCF Services can leverage AppFabric

Only WCF Services can leverage AppFabric

Page 4: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 5: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 6: Service Model Programming Model Only WCF Services can leverage AppFabric

Service Configuration (web.config)Service Configuration (web.config)

Service EndpointService Endpoint

Address (http://localhost/MyCalc.svc)Address (http://localhost/MyCalc.svc)

Binding(basicHttp)Binding(basicHttp)

Service Contract (ICalculator)Service Contract (ICalculator)

•Host

•Service Implementation

•Service Contract

•Data Contract

•Service Endpoint (Address, Binding Contract)

•Service Behavior

Key Service Key Service ConceptsConcepts

Service Contract (ICalculator)Service Contract (ICalculator)

Operations (signatures)double Add(double a, double b)double GetArea(Rectangle r)

Operations (signatures)double Add(double a, double b)double GetArea(Rectangle r)

Service Implementation (MyCalc: ICalculator)Service Implementation (MyCalc: ICalculator)

Operations (implementation)double Add(double a, double b)double GetArea(Rectangle r)

Operations (implementation)double Add(double a, double b)double GetArea(Rectangle r)

Service Behaviors (Metadata)Service Behaviors (Metadata)

Data ContractData Contract

Rectangle double width, double height

Rectangle double width, double height

Page 7: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 8: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 9: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 10: Service Model Programming Model Only WCF Services can leverage AppFabric

•Proxy

•Endpoints

•Messages

•Service Instance

Key Client Key Client ConceptsConcepts

Service InstanceService Instance

Proxy Instance (MyCalcClient)Proxy Instance (MyCalcClient)

Client Configuration (app.config)Client Configuration (app.config)

Client EndpointClient Endpoint

Address (http://localhost/MyCalc.svc)Address (http://localhost/MyCalc.svc)

Binding(basicHttp)Binding(basicHttp)

Service Contract (ICalculator)Service Contract (ICalculator)

proxy.Add(5,

2)proxy.Add(5,

2)

Add(5,2) 7

Page 11: Service Model Programming Model Only WCF Services can leverage AppFabric

11

Page 12: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 13: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 14: Service Model Programming Model Only WCF Services can leverage AppFabric

Tracked Events

Normal

Operation:

ServiceHost events

Aggregates for

Operations

Completed Calls

Troubleshooting:

Throttling

Service Exceptions

User Defined Errors

Failed Calls

Faulted Calls14

Page 15: Service Model Programming Model Only WCF Services can leverage AppFabric

15

Page 16: Service Model Programming Model Only WCF Services can leverage AppFabric

16

Page 17: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 18: Service Model Programming Model Only WCF Services can leverage AppFabric

DiagnosticSection config = (DiagnosticSection) WebConfigurationManager.GetSection("system.serviceModel/diagnostics");providerId = new Guid(config.EtwProviderId);myEventProvider = new EventProvider(providerId);

errorDescriptor = new EventDescriptor(ErrorEventId, Version, Channel, ErrorLevel, Opcode, Task, Keywords);

myEventProvider.WriteEvent(ref errorDescriptor, title, serviceName, errorMessage);

error event id's 301,302,303 mean error, warning, info respectively

error event id's 301,302,303 mean error, warning, info respectively

WCFUserEventProvider eventWriter = new WCFUserEventProvider();eventWriter.WriteErrorEvent(“AddOperation”, “An error occurred.”);

Page 19: Service Model Programming Model Only WCF Services can leverage AppFabric
Page 20: Service Model Programming Model Only WCF Services can leverage AppFabric

Introducing WCF Services