Section 3: Module 8: Part 1: the Active Object Pattern

preview_player
Показать описание
This video presents an overview of the Active Object pattern and shows how this pattern is implemented and applied in Android. It is a preview from my upcoming MOOC on Programming Mobile Services for Android Handheld Systems. Check out
Рекомендации по теме
Комментарии
Автор

Thank you so much for sharing. It is very rare that once can find good explanation about such type of design patterns.

ankitapatel
Автор

fantastic videos, very quality of the content, thanks Douglas !

shangtsung
Автор

1:45 application context of active object patterns - 1:48 client wants to invoke methods of an object that is running in another thread of control (1:59 generic issue)
2:37 we might have situation where some background thread wants to invoke an operation like say send message and pass a message to a handler that's actually connected to another thread of control
4:55 another thing: ensure that if you have long-running operations, they don't block other things from the process
5:42 active object pattern - 6:02 *decouple the thread that invokes a method from the thread that runs the method* 6:22 however, from the client point of view, this looks just like a regular method invocation 6:31 you just invoke a method 6:38 in particular, the client doesn't grab any locks, doesn't use any condition variables, doesn't do any queuing

6:51 the *intent* of active object pattern is to
6:53 define a service requests on components as the unit of concurrency ..
7:08 *enable the client & component to interact asynchronously to produce and consume service results*
7:26 explanation of the active object according to the given picture

8:45 *Applicability of active object pattern*
8:50 circumstance of using command processor pattern
9:18 when an object method may block during execution
9:23 e.g. download big files
9:25 grab a lock
9:26 long running computation that won't return right away
9:35 when multiple client method request can run concurrently on an object

11:44 *structure of active object pattern*
13:57 analogy in active object pattern
14:01 Wendy's - 14:09 cook-to-order on demand
15:08 *Future* is the little plastic token they give you with a number on it

ruixue