Why we need Windows Communication Foundation?
In earlier days, when i was totally newbie to WCF, I was not clear why we need WCF? one thing I was clear that it has something to do with Web Services. But other than that nothing was much clear.
Then at one fine day, I came across Shivprasad Koirala’s .NET Interview questions book. In which he explained why we need WCF and what is WCF using a fictional story. It is really nicely written and it clears why we need WCF.
Before couple of days, I got good time (as I was on holidays) to convert that story in a comic — To make it more funny (And that’s what philosophy I follow — “Coding should be fun” :-)) and comic blog — a new concept which I always wanted to start!
So, here we go my first comic blog article which explains why we need WCF?
- Long Long time ago there lived a hardworking and a nice architecture.
- Develop a Booking Engine which books tickets for any flight carriers.
- The nice and hardworking architecture and his team developed a nice booking engine by which you can book tickets through any of the flight Carriers. The Travel Agent Company was very happy with the architecture and his team Member’s achievements.
- As time passed by the travel agent’s business grew in multiples
- Architecture and his team was very excited and they started to work on this new stuff
- All franchises run on Windows Platform.
- Booking engine was located in the main head office and all the franchise should communicate to this booking engine.
- After months he rolled out his project successfully.
- Time passed by and because of the good automated booking service more companies wanted to take the franchise from the travel agent. But the big issue was many of the franchise did not have windows operating system. They worked on Linux and other Non-Microsoft operating systems.
- Due to this limitation travel agent was losing lot of franchise business.
- Now, booking engine runs on two platforms .NET Remoting (for Windows based clients) and Web Services (for non-windows based clients).
- Franchise client had to wait to get response and was not able to process the next ticket booking until the first one was served. Travel Agent started receiving huge complaints because of this synchronous processing.
- Booking engine had the capacity of serving 20 tickets / second but it had now to serve 50 tickets / second.
- when the travel agent makes a booking it will come and fall in the queue and release the travel agent. Booking engine will always poll for this queue. When the booking engine finishes he will publish the booking results back to the queue. Travel agent client can then come at his leisure and see the results.
- Everyone in the travel company was really happy and impressed by the architect and his team members
- Travel Agent then felt a huge necessity of a good security model with the booking engine.
- Till now the travel agent was booking one ticket at a time. But soon he started getting lot of orders to book group family tickets.
- Consistency – If father’s ticket gets canceled. Kid’s ticket should also be got canceled.
They were working on:
- .NET Remoting
- Web Services
WCF is a unification of all distributed technologies like:
- .NET Remoting
- Web Services
Thanks a lot Shivprasad Koirala for writing such a nice story!
Happy Coding! 🙂