File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Command Pattern and Concurrent design Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Command Pattern and Concurrent design" Watch "Command Pattern and Concurrent design" New topic
Author

Command Pattern and Concurrent design

Gerald Davis
Ranch Hand

Joined: May 15, 2002
Posts: 872
Because of the limits imposed on developing faster computers, the only way forwards is going to be multi-processor computer. To take advantage of those systems we need to design our application to take advantage of this different architecture. Concurrent design is the future much the same way that Object Oriented technology has today.

I want to know if the Command Pattern makes concurrent design simpler to implement. I don�t understand the implication of using Command Pattern in a concurrent application.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Well, the implications will depend on how you implement the Command pattern, not the pattern itself.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Command is nicely suited to parallel processing. If I want to ask another thread (potentially on another processor or JVM) to do a task I encapsulate the task in a Command and pass it along. I can pass new commands to another process without warning because it will execute anything with the proper interface.

For cluster management I execute Commands and gather information from six servers in a cluster by passing the command name, not the command itself. That's not quite as kool becuase I have to deploy the commands to the servers.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
Consider Paul's rocket mass heater.
 
subject: Command Pattern and Concurrent design
 
Similar Threads
Question about HttpRequestWrapper and HttpResponseWrapper
HashMap with umm...method invocations?
java.util.concurrent Package
To scott and Henry
WebSphere Command Pattern