Summary: | Need to remove non-standard ciao_preactive and ciao_postactivate methods | ||
---|---|---|---|
Product: | CIAO | Reporter: | Nanbor Wang <nanbor> |
Component: | CIAO Container Implementation | Assignee: | Will Otte <wotte> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 0.3.5 | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 3253 |
Description
Nanbor Wang
2006-05-08 13:22:06 CDT
This looks fine with me. However, I wonder if we should reword it to emphasize the following points: 1. They are non-standard 2. Users should avoid using them 3. They will be deprecated (well, we haven't decided on this yet, but IMO it will be a good thing to do. 4. Elaborate more on how we will fix it in the future. I'll be happy to take a stab at this if we can agree on this approach. Thanks, nanbor On Tue, 07 Mar 2006 08:38:32 -0600, Gan Deng <gan.deng@vanderbilt.edu> said: > Hi Nanbor, Could you please make a pass on the Q/A entry I put up > with below? > Thanks, Gan > Q: What is the purpose of the ciao_preactivate() and > ciao_postactivate() operations and how do I use them? > A: The purpose of ciao_preactivate and ciao_postactivate methods is > to provide a mechanism for developers to enforce the order of > initialization of many components in an assembled application. > For example, the ciao_preactivate method can be used to initialize > certain services (such as application specific logging mechanism) > before all the compnoents in the assembly are activated through > ccm_activate. Similarly, the ciao_postactivate can be used to > finalize some services after components are activated (such as > sending diagnostic messages to the logging server if necessary). > In the future, CIAO component middleware will use the > "ImplementationDependency" tag under the > "ComponentImplementationDescription" tag, as defined by the OMG > Deployment and Configuration Sepcification, to specify the > dependencies a particular component could have on the external > environment, including dependencies to other components. > This looks fine with me. However, I wonder if we should reword it to
> emphasize the following points:
>
> 1. They are non-standard
> 2. Users should avoid using them
> 3. They will be deprecated (well, we haven't decided on this yet,
> but IMO it will be a good thing to do.
> 4. Elaborate more on how we will fix it in the future.
>
> I'll be happy to take a stab at this if we can agree on this approach.
That sounds fine to me. I think it's particularly important to address
point #4, i.e., we need to figure out how to alleviate the need for this
stuff, particularly in ARMS!
Thanks,
Doug
We could use the "ImplementationDependency" tag under the ComponentImplementationDescription, to specify the dependencies a particular component could have on the external environment. Please note, that i am making the following assumptions: 1. The external environment is also another component, as the logging service in the ARMS example, that Bala pointed out. 2. We cannot handle post_activate case with this, because the D&C spec does not believe on an intermediate stage between ccm_activate and ccm_passivate (and hence ccm_remove). We would need to define the semantics of post_activate more, to see if it is an implementation issue, in which case we can handle them as part of the component implementation logic. Current DAnCE makes all pre_activate calls, then makes all ccm_activate calls and then makes all post_activate calls. The new DAnCE will first activate all the components referred as "ImplementationDependency" (there must be some intelligence to derive which is the order of initialization), and then activate all other components. There would not be any post_activate calls. There could be some speed decrease in deployment time, because of the operation of the dependency-resolver algorithm, but its a one time occurrence. But now, we have the flexibility of reusable components at both the application level (composition of assemblies) as well as at a monolithic level (because the dependencies need not be specified as part of the implementation logic, but rather as XML descriptions). I have been wanting to explore this for sometime now, and would love to give it a try sometime soon. Thanks, Jai I think we should examine if we can use of ImplementationDependency to solve this problem, as Jai pointed out. Redeploying a component instance could be hairly tho. This stuff is coming out in the refactoring branch, activation ordering will be implemented later as a part of my research. ciao_{pre,post}activate are gone. |