Definitely neat! However, it would be very nice of one could store other types than strings (i.e. pointers to stuff, with more application data) rather than having to use lexical_cast.

I've been reluctant to allow something like that, as it is non-trivial
to make it work with multi-threading and pretty much impossible for
clustering. The void* Attachment is somewhat of a compromise in this
respect.

I have very little knowledge of how clustering is implemented (i.e. pardon my ignorance :), apart from the fact that data changes are detected and sent much in the same way as different aspects communicate.

I may also have misunderstood the design goals and uses of attachments. I thought it was just a way to decorate/enhance opensg-objects with random user data, such as names and other things (one could imagine having a list of time dependent animation controllers, etc.).

From that perspective, I fail to see how the void* could be of any use
at all between different OpenSG apps that run on different computers. (I assume pointers aren't equal across semi-identical processes, or perhaps they are, but how do you transfer what's being pointed to, or ensure that it's destructed properly?)

I don't mind being enlightened though. :)

Would it be possible to get some extendable class called AttributeValue and store pointers to that in the map instead?

MT and clustering depend on a little more than copy and dtor. It's
probably possible to tweak MT to get somewhat usable, but cluster just
won't work.

You mean like change notification, serialisation and identification? Those could be added to the base class (i.e. Attachment). But then it might get too heavy?

I've tried to avoid allowing stuff that people would depend on and that
just doesn't work with cluster, because at some point they would then
come to us and ask how to do it. ;)

Entirely understandable. :-D

(Seriously, I've been thinking of doing something like this, since it would indeed be useful for us in some places, but so far the current const char*/void* interface has have me stumped.)

?

I wanted to set some stuff in the void* which would be destroyed along with the AttachmentContainer itelf but as the void*-mem isn't deleted, this is not possible.

Perhaps I approached the whole thing with the wrong idea. What are the typical uses of the void* attachment in a cluster environment?

/Marcus


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to