[Qt-interest] TcpServer: fork or threads?

Nechypurenko, Andrey (GE Healthcare) Andrey.Nechypurenko at ge.com
Mon Feb 2 16:12:44 CET 2009


Hi Josinei,

> I need to create a program that will be a tcp server

It is not a trivial task to write scalable high performance server. This
paper from Douglas Schmidt might be of interest for you. In particular
section 3.4: 
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.40.7914&rep=rep
1&type=pdf

Andrey.

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Josinei Silva
Sent: Montag, 2. Februar 2009 14:40
To: qt-interest at trolltech.com
Subject: [Qt-interest] TcpServer: fork or threads?

Hi,

I need to create a program that will be a tcp server for extract data
from a PostqureSQL database for some users. Each operation is
independent from the ohters, no comunication between one extraction to
anothers. Each one will generate a file with data extracted and returns
it thru the tcp connection opened by user.

What's the best way to make this program works without serialize the
user's requests, fork ou threads?

I found some documentation about threads at Qt documentation and another
web pages. But almost nothing about Qt and fork.

Its safe to use fork with Qt, tcp sockets and sql module? It''s better
to use threads even with no communication between each request?

It's my first time with tcp servers and threads or forks. So, i'm
looking for clues about what way i should follow.

Thanks

Josinei
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list