Help needed: TCP Server questions/problems

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

From: Matthew Speed (mspeed_at_mspeed.net)
Date: 02/13/04


Date: Fri, 13 Feb 2004 16:20:03 -0500


(About me: I know very little about writing server applications. I
have done plenty of VB6 desktop app work but this is my first server
program. I got it to work by modifying examples. I understand what
it is doing but not much about what is involved in extending it. )

I am not necessarily looking for code examples here, just some
pointers as to what direction I need to proceed to resolve these
things.

I have written a multithreaded TCP/IP server. This program's job is
to listen to requests from a Java program running on some wireless
phones. On the server side it interacts with SQL Server 2000. It
accepts connections, is passed login credentials, recieves some data
update from the client and sends back some results. The program
itself works fine. I am now trying to improve upon it and have run
into the following issues/problems:

1. I want this to run as a Windows service a la SMTP. When it runs as
an interactive program it consumes 5-8% of the CPU time. When it runs
as a service it consumes all it can get. When it runs it is ALWAYS
the top CPU user on the machine. I like to think that when clients
aren't connected it shouldn't be using 90% of the CPU time.

2. I would like to be able to monitor what it is doing. When I ran
it as a console app I could write out messages to the console telling
me how many clients were connected and what they were sending or being
sent. I would like to wite a monitor program that can tap into the
service that can receive the equivalent messages to be displayed in a
text window since services don't get to talk to the console. My first
thoughts would be to try to treat it like a COM object and raise
events but I don't know if that model works in VB.Net or with services
in general.

3. I would like to be able to log each clients' conversation to a
text file for review. I created a logfile class with open,write and
close methods that creates/opens a log file. This works fine in the
console app but the service app seems unable to do this. Do services
have the ability to write to the filesystem?

TIA



Relevant Pages

  • Re: Selling the boss on a "publish to the web" Access app?
    ... Go to www.officelive.com, this free small business edition is only available to North America customers right now however. ... Are the users app specific where certains users can log into that app or have rights to it but not others? ... The person coming in the door that wants to sell new carpets or new desks or a new paint job on the walls or even a new computer has to justify that they're going to save the company money. ... I suppose you could bring in a whole bunch of IT people, and go through all enormous expenses and dangers of security of setting up a web host server. ...
    (comp.databases.ms-access)
  • Re: Homegrown synchronization
    ... to check for update files in the Import DropBox for the server. ... similar to the import code used to update a remote backend). ... code to close the "sync" app. ... synch app, but only one at a time would be able to do synchs. ...
    (microsoft.public.access.replication)
  • RE: Beginners Questions
    ... We do use Windows form on the presentation layer which is on ... terminal server and call web services on the business logic side. ... of using "proxy" authentication on SQL Server. ... > I have written an app with a Windows Forms UI that is deployed to clients ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: RemoteApp Dialogs Disappear
    ... Does this happen with all applications, ... MCSE, CCEA, Microsoft MVP - Terminal Server ... We are publishing our app through RemoteApp (Terminal Services ... this behavior varies between clients. ...
    (microsoft.public.windows.terminal_services)
  • Re: Ruby Enterprise App Design Advice
    ... Load balanced to send user to best server. ... FastCGI or SCGI - We would like to replace FastCGI with something ... certain instance and want to have a single session server (if I understand ... deals with login and logout and assigns an app server. ...
    (comp.lang.ruby)