WCF - A Service Oriented Architecture (SOA)


In this article I will explain the basic concept of .Net's WCF framework, You might have know or heard about Service oriented Architecture, but have you experienced it with an example? . Here I will explain the SOA by taking WCF as an example.

1) What is WCF?

WCF - Windows Communication Foundation , a new concept brought in .net , since version 3.0 to 4.5. It is a new model for all the communications, it bridges all types of communication under single entity.

WCF is a distributed technology that provides single, integrated platform or model called the service model to develop distributed applications for windows. With WCF, we can develop powerful and inter-operable 'Service Oriented Distributed Applications'.




2) Why WCF?

WCF was introduced in .NET framework to resolve the problem of inconsistency in the communication between different applications due to the usage of diverse distributed technologies, such as MSMQ (Microsoft Message Queuing), .NET remoting, XML Web Services, and Enterprise Services (COM+). Now they all are kept under one umbrella called WCF (Windows Communication Foundation).

WCF not only resolves inconsistency but also ensures security and reliability of the distributed application and interoperability among the distributed technology




3) What is Service?

A Service is a function that is well-defined, self-defined and does not depend upon the context or state of the services.



4) What is Service Oriented Architecture (SOA)?

A Service Oriented Architecture is essentially a collection of services, these services communicate with each other .The communication can involve either simple data passing or two or more services co-ordinating some activity.


The service provider returns a response message to a service provider at the left; the service provider can also be a service consumer.
SOA is a solution for making two software to communicate each other.
SOA is better than 3-tier architecture (Client -> Server->Database)





5) Messages and Services

• Services and Messages are building blocks of SOA
• Services should be self contained and communicate using messages
• Services should be able to define themselves
• Services should be maintained in a repository where we can find them
• Services should be orchestrate able

• Message formats should be standard and work cross platform
• Messages are the way to attain interoperability between heterogeneous applications/languages
• Message format for web services are SOAP format
• Message should be able to communicate asynchronously, reliably and in a secured way
• Messages should be able to describe and discover in a standard manner
• Message should be able to tell where the Service located is
• Message should tell how to communicate with the service (or) what the transport protocol to communicate with the service.
• Message should tell what you need to communicate with the service (user id / password) or in other words what should the service need in order to utilize the service


• Services + Messages = SOA
• SOA is not a tool, technology. It a architectural style /methodology
• In SOA we don't think in terms of classes/functions, but rather we think in terms of services .
• In SOA we don't think in terms of method calls, RPCs or network calls or protocol calls, but we talk in terms of messages
• SOA shifts in thinking from classes and Objects to Services


SOA definition: SOA is architectural style for building business applications using loosely coupled services which are black boxes and can be orchestrated to achieve a specific functionality by linking together


• In 1980, functions are used. In 1990 OPPS are used but cross interoperability between languages does not exist, so we thought of using 'Messages'. These messages can be xml / csv etc, these messages are standardized and second aspect we think of Services, Services are self contained business functionality, they are independent of other services, We can modify the services without affecting the other services.
• Here comes the picture of SOA where it is platform independent , for example to use a .Net class in .Java class



6) Where/How/What? <----> Address/Binding/Contract:

• Message should be able to tell where the Service located is
• Message should tell how to communicate with the service (or) what the transport protocol to communicate with the service.
• Message should tell what you need to communicate with the service (user id / password) or in other words what should the service need in order to utilize the service
• Address(Where): An address indicates where we can find this services, address is an URL which points to the locations of the services
• Binding(How): Binding determines how this can be accessed , it determines how the communications can be done . For instance you expose a service, which can be accessed using SOAP over http or binary over TCP, so for each of this communication medium two bindings will be created
• Contract(What):Contract is an agreement between two or more parties . It defines the protocol how the client should communicate with the services. Technically it describes parameters and the return value of a method.



7) What are Endpoints?
• The combination of above three are known as endpoints
• Endpoints='Address' + 'Bindings'+'Contract'
• Endpoint is like a entry point to the service
• In web.config file , you can find the endpoint


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: