Application Integration Options

There are many applications in typical enterprise. These application should be talking with each other to share information between them. You are lucky if all applications are written in one technology platform. Various technologies are used in typical enterprise. Some applications are developed in .NET, some in Java or some may be proprietary packaged solutions, some may be SAAS etc.
There are four ways to integrate applications with each other,

File Based – Source application generate file and destination system will consume that file. This way data can be shared between application. Things need to consider are file generation schedule, file format, layout etc. Changes will be communicated to other systems eventually after some time interval.

Shared database – Source and destination systems are using same database to share information. The moment one application writes information into database at the same time that information is available for destination application. Changes to other system are communicated immediately. This approach comes up with cons related to dirty reads, policies around transactions, locks etc. These need to be managed properly. If locks are applied it starts creating bottleneck. Scalability becomes an issue.

Remote Procedure Call (RPC) – Above two approaches are typically used to share data. In shared database you can share same stored procedure or other logic. The intention for RPC is to share code logic between system over standardized protocol like HTTP or TCP. API can be used to share information or trigger any action into other application. Most of the time these are synchronous calls which creates bottlenecks. Also, retrying certain action is trickier.

Messaging – Source and destination system talks with each other over message channel. It is not required for source and destination system to have knowledge of each other. These massages can be communicated to destination system through point to point communication channel or message can be published to multiple applications. Messages can share data in standardized format and also trigger action in destination application. Messaging comes up with cost. It requires reliable messaging system. More applications you add it requires more memory to hold messages and more processing power. Developers/Designers need to think in Asynchronous way as compared to typical synchronous thinking. For example, as a developer if I get request to implement write logic to process phone numbers from provided file. I will start writing API program which will read file, then process phone numbers and then return status. This way my API will have synchronous Phone number processing capability. If I want to write this functionality considering messaging system, I will write one API which will take request and put message on message channel. I will provide another API to communicate status. Client program will call this API periodically to check status of request. I will write another handler which is responsible for reading request from channel and then processing phone numbers and later putting status on message channel.

Each approach mentioned above have its own pros and cons. It is based on your needs/requirements which approach you want to follow  for establishing communication between your enterprise applications.


Strategy to upgrade ASP.NET Web Forms application

There are plenty of ASP.NET Web Forms applications. You may be wondering how to convert these legacy applications into cutting edge technology.

There are many strategies to get this done.  The one strategy I could think of is,

  • Expose API end points from ASP.NET web application with Web API
  • Rapidly write front-end using popular java-script technologies like Angular
  • Leverage URL routing to redirect users between OLD and NEW site
  • Leverage Feature Toggles to turn ON/OFF functionality between applications

In my experience, it is important to approach migration from functional perspective. i.e.Completely migrate one small specific functional area. This will allow to manage functional migration effectively. Otherwise, users need to toggle between old and new site in order to perform one specific task. Which means, now you are stuck between NEW and OLD applications, which ultimately delays migration.


Ask these questions while evaluating new technology/service

It is important for software development teams to respond quickly to customer needs. There are various software development concerns which need to be addressed while building software to address customer requirements. For example, Caching for performance, Logging for logs, Supportability by notifying users and administrators etc. Each of these concerns have very specialized domain. If all software teams starts writing their own code for these components then when they will focus on core software which is required  to support their business. This is why software teams need to make decision on When to Buy? And When to Build?

Let’s say we are considering buying third party product or service. There are plenty of options available in market. Which one will you Buy? Of course, you will do market study, compare service features from different vendors side by side, then you will evaluate your business needs and identify best fit product/service.

But, before buying any technology product or services, the important question to ask is “How will it increase throughput by making effective and efficient use of time and money?“.

Start asking these questions in your process of evaluation,

  • What business problems are you trying to solve?
  • How are you dealing with that business problem today? – Review current business processes. You will come across various rules/assumptions are made by business in order to satisfy business need. But it is acting as bottleneck and affects overall throughput. This is why they are coming up with requirements to improve this situation.
  • What benefits this new technology have to offer? – Sales person can provide you plenty of information.
  • Can this technology help in eliminating current rules and assumptions?
  • Will it simplify current business process so that overall throughput can be increased?If you have answer to above questions, you will be in good position to decide whether to pursue new technology or not.

    You can also tailor these question to make technology decisions in real life.


Get started with AKKA.NET (PlaceOrder/ProcessOrder Example)

Now, I would like to start exploring various  AKKA.NET features with examples. As I go through journey of learning AKKA.NET, I will be writing blog posts as well as code examples on GIT. Lets get started…

First, let me start with defining requirement. Imagine there is Fictitious Online Ordering System. It is being used by customers to place order for products. They need tracking number for their order so that they can track their order for processing/shipping status.

This software system will have web/mobile front end. That UI will allow user to provide order details and submit order. When user clicks on “Place Order” button, order will be submitted for processing to back-end system and acknowledgement will be displayed on screen along with tracking number.

When I think about this system, it can have mobile/web UI which will consume same service to take order, generate tracking number and hand it over to back-end service for processing. Order will be processed eventually. Hence, Eventual consistency is needed here.

Ideally, real production solution will look like, front-end service as ASP.NET Web API and back-end service as Windows service if we decide use Microsoft Technology. (If you like, you can use develop same use case in other technology like Node,Ruby etc.)

For purpose of this sample example, I am going to create Asp.NET Web API front-end and Console application as back-end processing application. These applications will be powered by AKKA.NET actor system. I am going to leverage actor model. Actor system from WebAPI will talk to Console application by exchanging messages over TCP.

  • Lets do some lab work.
    1. Create solution called “OnlineOrderingSystem”.
    2. Add empty Web API project with name “PlaceOrder.WebAPI”
    3. Add console application with name “ProcessOrder.Backend”
    4. Add class library project “OnlineOrdering.Common” which will have actor logic defined. These actors will be shared/reused across actor systems. In this case frontend web API and backend application.

Lest start with adding necessary nuget packages to all three projects one by one by running this nuget command in package manager console.

PM> Install-Package Akka
PM> Install-Package Akka.Remote

Then add Order message.


Then add PlaceOrder & ProcessOrder actors.



Then write below bootstrapping code in Global.asax/Application_Start event for WebAPI


Add below code to PlaceOrderController.


Create backend process actor system and “ProcessOrder” actor in that actor system.


Add this configuration in Web.Config of Web API


Add this configuration in App.Config of backend service application. Notice that server port is fixed but in WebAPI configuration it is specified as which means it will be automatically assigned at run time.


At the end, this is how it will look like,


All working code is available here at my GIT repository.


How I got thinking about AKKA.Net

I am about to start working on new project. Since last couple of weeks I was spending time on understanding requirements and evaluating our current architecture and how it can be evolved to accommodate new requirements and build Simple, Scalable, High Performance and Reliable software system.

The major requirement is around building backend processing. i.e. once request placed for processing, eventually it can be completed. User should be able to monitor progress of task. If processing errors out, then there should be way to again retry and complete that reprocessing. Error handling and logging should be good enough for investigating and identifying production issues and fixing them as quickly as possible. Another important aspect involves building and presenting processing metrics.

Because this requirement needs eventual backend processing, I was thinking about bus technology. There are various bus technologies available. Over last few years I was hearing/learning about NServiceBus. I am big fan of Udi Dahan. Hence I started exploring NServiceBus as an option. Along the side I am also exploring Azure Service Bus and Apache Kafka. I also started looking into plain message queuing technologies like MSMQ, ActiveMQ etc.

Some technology have good processing power over other while they dont have good monitoring tools and professional support. Frankly speaking at this moment I am completely confused with Pros-Cons of each of these technologies and how it will fit in our enterprise wide strategy.

As a software design famous quote,

Program to interface, not implementation

I would like to design my backend system without getting into details about specific messaging bus.

