Re: Remobjects, good in multi-threading environment?



Danijel Tkalcec wrote:

Using the RealThinClient SDK, you can simply set MultiThreaded to TRUE for your client-side connection component and have the RTC SDK handle all processing in background threads, while you can still make your calls from the main thread, from a timer or from other threads.

Hmm. Is it handled in a "real" backgroung thread, or does it simply create
a messagepump? Can I do things like WaitForSingleObject(event, timeout)
in my own threads, without it interfering with the communication?

There will be absolutely no need to shut threads down and all connection issues are handled gracefully by the RealThinClient SDK.

You see, each of my threads is designed to be suicidal. Any error results
in an exception being raised. And any exception causes a very thorough
shutdown of the thread.

My threads are state machines. When the internet connection (DSL modem)
breaks down, state is broken in the middle of the communication and it will
take some time before the line is functional again.
Any exception in a thread causes the thread to be shutdown completely.
Each method cleans up itself thoroughly and re-raises exceptions until
the exception propagates into the Execute() method. Then the execute()
method cleans up and quits. The destructor then removes the thread
from the heap.

Then, after a few minutes timeout, the thread is re-created and tries to
re-establish communication. If it fails, the process repeats itself until it
succeeds.

So you see, being able to recover from a breakdown is the core part
of the design. The only thing I must be certain of is that the objects that
I free are really disposed of properly and that they don't leave any
handles, hsockets or message queues dangling in the depths of the
operating system. I must be especially careful that they don't "fire" any
asynchronous events after being disposed of because these would
point to methods that no longer exist.

Do you need more proof of the RTC SDK stability?

What challenges my application is a particularly unstable environment
(comms between oil rigs and remote offices). With internet connections
breaking down and network cables being pulled inadvertently.
If I pull the network cable and re-insert it after 5 minutes, will RTC survive
that and continue business as usual?





--
Arthur Hoornweg

(In order to reply per e-mail, please just remove the ".net"
from my e-mail address. Leave the rest of the address intact
including the "antispam" part. I had to take this measure to
counteract unsollicited mail.)
.



Relevant Pages

  • Re: Remobjects, good in multi-threading environment?
    ... for your client-side connection component and have the RTC SDK handle all processing in background threads, while you can still make your calls from the main thread, from a timer or from other threads. ... MultiThreadeing is handled completely automatic by the RTC SDK. ... And any exception causes a very thorough ... If you don't handle it, your client connection will be closed gracefully and an error event is triggered, where you get notified about the problem. ...
    (borland.public.delphi.thirdpartytools.general)
  • get your potentially resuming element on board my squad
    ... exclusive era. ... require a transmission! ... it eases a contest too positive in connection with her ...
    (sci.crypt)
  • RE: Web.config update to allow remote connection to sql server 200
    ... The line throw an exception is this line: ... I looked at code and it seems hard that to find out what database connection ... Microsoft Online Community Support ...
    (microsoft.public.vsnet.general)
  • Re: SF: Refresher course
    ... All instant diplomatic house substitutes computers ... Hey, I'll decline the german. ... in connection with me it's ... access after Virginia blocks the strict kingdom's exception? ...
    (sci.crypt)
  • Re: Strange sudden shutdown issue with CF app
    ... Phone devices are notoriously low on virtual memory right out of the box because the OEMs decide to put every little thing into its own DLL and then have 25 processes launched at boot. ... Chris Tacke, Embedded MVP ... We have created an app that basically connects to a web service gets data, then stores it locally on the device, and when a record needs to be modified/added the system first tries to connect the web server sees if its availible, if not then it stores in locally on the device until the connection comes back, now I noticed that if the device does not mess around with the data connection then the application sits nicely as long as its open, and never gets shut down. ... But again most of the time I get no exception at all but just simply disappears. ...
    (microsoft.public.dotnet.framework.compactframework)