How stable and rocksolid is the Network Library ?

Everything else that doesn't fall into one of the other PB categories.
purely
New User
New User
Posts: 9
Joined: Thu Sep 27, 2007 11:23 am
Location: Israel

How stable and rocksolid is the Network Library ?

Post by purely »

I mean, I am writing a server using the network library, but as it's like a closed sandbox, I don't know how robust its performance will be in a real life situation.

Currently I use THTTPD, which manages to serve around 3000 - 3500 requests a second (only static content), how about the Network Library ?

THTTP uses "select" instead of threads or forks (Apache).

What's the inner working of the Network Lib ? Select / Threads / Forking ?

Is there an alternative way of creating a webserver without the Network Lib ?

Thanks in advance,
Purely
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

The network lib should be no problem. It doesn't use thread or fork, but non-blocking sockets. You can still use the raw socket library if you want.. (socket_(), select_(), etc.)
purely
New User
New User
Posts: 9
Joined: Thu Sep 27, 2007 11:23 am
Location: Israel

Post by purely »

Thanks for your fast reply, Fred. :wink:

Do you know if it is possible to view or change the inner settings of the Network Lib ? Just to experiment with different settings under different loads.


Purely.
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I wouldn't do that ;).
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

I can say with a good amount of confidence the network library is probably one of the best libs in pb. I've been using it to develop my mmorpg and it has performed very well so far, with only minor hiccups.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

The network commands have always worked as documented for me, no problems. Use with confidence imho.
BERESHEIT
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post by byo »

See, purely?

These are the voices of the Wise Ones showing the Truth. 8)
purely
New User
New User
Posts: 9
Joined: Thu Sep 27, 2007 11:23 am
Location: Israel

Post by purely »

OK OK

I am convinced. :D
Post Reply