aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Big Smokes cigar assignment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Big Smokes cigar assignment" Watch "Big Smokes cigar assignment" New topic
Author

Big Smokes cigar assignment

Lann Lu
Ranch Hand

Joined: May 31, 2008
Posts: 45
I got the same Big Smokes Cigar assignment, and here are some of my thoughts, they are half-formed, please correct me if I am wrong.

1. It is not mentioned that what kind of interface the Merchant Bank supports, I think the appropriate assumption could be
a)proprietary API (internet) or Webservice,
b) Proprietary security or SSL solution.
c) No global transaction is supported.
d) Synchronous mode

2. Since the interface with the third party manufactures is JMS, also system needs have high performance, therefore making a synchronous call to JMS provider (MOM), and wait until response comes back is not acceptable. What I am thinking now is the stock's Availability Check should be composed by 2 parts
Async part: there is independent thread which periodically poll third-party inventory system using JMS. We may or may not be able to use MDB. The result needs to be cached and shared somewhere.
Sync part: During the "Search for Cigars" and "Add Cigars to Cart" use cases, the "Stock Availibity" is checked using the result which is cached and shared previously. We may introduce a threshold to define how stale the information is.

3. A technical risk is there is no way to guarantee that the number of units available is accurate. There is no pessimistic like mechanism here, therefore there are always cases where payment is made through, but there is not stock eventually. We may need to consider how to reconcile this situation.

4. Related to point 3, there must be another interaction with third-party inventory logically, that is, after transaction is complete, the system need to update the inventory system to decrease the number of units available. Otherwise the "Check Availability" will never get correct number. I think this extra interaction can be performed asynchronously together with notifying shipping companies.

5. Based on the "Business Domain Model", the relationship b/w products and manufacturers are many-to-many. So generally speaking, a given product and be made by multiple manufacturers. This many-to-many relationship will complicate the "Check Availability". There may need some iteration logic like: if manufacturer A does have enough items, then go to manufacturer b... etc. Then it becomes even worse that one order may involves multiple third-party inventories (say 50 items from A, the other 50 items from B)

6. Login module is not mentioned, we can assume that a 'Login' use case is required. But we don't need to show it in diagrams since it is not the focus.

7. We may or may not store Credit Card information. I was wondering if the testers want to know how we handle storage of credit card in database and memory.

8. In order to resolve the design concern of system performance and availability requirement, the profiling module is required. Also MBean(s) may or may not be required the expose system's healthiness to enterprise monitoring tools like Control-M/Patrol etc.

9. In the "Pay for Cigars" use case, following activities are involved, we need to design how to handle transaction/recovery. Global transaction with email server and Merchant bank is not there.
a) Local database updating
b) Queuing message for stock system update (we may use Topic, instead of Queue)
c) Queuing message for shipping company notification (we may use Topic, instead of Queue)
d) Sending email
e) Payment call to Merchant Bank


Your thoughts are appreciated.

Peace,

Eduardo Plata
Greenhorn

Joined: Nov 19, 2004
Posts: 17
Hi, thanks for sharing your thoughts.

I am developing my assignment and I still have doubts if the JMS request/response (temporary topic) is not fixing the 5 seconds restriction, what if I use a timeout model where set availability to 0 if timeout is reached? what about define a SLA with your manufacturers, it can be an assumption? I don't know if design a backgroud process caching the availability is outside of the scope.

About shipping, there is two providers, now when you have to calculate the shipping cost, there is no information how to get it, shipping companies only provide service for accept shipping request and not for calculating price based on quantity, address or weight, then my assumption is that price are fixed and shipping compannies (Shipping methods)should be on the business model too.

Regards,
Lann Lu
Ranch Hand

Joined: May 31, 2008
Posts: 45
Hi, Eduardo,

Thanks for your comments.

Yes. I agree with you on the assumption about the dependency on the shipping method for shipping fee calculation. We can safely assume that this calculation logic is statically defined in Big Smokes Cigar system through lookup table(s) or configuration files, or other means. No need to make a call to shipping companies upon individual order. The major interaction with shipping companies is to post "completed" orders to them. This interaction should be asynchronous.

As for the "Availability Check", it is crucial. I don't think any messaging venders can provide this kind of SLA (like 5 seconds restriction) under high load. Also please remember for each "BIG" order it may need to invoke multiple third-party inventories. Moreover, there is no way to guarantee the number of availability is precise anyways. In my view there is no other option except an asynchronous approach.

Just my 2 cents,

Peace,

J J Wright
Ranch Hand

Joined: Jul 02, 2008
Posts: 254
Hi,

If you haven't already, take a look at the blueprints adventure builder app. I think you'll find answers to a lot of your order processing questions there.

Regards,

Jonathan


SCJP, SCWCD, SCBCD, SCEA 5
liu hong
Greenhorn

Joined: Feb 11, 2009
Posts: 3
Dear Lann Lu,

If we can assume that “the credit card will be charged only once the order is prepared, and ready to ship.”

This is what the website http://www.bigsmokecigars.com is doing now.

Then I think that if we make a assumption like above, then there is a possible that we don’t have to make very precisely numbers when we make ‘available check’ from inventory system.

If you use http://www.bigsmokecigars.com as a customer, you could some ideas from it.

I am just a beginner of SCEA part II. Hope to communicate with everyone in this forum.
Merlin Jacob
Greenhorn

Joined: Sep 05, 2006
Posts: 10

Is anybody currently working on this assignment?

Thanks,
Merlin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Big Smokes cigar assignment