Saturday, November 21, 2020

Monday, October 12, 2020

MVVM

What is MVVM ?

MVVM is an architectural pattern that is similar to MVC (Model View Controller) pattern. 

MVVM pattern is achieving a high level of SoC(Separation of Concern).  Separation of concerns comes down to writing our code so that each piece of code has one specific task and nothing more


Without MVVM




With MVVM




Benefits of MVVM
  • Better Separation of Concern
  • Improves code testability
  • Maintainability
  • Mode code sharing

Friday, May 8, 2020

Message Queue

What is Message Queue?



Message Queue provides Asynchronous communication between components. Which means the client sends the request and carry on with other work. It doesn't have to wait for the server to complete.
Message Queue is suitable for replacement for asynchronous communication. It Improves
  • Performance
  • Scalability
  • Reliability 
  • and more Resilience 
1. The client packages request as a message and send the message to the queue.
2. As soon as the queue has acknowledged the receive the message client can carry on the rest of the work
3. That message sits and waits on the queue until a handler picks it up.
4. The handler component picks up the next message in the queue.
5.  Once the handler did it confirms to the queue message complete so it gets removed from the queue. 


Message Queue Implementations

1. MSMQ - Message Queue System build in the Windows
2. ZeroMQ - Open source cross-platform message  queue
3. Cloud Message Queue (Azure Service Bus, AWS)
4. IBM WebSphere MQ


Key Patterns Receiving and Sendings Messages

1. Fire and Forget
2. Request and Response
3. Publish-Subscribe

Failed Processing of Messages

1. Retries
2. Poison Messages
3. Dead Letter Queue