Teja Saab wrote:Thank you Suresh, Shyam and Maverick for your valuable inputs. You are right Maverick that I cannot assume that the partner's implementation uses the replyTo queue to send responses.
I thought about the publish/subscribe approach. However, one of the issues that I am trying to figure out is how to avoid the inventory data from being stale. Let me explain.
(1). Each one of the manufacturers probably have several different partner B2C sites that sell their stuff. Also assuming that the manufacturers publish their inventory data using a publish/subscribe mechanism to all partners, it is just a matter of time before my inventory data becomes stale.
For example, Manufacturer 1 publishes inventory 500 for product p1 to 10 different web sites including the one that I am architecting. I update my system with inventory 500 for product p1. However, another B2C site probably makes a sale of 200 items before me and that reduces the manufacturer's inventory to 300 now. However, my inventory is still showing as 500 (assuming that the next publish is yet to come from the manufacturer). If I make a sale for 400 items, I won't be able to fulfill the order since the available quantity is only 300.
Teja Saab wrote:I am trying to create the architecture for a system that has an inventory system as one of its components. Assuming that the inventory system contains inventory levels for products manufactured by different companies, I am trying to find the best way to keep the inventory system up to date with the different manufacturer inventory levels. Each one of the manufacturer's systems supports a JMS interface.
The inventory data in the inventory system is used in a B2C site. So response time is important. Sending a JMS message to a manufacturer in real time to find out available inventory while a customer is waiting for the web page to update is not an option.
I am thinking of an inventory synchronization approach with two MDBs. The first MDB registers itself with the EJB container's timer service.
The timer can be set to fire every few seconds or minutes. When the timer is fired, the timer callback method in the MDB will send a request message to each one of the manufacturers incoming queues. The manufacturer will reply back with the availability to the replyTo queue. The second MDB configured to listen on the replyTo queue will process the incoming message and update the inventory system. The B2C site always interacts with the local InventoryManager class which will in turn talk to the local inventory management system. In other words, the InventoryManager class decouples the external manufacturer interfaces from the rest of the application thereby promoting loose coupling.
What do you folks think about this approach?
Thanks for your inputs and critiques.
Tomasz Romanowski wrote:The more I'm reading up on this the more confused I am. Both the wiki page http://en.wikipedia.org/wiki/Class_diagram ad well as http://www.developer.com/article.php/2206791 are referring to "Analysis Classes".
From what I see "Entity" and "Controller" in that context means something completely different from what I'd call it. They say that Entities contain business logic whereas Controllers don't contain any business logic but merely transfer the control to the appropriate business logic (Entity?) class. My understanding of a controller and an entity is that an entity represents a domain object (i.e. customer, order item etc) whereas a controller woudl be a business logic class very likely to be mapped to a stateless session bean.
Thoughts?
Tomasz Romanowski wrote:It is not clear to me what stereotypes are allowed in class diagrams. I want to flag one of my classes with a <<DataTransferObject>> stereotype but I've come across a few statements that make me believe that UML 2.0 specifies what stereotypes are allowed in class diagrams which would make it illegal to use anything beyond the defined set.
Martin Fowler's book "UML Distilled Third Edition", page 66 reads:
"In UML 2, stereotypes are defined very tightly, and describing what is and isn't stereotype is beyond the scope of this book". The wiki page http://en.wikipedia.org/wiki/Class_diagram lists only three stereotypes, Boundaries, Entities, Controls. Not sure if this is a complete set or not.
Chih-Wei Lee wrote:Hi Maverick:
Congrat!
How did you submit your assignment?
Did you submit your assignment via CertManager or email?
P Das wrote:This is interesting; they took initially <4 weeks; then another 2 1/2 months.
However, my case was an exception: you may expect the usual timeframe between 4 and 6 weeks.