Compnent burden

2 views
Skip to first unread message

Ayende Rahien

unread,
Feb 26, 2008, 10:33:12 PM2/26/08
to castle-pro...@googlegroups.com
Assumptions:
We need to call Release on the components in reverse order of their creation.
A lot of people will neither call release nor dispose of the container. This mustn't put undue stress on the system, or additional requirements from the user's perspective.
We already track the creation of components, using the component context. Right now it is done to track cycles, but it is entirely possible, and desirable, to use this as the basis of information for the solution.
 
Possible implementation strategy, taking this information and putting it in a weak ref dictionary, and using that when we either dispose of the container or release a component.
 
Issues:
 - We add additional shared state to the container, would have been better if we could have done that on the object level itself, but that would turn all components into proxies, and I don't think we want that.
 
Questions:
 - Do we care enough to use finalizers?

Hamilton Verissimo

unread,
Feb 27, 2008, 8:38:00 AM2/27/08
to castle-pro...@googlegroups.com
That's not really the kind of strategy I have in mind. I want to have
one "burden package" per component, so it wont be a linked list of
dependencies. This will have the direct dependencies created. There is
also room for smart optimizations based on some assumptions.

I need to draw what I have in mind, typing is awful.


--
Cheers,
hamilton verissimo
ham...@castlestronghold.com
http://www.castlestronghold.com/

Ayende Rahien

unread,
Feb 27, 2008, 8:52:01 AM2/27/08
to castle-pro...@googlegroups.com
Oh, I can see that.
Do you agree about the place where we should store it?
 

Hamilton Verissimo

unread,
Feb 27, 2008, 8:55:57 AM2/27/08
to castle-pro...@googlegroups.com
I can't tell right now. I'd have to dig it and do more experimentations....

We can discuss this in a few days, right?

Ayende Rahien

unread,
Feb 27, 2008, 9:01:19 AM2/27/08
to castle-pro...@googlegroups.com
Sure.

Markus Zywitza

unread,
Feb 28, 2008, 2:55:39 AM2/28/08
to castle-pro...@googlegroups.com
Hi all

I have written up a short explanation of what the component burdens are:
http://mortslikeus.blogspot.com/2008/02/component-burden-concept.html

Can someone please check whether I have completely missed the subject
or have other blatant errors in it?

-Markus

Hamilton Verissimo

unread,
Feb 28, 2008, 6:54:29 AM2/28/08
to castle-pro...@googlegroups.com
Yes, you missed it. The container already keep track of what it should
dispose. IIRC this is called ReleasePolicy.

The component burden is another beast altogether.

Markus Zywitza

unread,
Feb 28, 2008, 12:30:01 PM2/28/08
to castle-pro...@googlegroups.com
Hi Hamilton

> The component burden is another beast altogether.

Now I'm puzzled. Looking at this post
http://groups.google.com/group/castle-project-devel/msg/b64ee8514df84562
I assumed that I'm not too far off the topic.

However, when I finished my current iteration tomorrow evening, I'll
read Anders patch and try to find out...

-Markus

Reply all
Reply to author
Forward
0 new messages