What is service-oriented architecture?
SOA is way to develop service oriented applications and WCF is technology which can be used to develop service oriented applications. BUT SOA defines strict rules (known as SOA tenets) for applications. If you don't follow these rules you are building services but these services do not conform to SOA.
WCF allows you to develop plenty of types of services. You can develop interoperable SOAP services which conform to SOA or which doesn't. You can develop pure .NET services with non interoperable features and you can develop REST services.
Moreover in SOA service can have different meaning than in WCF. In WCF service is collection of functionality exposed on endpoints. In SOA the service can be whole application (set of WCF like services) - difference between small and big SOA.
SOA tenets are:
Boundaries are explicit - service doesn't share anything with other services (even database tables and data can't be shared)
Services are autonomous - each service is independent, can be separately deployed and versioned
Services share schema and contract, not class - services are described in WSDL, transported data are described in XSD, orchestrations (aggregation) are described in BPEL
Services compatibility is based upon policy - WSDL contains WS-Policies to describe configuration needed for interoperability
As you see especially first two tenets can be easily violated when building WCF service.
SOA is a way to design a complete solution, it is a set of commonly accepted practices for communication, state management, compatibility, etc. In software architecture specifically, SOA is a set of services (not necessarily Web Services) that are built independently to support a range of client applications. The modular design helps maintenance, business collaboration.
SOA also provides some guidelines for development:
Constraints over backward compatibility
Metadata exposure
Discoverability of services
On the other hand, WCF is just a supporting technology that helps you build the services in .NET.
You can create a SOA without WCF, just as creating a bunch of WCF services does not make your architecture a service oriented one.
Service Oriented Architecture is a software architectural concept where one or more services interact with each other. Here, service means unit of work to accomplish a purpose. For an example, selling online ticket for railways is a service, online hotel booking is a service, procuring online payment is a service etc. Now, let's consider a hotel company sells its rooms online from its own website. In this case the website is using a local service. The same hotel can also sell rooms through a third party travel portal. In the second case the third party travel portal is using a remote service or web service. Selling hotel bookings online through a travel portal is an example of a Service Oriented Architecture. In service oriented architecture two or more parties interact with each other using web services. Among them few are web service providers and few are web service consumers. A software component can be built by following Service Oriented Architecture by using web services.
WCF is a technology to build a service.
WCF is a technology which makes building services easier, and it works on all transports not only HTTP so it is more generic than Web Services which works only on Http.
SOA is just a method through which we can interact between different technologies like in .NET and JAVA using Web Services.
For this you have to be a knowledge in few things shown as follow.
XML
WSDL
UDDI
SOAP
after knowing these things you can easily apply this SOA
Related
I create my API rest with Django, but I don't understand how convert an API to micro services, I don't understand the real difference between these.
I see an API like a micro service, but I don't know convert an entire API in micro service, I need create micro web servers?
Please, I can't understand a micro services, and I need understand this.
A microservice exposes it's interface, what it can do, by means of an API. The API is the list of all endpoints that a microservice respond when it receives a command/query. The microservice contains the API and other internal+hidden things that it uses to respond to client's requests.
An API is all that the clients see when they look at the microservice, although the microservice is bigger than that. A microservice hides its internal structure, it's technology stack, it's database type (sql, nosql - it could be anything); a microservice could move from sql to nosql, from python to php, but keep it's API unchanged.
API - It a way of exposing functionality over web. Imagine you have developed some functionality in .Net but not you are developing some software in a different language. Would you develop the same functionality again? No. So, just expose it via web service.Web services are not tied to any one operating system or programming language. For example, an application developed in Java can communicate with the one developed in C#, Android, etc., and vice versa.
Microservice - They are used to break a complex software into small pieces of individually deployable, testable, loosely coupled sub-modules. Micro Services are designed to cope with failure and breakdowns of large applications. Since multiple unique services are communicating together, it may happen that a particular service fails, but the overall larger applications remain unaffected by the failure of a single module.
API Vs Microservice - Now that we have broken our complex software into loosely couple sub-modules. These sub-modules communicate with each other via an API. Therefore, Microservices and an API solve different problems but works together!
More Details:
The Difference between Web Services and Micro Services
RESTful API vs Microservice
a microservice is an autonomous RESTful service. It means, there is just one service on each server. In Spring Boot when you bootstrap your RESTful service, it will get an instance of tomcat(it's embedded tomcat) and run your service on it. So, if you have more than one service on a server, it is not a microservice, because these services are not autonomous.
I worked with WCF services in our projects. We implemented most of the features as services in WCF and consumed from other projects which are web applications, desktop applications. Is this what SOA is ? Now I am getting some job oppurtunities who are looking for SOA developers, I am not sure if I can claim that I implemented SOA in the applications I developed. I read about SOA but could not get to a conclusion to my question. Can anybody explain me to clear my doubts ? Thanks for your help.
Whilst studying for the Microsoft 70-513 - Microsoft .NET Framework 4 Windows Communication Foundation, the term Service Orientated Architecture (SOA) is used quite often. The Microsoft book I have read states that;
"The architectural principles behind an SOA is the ability to reuse
existing software assets wherever possible and to expose the
functionality of these assets as a set of services."
So if you have used WCF to implement services into your applications, then it would seem you have experience in working with SOA.
My understanding about Service Oriented Architecture
We write WCF services which can be consumed by application written in
various technologies Desktop, Phone or Web.So, that we don't have to
write Service layer for each technology.
Many times it happens that your core business logic remains same for
years but, your UI or Client changes form Desktop to Phone to
Browser changes so, in this case you don't have to spend time again
writing same thing.
And as name it self say that it is service oriented so, if any
application which is able to consume services your winner.
I am relatively new to WCF. I am developing Web application.
I am trying to understanding "Why WCF" and read many articles .
But in many places it has been mentioned "to developed service oriented architecture ,to asynchronously send data" without any detailed explanation / any basic example.
Can somebody please let me know one simple example in layman's term ,"Why WCF" so that I can appreciate its existence.
I have had conversations with many people but none of them were able to answer this basic question.
I am also aware that ,many hundreds of applications have gone live before WCF was there...
Suppose, you do have a task to make a procedure of recieving of the coordinate point (lat,lon) and and returning the picture of the surrounding area. Or to make a language translator from voise input to text output. These jobs could uses several servers with a lot of data and could makes some huge mathimatic calculations. But you procedure should me quick, platform independend, secured, protocol-independent, consumed by different technologies (Web, Mobile, Applications). And at the same time it should be easy to consume by the end users, which do know nothing about you. As the main aim of ASP to handle web requests and generate the html responses, so the aim of WCF is to supply the end user with some useful functionality, developed by another user, remotly.
The developer creates a service (WCF) where he specifies its adress, binding and contract. Knowing these parameters other developers can consume this service. They can consume it by ASP, SilverLight, WPF, WinForms or any other technology (even none-microsoft), using SOAP protocol.
From Wikipedia:
The Windows Communication Foundation (or WCF) is an application
programming interface (API) in the .NET Framework for building
connected, service-oriented applications.
WCF is meant for designing and deploying distributed applications
under service-oriented architecture (SOA) implementation. **
Architechture
** WCF is designed using service oriented architecture principles to support distributed computing where services have remote consumers.
Clients can consume multiple services; services can be consumed by
multiple clients. Services are loosely coupled to each other. Services
typically have a WSDL interface (Web Services Description Language)
that any WCF client can use to consume the service, regardless of
which platform the service is hosted on. WCF implements many advanced
Web services (WS) standards such as WS-Addressing,
WS-ReliableMessaging and WS-Security. With the release of .NET
Framework 4.0, WCF also provides RSS Syndication Services,
WS-Discovery, routing and better support for REST services. Endpoint A
WCF client connects to a WCF service via an Endpoint. Each service
exposes its contract via one or more endpoints. An endpoint has an
address (which is a URL specifying where the endpoint can be accessed)
and binding properties that specify how the data will be transferred.
http://en.wikipedia.org/wiki/Windows_Communication_Foundation
Useful resources:
http://msdn.microsoft.com/sv-se/library/dd943056%28en-us%29.aspx
http://www.wcftutorial.net/
http://blah.winsmarts.com/2008-4-Writing_the_WCF_Hello_World_App.aspx
http://blah.winsmarts.com/2008-4-Writing_your_first_WCF_client.aspx
What is the specialty of WCF? Does WCF have any relation to HttpWebRequest, WebClient, etc? What is the main functionality of WCF?
If there is a relationship between WCF and HttpWebRequest, how can I use them together?
WCF is meant for designing and deploying distributed applications under service-oriented architecture (SOA) implementation.
WCF is designed using service oriented architecture principles to support distributed computing where services have remote consumers. Clients can consume multiple services; services can be consumed by multiple clients. Services are loosely coupled to each other. Services typically have a WSDL interface (Web Services Description Language) that any WCF client can use to consume the service, regardless of which platform the service is hosted on. WCF implements many advanced Web services (WS) standards such as WS-Addressing, WS-Reliable Messaging and WS-Security. With the release of .NET Framework 4.0, WCF also provides RSS Syndication Services, WS-Discovery, routing and better support for REST services.
WCF is Windows Communication Foundation. It is a framework for composing data-driven services. These could be web services, but they don't have to be.
You're probably best off reading this:
Windows Communication Foundation is...
I'm building a workflow app to investigate the technology. I can't decide whether to go for a web service (and a technology with which I'm basically familiar) with WebServiceInputActivity's or WCF and ReceiveActivity's (and a new technology that I'll have to learn).
Are there any major reasons to go either way?
Clarification:
Are there any major (architectural) reasons relating specifically to WF to go either way? I appreciate the input of the respondants, so far, but they focus on WCF rather than what the implications are for my workflow and its lifetime, maintainability, performance, expandability, etc. if I choose WebServices or WCF.
WF and WCF are very much hand in hand in .net 4. I'd definitely suggest the latter.
No doubt, it is WCF. Migrating ASP.NET Web Services to WCF
SUMMARY: Windows Communication
Foundation (WCF) provides a unified
framework for rapidly building
service-oriented applications that
makes it easy to build and consume
secure, reliable, and transacted Web
services. WCF’s single programming
model unifies the capabilities in
ASMX, WSE, Remoting, COM+, and MSMQ;
therefore developers need to learn
only one programming model.
Agree with the others here that you should go with WCF.
Just thought to add one more point, that just because you use WCF does not mean that you cannot access existing web services. You can use a WCF client with basichttpbinding, to access existing non WCF web services.
You are making a mistake to call ASMX web services "web services" and suggesting that WCF can't be used to make web services. A WCF service using basicHttpBinding is exactly like an old ASMX service.
The best reason to use WCF instead of ASMX is that Microsoft has now stated that ASMX is a "legacy technology", and that they will not be fixing bugs in it.