Last Friday, while leaving office, just a thought got popped up in my mind about “Actor Model”. I remember listening one of DotNetRocks episode about I spent some time over weekend learning about AKKA and framework. Also, got tweet from Vaughn Vernon (  about SOA at COMCAST using Akka (

I feel that may be Akka.Net can be another alternate option for service bus or help us delay decision about service bus. I don’t know much about AKKA at this stage but it looks like it is worth spending time to understand “Actor Model”.

I will keep posting my learning experience about AKKA and Reactive Manifesto.


How to clone GIT repository and make changes?

1.       Download and install GIT from here

2.       You can see “Git Bash” from start menu (after successful installation)

3.       Click on “Git Bash” and it will come up with this window

4.       Create local directory (something like C:tempPGM)

5.       Use CD command and get into that folder from “Git Bash” command window.

6.       Go to GIT project and copy clone URL

7.       Paste it in “Git Bash” and execute it. It will clone source code on your local machine.

8.       Now, simply open solution file in Visual Studio and you are good to go.

9.       Once you done with your changes go back to “Git Bash” and run GIT STATUS command

10.   It will show you untracked changes in RED color.

11.   You can execute GIT ADD * command to stage those changes

12.   Now if you run GIT STATUS command then those changes will be shown in GREEN color.

13.   This time you can use GIT COMMIT –m “Checkin Message” command to commit your changes.

14.   You need to push your changes to server by using below command

GIT PUSH –u origin master

15.   Next time if you need to latest changes from server, you can execute GIT PULL command.

(NOTE: you may need to create GIT account and permission to push your changes in GIT. You can explore additional GIT commands here

My MS Practicum Story

This week I have submitted my practicum project. I am full stack Microsoft .NET developer. When I started working on this project it was requirement that I should build this website in such a way that it can be deployed either Windows or Linux environments.
.NET application can be deployed on Linux environment, but I have no experience doing that neither I have Linux machine to try it out.
I started exploring over internet which technology I should use. Finally, I came across MEAN development framework ( MEAN stands for MongoDB, Express, AngularJS and NodeJS. MEAN is an opinionated fullstack javascript framework – which simplifies and accelerates web application development.

I have started developing website. I learned a lot about AngularJS and NodeJS. I have used middleware from NodeJS for Authentication Mongoose etc. AngularJS provide very nice development framework. It provides really easy way to write HTML pages. There are certain best practices to develop Angular site. I learned those as part of my study. I explored lots of material over the internet.

Now, I can say that I am full stack JavaScript developer. really enjoyed working on this website and technology.

If you would like to have glimpse of my work,
The source code is on my GIT HUB repository. 


Book Review: Talking With Tech Leads

There are books around software architectures, designs, languages and best practices. Also, there so many books on soft skills. But, I haven’t come across any book which provides insight into role of people whole deal with technology as well as people.
Few days back, I was reading my tweets and got to know about this wonderful book “Talking With Tech Leads” by “Patrick Kua (”.
In this book, author interview novice and experienced tech leads. He ask questions about time management, what tech lead should focus on, how they manage to find balance between writing code and dealing with other team related issues. He interviewed various level of tech leads from industry. Their experience journey, mistakes and how they learned from those mistakes. Overall, this book is organized pretty well with small sections and simple language which makes it easy to read.
Key things I learned from book were,
  • Seeing whole picture of system and at the same time understanding how specific feature under development fits into long term vision.
  • Tech lead is not only accountable for their own decisions but the decisions and actions of each person on the team.
  • Tech lead spends most of time on providing direction from technical point of view.
  • Sometime, Tech Lead might spend less time  in working with code but more time in enabling other team members to contribute quality code with less rework and delivers high business value.
  • Tech Lead role is spanning over various aspects of software development life cycle. From pairing with peer developers to talking with project stakeholders and product owners about prioritization and also maintain quality in code and delivery. In this process Tech Lead need to switch context frequently which is challenge.
  • Sometime people learn from failing. It is good to allow people to fail but reducing its impact by providing frequent feedback is essential. Provide them safe environment to fail.
  • Not every problem is programming problem in team. Every personality have strengths and weaknesses. It is important to utilize their strengths to yield better outcome for team.
  • Tech Lead need to keep up to date with ever changing technology.
  • Tech Lead need to focus on developing existing members on team.
  • Good listening is equally important as good communication.
  • Building trust with project stakeholders is important in overall delivery of product.
  • Understanding business needs, technology, long term as well as short term product vision is essential for development and delivery planning.
  • Delegation is essential to provide opportunities for junior team members and free up your time to invest in areas where it is mostly required.
Every team is different and there is no “right” way to handle things. Learning from others mistakes and experience will help to grow professionally and personally.
This is an awesome book and I would like to recommend every tech lead to read it.

Thank you “Patrick Kua (” for putting together this awesome book

Parameter binding in Web API

Yesterday, I spent significant amount of time to figuring out why my Web API method is not reading string from body as specified but null. 

  • Simple Type (int, bool, double, string, date etc.): Web API tries to get the value from the URI
  • Complex Type: Web API tries to read the value from the message body, using a media-type formatter.

For Example:
This is how Web API Method is written

If you try this Web API read it as null

If you try this Web API read it as proper string

The advice here is that you should put string in double quotes in POST message body in order to work parameter binding appropriately.


Notes: Domain Service/Application Service

Quick example about Aggregate Root/ Domain Service/ Application Service

Aggregate Root:
class Account
   Status: string

   function Deposit(amount)
        if(status == “Closed”)
          Throw AccountStatusException (“Money cannot be deposited to closed account”)

   function Withdraw(amount)
           Throw InsufficientFund exception ;


Domain Service (Accepts domain objects as input)
function FundTransferService.Transfer(FromAccount, ToAccount, Amount)
    // Other rules can be checked
    var tax= (2*amount)/100;



Application Service (Use Cases, Request/Response pattern, Exception handling, Caching, Auditing, Authorization)
Can be treated as feature.
class FundTransferRequest

function FundTransferService.Transfer(FundTransferRequest)
     // Log entry
          // Get
          var fromAccount=accountRepository.Get(FundTransferRequest.FromAccountId);
          var toAccount = accountRepository.Get(FundTransferRequest.ToAccountId);

          // Act

         // Persists

        // Log success
         Handle Exception
         // Log exception

  // Log exit