473,796 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need Advice on Multithreaded Socket Server

I want to prepare some training for some new employees regarding the
topic of multithreaded socket services implemented in PHP. I've been
able to implement this with my own design, but I'd like to hear your
thoughts on what you think are some good design goals, such as
answering a question like, "Would you open a pack of 5 socket
listeners each time you go over a socket threshhold, just to make the
server that much more available?" Or perhaps a question like, "Would
you create a 'knock-knock' port for all initial connections and then
ask the client apps to come in on another dynamic port?" Or perhaps,
"Would you prefer to mix UDP and TCP for fault tolerance?" I'm just
looking for the best advice.

Specifically, I was hoping to demonstrate a fake SMTP server that
would drop the "emails" as text files on the hard drive, or perhaps a
simplistic Telnet server that allows one to at least do 'cd' and 'ls'.
Jul 17 '05 #1
1 3320
>I want to prepare some training for some new employees regarding the
topic of multithreaded socket services implemented in PHP. I've been
able to implement this with my own design, but I'd like to hear your
thoughts on what you think are some good design goals, such as
answering a question like, "Would you open a pack of 5 socket
listeners each time you go over a socket threshhold, just to make the
server that much more available?" Or perhaps a question like, "Would
you create a 'knock-knock' port for all initial connections and then
ask the client apps to come in on another dynamic port?" Or perhaps,
"Would you prefer to mix UDP and TCP for fault tolerance?" I'm just
looking for the best advice.

Specifically , I was hoping to demonstrate a fake SMTP server that
would drop the "emails" as text files on the hard drive, or perhaps a
I can't imagine a SMTP server that uses a knock-knock port. None
of the clients will know how to use it.

If you're going to implement a fake SMTP server, you need a *REAL*
SPAM filter. Even if it only listens on 127.0.0.1.

I also suspect that if you implement a blackhole SMTP server (it
says it accepts all mail, and makes absolutely no attempt to deliver
or log anything or examine mail headers or write anything to disk),
and leave it open to the Internet, it *WILL* be overloaded by
spammers, since it looks like an open relay, even if it never
delivers anything.
simplistic Telnet server that allows one to at least do 'cd' and 'ls'.


Gordon L. Burditt
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
5326
by: Sidd | last post by:
Hi, I tried finding and example of multithreaded client-serve program in python. Can any one please tell me how to write a multithreaded client-server programn in python such that 1.It can handle multiple connections 2.It uses actual threads and not select() or some other function
0
1061
by: Sam Sungshik Kong | last post by:
Hello, C# gurus! I and my friends are planning to make a socket program just for practice of C# programming. It will be made up of a client program and a server program using a specific tcp port (e.g. 10000). The client program will send a connection string and a sql statement to the server program. (The DB is on the server side, of course) The server program will return the result set of the sql statement as a form
7
2389
by: Colin | last post by:
I'm writing a little console socket server but I'm having some difficulty. Can I ask your advice - where is the best place to get some help on that topic? It would be nice if some people who knew what they were doing could take a look at my code and tell me where and why I'm going wrong. Any suggestions of groups or forums?
1
1341
by: Krupa | last post by:
Hi All, I am developing a multithreaded application in c# on vs 2005 (compact framework 2.0). I want to have a socket server in a background thread and want to continue with the windows form code in the main thread. In my main windows form (called 'default'), I have instantiated a class called 'Interop'. The 'interop' class has a function called 'instantiateSocketServer' that instantiates the SocketServer class. I call the...
7
2063
by: John Paul | last post by:
I'm thinking of building an e-commerce site in php. Anyone got any advice in building one? What is the best way to implement a payment system? Are any legal issues involved? Thanks,
2
4324
by: NaeiKinDus | last post by:
Hi there :) I'm trying to code a webserver running under WinXP, multithreaded, etc... The creation of my threads, the handles, everything works fine except this : the WSAEventSelect. The first occurence of this function is in the main() and manages connections. If a connection is accepted, it sends the newly created socket to a thread that will handle both FD_WRITE and FD_READ...
7
4656
by: gnanapoongothai | last post by:
hi, the error i am getting in main for allocating heap memory for threads is #include <stdio.h> #include "winsock2.h" #include <stdlib.h> #include <windows.h> #include <strsafe.h> #define BUF_SIZE 255 #define nofthreads 2
6
2986
by: zaina | last post by:
hi everybody i am nwebie in this forum but i think it is useful for me and the member are helpful my project is about connecting client with the server to start exchanging messages between them. to be more clear we process this purpose we serve this to the student in the university. how?? student will send a message that contains his name,id and request by format the server want such as zaina-20024008-grade. the grade is the request...
0
1583
by: Chris Rebert | last post by:
On Mon, Nov 17, 2008 at 10:42 AM, Abah Joseph <joefazee@gmail.comwrote: Have you considered basing this off existing software for schools, like one of the programs listed on http://en.wikipedia.org/wiki/Learning_management_system ? Sounds like one hell of a project. Are you sure you aren't encountering the Second System Effect (http://en.wikipedia.org/wiki/Second-system_effect) despite this being
0
9680
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.