Basic questions for designing the COM Server

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

More than 5 years have passed since my last programming with ATL and
COM, so a lot has been forgotten. I have few basic questions to
address.

I am working with VC++ 2005 and I love this attributed programming.

My mission is to create few out-of-process COM servers, one would
reside in service module, the others would be in different executables.
All servers would be multithreaded, having some background worker
threads and a thread for communication to the outer world.

I wonder how to create such a service. Should my main thread be the one
that processes the message loop and does the COM stuff, and the other
threads do the background logic? I was thinking to spawn new threads in
PreMessageLoop() and terminate them nicely in PostMessageLoop(). Is
this how to do such things?

The other thing that is bothering me is the client/server
communication. The server module will work in multithreaded apartment
and I expect multiple clients calling the server in the same time.
Clients will mostly be scripts, so they will run in STA. Is the COM
framework providing me communication threads for free if more than one
client at a time calls my server? I don't want that one client blocks
other clients while making a call (except when it is needed due to
synchronization). Will even the STA clients work simultaneously and I
wouldn't need to worry about spawning new threads for communication?

Thanks for your answers,
B.

.



Relevant Pages

  • Re: REST, SOAP, approaches to web connectivity
    ... whether you are using REST or not there has too be a session server for the ... "something" will have to facilitate communication between these ... clients and your D3 server. ... Now all you need is the communication between the middle (http server ...
    (comp.databases.pick)
  • Re: Ideas on solving the file transfer problem
    ... Once the clients have negotiated a session they operate ... peer-to-peer and the server never sees the streams. ... Skype still relies on a centralized client- ... "switchboard servers" to "establish lightweight communication sessions ...
    (comp.programming)
  • Re: Instant Communication in ASP.NET
    ... and the like but realized that in an environment with 50+ clients ... communications with the server. ... Adobe Flex to build an app that provides communication to your primary ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: stop Socket.BeginReceive before comlpete
    ... Peer-to-Peer Communication Across Network Address Translators ... you will also need the socket to listen to the ... coordinate the two clients). ... Can you enlaborator how did you listen to the Server? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: .NET Runtime 2.0 Error
    ... Point 3) if you have the communicationmethod between the methods / classes well defined, you are having a perfect plan to understand why the server component is terminating. ... I have an internal message communication between the server and ... Clients have no communications between each other. ... > server will run fine accepting incoming connections and handling ...
    (microsoft.public.dotnet.languages.csharp)