다음을 통해 공유


Active Object Design Pattern

This article describes the** Active Object design pattern**. This is a concurrency design pattern, a category of design pattern used by software engineers when writing computer programs.


Introduction

The Active Object pattern is a design pattern, used in software engineering to manage multiple concurrent processes on separate threads or even different machines.
It does this my "decoupling the method from its invocation", meaning the method is triggered as the result of a scheduled message, through a queue, rather than directly.

This pattern is asynchronous in execution.
First, a call is made to the Proxy, which is the only publicly visible part of the pattern.
The proxy makes the Method Request, which contains "context information" about the method.

This is passed to a Scheduler. The method is now decoupled and on the scheduler thread. 
The scheduler decides which order to queue the Method Requests in the Activation Queue.
When the Scheduler picks up and executes a Method Request from the Activation Queue, it uses a Servant to do the actual work.
Finally, a Future (or Callback) is used to receive the returning data.

Benefits

This pattern enhances concurrency.
It also makes synchronised access to multi-threaded processes much simpler.

 

Return to Top


Examples of the pattern

[please contribute]

 

Return to Top


See Also

Link to domain parent articles and related articles in TechNet Wiki.

 

Return to Top


Community Resources

These are the external links, including links to Microsoft and TechNet sites that are non-Wiki

  • Active Object [PDF] - By R. Greg Lavender & Douglas C. Schmidt

 

Return to Top


References section

Use this section if you pulled source material and ideas from other sites, blogs, or forums. Make sure you have permission from authors to use their material.

  • [Please contribute]

 

 

Return to Top


http://c.statcounter.com/8278708/0/13fc676e/1/