Question

I need to come up with a design for real-time data update from a COTS product (a Point of Sales system) to a custom-built .NET application (an Inventory Management system).

Particularly, any sales transaction happening in POS system needs to update the inventory database (present in Inventory Management system) immediately (in real time). The only way any other system can communicate to the POS system is via its API exposed as web services.

I have thought about introducing a Service Bus (or any such EAI tool) in between the two systems and taking advantage of the publish-subscribe model so that any sales depletion happening in POS system will trigger data update to the IM system via the service bus. My questions are:

  1. Is it a good/feasible solution?
  2. Do you have any other suggestions for such real-time data synchronization between different systems?
Was it helpful?

Solution

First, as the comments point out, you aren't really talking about realtime here -- that has a pretty strict definition and implies lots of stuff that isn't really on the table. You are talking about connecting two systems in a near realtime sort of manner.

Anyhow, yes, the best bet would be some sort of message queueing solution here. The POS system would push updates into the queue and the inventory system would read the queue. Pub/sub could come into play here as well depending on how you want to do things on the back-side.

The reason you want message queuing and not some really hard, realtime sort of dependency is because you probably don't want to stop taking transactions if/when the inventory management goes down for whatever reason. Rather you can record things (message queue) and then replay them when it comes back up.

The real question is does that POS system have the ability to push data out somehow or are you reduced to some sort of middleware polling solution grabbing transactions and stuffing them into the message queue.

OTHER TIPS

I think there are several ways to make synchronization between two system and I guess it is similar with that how to share memory in clustering.

You may sync data in system as below ways

  1. share memory using memcached
  2. share memory using DB
  3. update data to the IM right away.
  4. Save data only in one system and either system use the data just by calling API you may be getting timing issue if you use 3 or 4

If you want to reduce timing issue, I recommend you'd better use way 1 or 2

Licensed under: CC-BY-SA with attribution
scroll top