Messaging Framework

Processing thousands of instructions every day...

ChannelCenter processes many thousands of instructions every day from many different function centers within the system. Resellers place orders which become visible and are automatically allocated on vendor and distributor dashboards. Quotes feed into orders, and orders feed into stock. Credit is allocated and payments are processed.


But how does this all work?

 

Firstly, let’s note some things on an overview level:

  • The process uses a disconnected architecture. 
  • The architecture is based on a software design pattern called The Adaptor Pattern, which utilizes an AWS managed service called SQS (Simple Queue Service), a robust auto scaling message queue.
  • The web layer and the adapter layer are run on auto-scaled EC2 instances which grow and shrink the number of virtual instances as the load grows and shrinks.

 

The process works as follows:

  1. The auto-scaled website places the order.
  2. The message is placed into the message queue.
  3. The message is picked up by one of many auto-scaled adapter applications.
  4. The adaptor app picks up the detail of the order and figures out which specific vendor the order is for.
  5. If the adaptor is configured for that vendor, it will collate the credentials for the order and attempt to place the order via the specific adaptor implementation for that specific vendor.
  6. The order status is updated based on the vendor response. Either as Successful, Unsuccessful or the message is returned to the queue for a retry at a later stage.
  7. In the case of asynchronous orders, order assets and statuses may be updated later when the adaptor polls the vendor API endpoints, in order to gain updated information on asynchronous orders.
  8. Orders that are constantly returned to the queue eventually move to a dead letter queue for processing by ChannelCenter support staff.

 

 

Amazon’s Simple Queuing Service (SQS)

Image showing how Amazon's Simple Queuing Service (SQS) works in relation to ChannelCenter

 

Amazon Simple Queue Service (SQS) is a fast, reliable, scalable, fully managed message queuing service. SQS transmits any volume of data, without losing messages or requiring other services to be always available, and runs within Amazon’s high-availability data centers, so queues will be available whenever applications need them.

 

There is no limit to the number of queues
or messages one can use...

 

All messages are stored redundantly across multiple servers and data centers to prevent messages from being lost or becoming unavailable, and scale dynamically with the application. There is no limit to the number of queues or messages one can use, and standard queues provide nearly unlimited throughput. In addition, authentication mechanisms are provided to ensure that messages stored in Amazon SQS queues are secured against unauthorized access.

 

Amazon EC2 Auto-Scaling

Auto Scaling helps users maintain application availability and allows them to scale their Amazon EC2 capacity up or down automatically according to conditions they define. It can also be used to help ensure that users are running their desired number of Amazon EC2 instances. Auto Scaling can automatically increase the number of Amazon EC2 instances during demand spikes to maintain performance and decrease capacity during lulls to reduce costs, and is well suited both to applications that have stable demand patterns, and those that experience hourly, daily, or weekly variability in usage.

 

 

Insights