Re: basic remtoing question

From: Allen Anderson (allen_at_sparkysystems.com)
Date: 04/15/04


Date: Thu, 15 Apr 2004 11:13:55 -0600

0. singletons are multi-threaded, so your calls will come in on
multiple threads into the same object. You need to make sure your
singleton is threadsafe.

1. I would put all the calls into a single dll although you may want
to break it down into classes that implement specific parts of the
functionality. Making a single object that exposes all your methods
is unwieldy.

Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com

On Thu, 15 Apr 2004 10:07:21 +0300, "MR" <nospam raab at biconix dot
com> wrote:

>i would like to organize a db-layer so that all sql related code (ado.net)
>exists in a single namespace in a single dll. the dll will then be
>accessible via remoting. i expect that the remoted object will be quite busy
>and response time is super-critical (250ms)
>the questions i have are as follows:
>0) if i create it as a singleton, does the entire object become single
>threaded or is each method single threaded. or is it better to create it as
>a single use object? (the disadvantage of a single use object is that it
>would have to go thru a small initialization procedure each time i.e. read a
>config file to get the name of the sqlserver and database, open the
>connection, etc.)
>1) is it advisable to have all 30 methods in one dll or should i split it up
>into individual dlls (a pain to maintain)
>



Relevant Pages

  • basic remtoing question
    ... i would like to organize a db-layer so that all sql related code ... exists in a single namespace in a single dll. ... and response time is super-critical ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Out of Memory Error: MultiThreading Problem?
    ... The main concern here is if the DLL is used by multiple threads but has a single 'static ... results if that buffer can be used by multiple threads. ... DLL would have to be used exclusively by a single thread. ... contains a copy of what's in the strMsg buffer, ...
    (microsoft.public.vc.mfc)
  • Re: Multithreaded DLL in Singlethreaded TCL App
    ... Is it technically possible and correct to load a DLL that can launch ... multiple threads through a TCL application that is essentially single ... if you do not pass "CRT objects" across the DLL boundary. ...
    (comp.lang.tcl)
  • Re: Out of Memory Error: MultiThreading Problem?
    ... results if that buffer can be used by multiple threads. ... DLL would have to be used exclusively by a single thread. ... Threads request for server connections and then data from said servers ...
    (microsoft.public.vc.mfc)
  • Multithreaded DLL in Singlethreaded TCL App
    ... I have a multithreaded DLL exposed through SWIG interface for TCL ... The DLL launches multiple threads and tries to do some ...
    (comp.lang.tcl)

Loading