I'd propose a slightly different solution. Have your
request. The data object uses MBV and is read-only.
discards it. Does that sound plausible? BTW, the
e.g. it's a tree instead of a monolithuic object. If you
Brian Muth wrote:
Are the clients on the same machine as the server? If so, you may be
trying
to solve a problem that doesn't even exist. How many clients do you
expect?
How many method calls per second are expected?
Obviously you want to avoid MBV if possible because it introduces new
problems, such as consistency of information in the marshaled values and
the
values held by the server objects.
Frankly, I don't even like your design for controlling which apartment
the
object is being held. You should be picking the apartment and hard-coding
it. Again, this is an example of "pre-mature optimization".
Clients & servers are on same machine. My initial research into COM
some months back, was showing that it took something on the order of
1msec per method call across apartment boundaries. I have an
indeterminate # of method calls (probably between 5 and 25) that need
to be repeated at a rate between 4 and 10Hz. I cannot control these
numbers, they are chosen by the project using my COM servers, but
cross-apartment calls are very likely to be too high for my
application.
I don't take offense at the "premature optimization" but it has been a
bit disheartening to hear it on several newsgroups on different aspects
of this project. I would agree with that statement if I had much more
resources available to change direction as necessary. But I am severely
constrained by my skills / resources / time available on the project,
which are available only in opportunistic, unpredictable bursts, and I
have to spend a good fraction of my time just re-remembering the
complexities both of COM and of my application. The interfaces I have
described are a prototype to try to finalize the design. I am
desperately trying to understand what options I have, and choose the
right method, because once I have picked an approach, the cost is
painfully high later to change it. If it takes me twice as long to get
it right the first time, that's worth it in my case.
after some thought, I'm starting to think that the right way to do this
is to invert the batch / generator relationship, to create the batch
object in the apartment it will be used, link it to the generator
outside the apartment, and have the batch object get an update of data
from the generator in one cross-apartment method call. Then my client
program can do all the method calls (intra-apartment) to the batch
object to examine the data.