• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

how EJB Timer Service should be better exposed. Class or Sequence ? (Part 2 question)

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

in one of use cases from my assignment, server side service needs to perform repeated requests to web services. I think EJB Timer Service is a good fit for that. Now, is the question how it must appear on diagrams ? There is better to put it (class or sequence or deployment) and is there standard UML notation for timers ?


another question. assignment requirements says that system needs to communicate with 3 different web service external resources and I defined an interface on a class diagram for that. Should I put those systems on class diagram too or interface is enough.


Thanks in advance,
I'ja
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Where to put EJB timers? IMHO class, sequence and component diagrams. Check out how others incorporate timers here

EJB Timer and TimerService are interfaces in the JEE so represent them as interfaces in the class diagram.

For the 2nd q, the external system's API can be assumed.
I somewhat talked about it here

 
Ilja Gucalo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for valuable answer, I would like to continue our discussion about external services on class diagram.

Question. I have been noticed from many resources that diagrams in Mark Cades books is something what Oracle expect. But, then I had checked diagrams in book, I have found that integration with external systems are not presented in class diagram at all. Its looks like domain model converted to classes but diagram doesn't cover all functional requirements from assignment. So, does Cades book example really fulfil Oracle expectations ?


In terms of external webservies presentation in class diagram I did following: I presented two classes annotated as a stateless beans, inventory stateless bean and market bean. Market bean has 3 related methods inside (something like requestDataFrom()), its don'e because markets bin will act as a client for 3 different external web service resources. Are you agree with my solution or You like me to think more about it ?

thanks for previous response and thanks in advance,

L'ja
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cade's diagram or even Sheil's diagram is for reference only. How accurate they are ... everyone has his/her opinion. So you be the judge on that.

As for the other q, I let you think some more first. I'm not saying your current approach is good or bad. Just curious what assignment you got?
 
Ilja Gucalo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on Gemstone International Assignment
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah the Gemstone assignment. You need to get data from those different markets basically continuously so a timer can be used. Depending on the response time of such API call, no delay period may be needed in between calls.

Fetching data from markets is one thing. How your SUD using such data is another. You need something in between. I let you ponder that.
 
Ilja Gucalo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for letting me to think more. I get back with refreshed thoughts:


1) requirement is to make 3 WS requests to open markets in continuous iteraction . Another requirement is that iteration actually repeats 1 MINUTE TIME FRAME. I see a risk here that web services execution could take longer than 1 minute if we execute them one after another in a synchronous way. So, I decided to decide asynchronous web services call for 3 open markets. So, on start I will run all 3 requests to markets in parrallel. What do You think about my idea ? is it good or you ask me to think more ? In case of going asynchronous way, I decided to go with Messaging, MDS and Queue. I prefer this apporach to multi threading, are you agree with me ? All that adds additional complexity to the system and I am worry, if it really needed.

2) question about asynchronous communication. I can't find any common design solution for the action "method call" which need to be executed then exactly 3 open market services returned responses. In other words, execution after last of 3 callbacks completion. Any help here ?


3) question about the Inventory. I found some trick in use case descrition. Calling use case we use "check inventory levelS" but "Check Inventory" byitself contains an action retrieve inventory level (single). It looks like, we do a request for collection of stones to use case and retrieve level per request doing a call to Inventory service. Is it just some minor mistake in assignment or its a trick thick I must to resolve. As from my understanding, inventory returns 1 stone level per request, am I correct ? What do You think about doing a calls to inventory in asynchronous way too for performance improvement ?

4) check inventory use case has only one caller in description, but as a fact it can be called from other use cases too. In more details, item in use case actions started from receive request from one service but on practice two use cases (services) can do a request to it and those two use cases I will implement using different managers. How do I need to dial with that ?






 
Ilja Gucalo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"How your SUD using such data is another. You need something in between. I let you ponder that." Could You please extend it in more words. Thanks.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The messaging queue thing is a good option for calling open market so you are on the right track. At least that's how I would do it.

For the check inventory and monitor stone prices are somewhat go hand in hand. Think stock market where real time prices fluctuate. Same idea for this inventory/stone price thing.

Some use cases "include" other use case which make it kinda hard to follow, but if you expand the basic flow to detail flow (method calls) you should able to figure it out.
 
Ilja Gucalo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, then I go with a next question. I had this understading before: system check all markets first. Then all 3 responses received, check inventory and following actions executed under composite result from all 3 markets.

I am thinking about second option now. We execute check inventory and create order immediately after each request to market.

would you suggest first or second option ? In case of second its suppose to have transactions on not on diagram ?


 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm it's getting to a point where I'm suggesting and you follow, which is NOT allow.

Honestly whichever route/decision you choose, you should document it as an assumption or relevant area. As long as you can justify your decision, you will be fine.
 
Ilja Gucalo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
good day and lets continue our nice interesting and valuable discussion. I will ask it in thins thread instead of opening new, as all is very realted. I still very confused with an assignment and cant get clear picure of the flow. You are my chance to find the truth. So, we have a "Check Inventory" use case and it is said that it requested from "Monitor Stone Prices" usecase only. At the same time "Create Manual Order" usecase needs to check stones for availability too, which to my mind must be done by "Check Inventory" usecase at least I don't see any other ways to do that. Could you help me in a some way with this confusion ?
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic