Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Monitoring System + Command Pattern + UML

 
Jean Marcel Bacan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, i'm starting with OO Design and I would like to add the command pattern to the UML design attached.

It's a very simple project to monitoring servers and data. I'm going to schedule three lists of commands (high, mid, low priority):
One command to execute query in different tables and databases.
One command to check many Webservices.
One command to check many URLS.
One command to check some data from external access.
Maybe Generic Command in the future to do another kind of verification.

I need to grow this databases sqls, urls, webservices dynamically without change the application. (Using database or properties).
If I need other kind of verification is acceptable that i do programmatically.
In the future some developer easy creates another command.
I'm trying to solve the old system problem: Many URLS or queries = Many Tasks = Thread concurrency problem.

Does Command pattern fits here?
Do I have to change some class?
My UML diagram looks correctly? (external developer needs to understand).

Thanks, any opinion will be nice. (good or not).
command.png
[Thumbnail for command.png]
Command Pattern + UML
 
Junilu Lacar
Bartender
Posts: 7570
52
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, parallel processing is one of the problems that can be addressed with the Command Pattern.
 
Sunderam Goplalan
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The FileManager class is just to use to store the commands, correct? I believe the "execute" methods of the commands will read the File Manager, get the commands and execute the appropriate
action?

Is there a reason you are using a "LinkedHashSet"? Did you want to maintain the order in which commands are added?
 
Jean Marcel Bacan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, just to store, some TimerTask class will read the list in FileManager over time.

Good point, the commands aren't related each other, so I don't need the know who came first.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic