wood burning stoves
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
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Command Pattern and Concurrent design" Watch "Command Pattern and Concurrent design" New topic

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

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
I agree. Here's the link: http://aspose.com/file-tools
subject: Command Pattern and Concurrent design
It's not a secret anymore!