Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: send() + recv() on nonblocking tcp sockets

by ph713 (Pilgrim)
on Oct 14, 2005 at 05:00 UTC ( [id://500123]=note: print w/replies, xml ) Need Help??


in reply to Re: send() + recv() on nonblocking tcp sockets
in thread send() + recv() on nonblocking tcp sockets

I'm not entirely sure what my question should be at this point either. In any case I've moved on past this specific problem and into other related things now.

POE doesn't cut it though, and neither do some of the other tcp server modules I've tried out on this problem, like Net::Server::*. The project this is a part of has pretty hardcore requirements that don't fit the mold. The server end of this project would have better off done in C in many ways (even better, implemented as an apache module in C (: ), but perl is far more convenient for other aspects of the project, and in the end perl wins for this thing.

I just need to sort out a preforking tcp server, client network code, and an underlying protocol abstraction for both, that performs well enough under my requirements and handles all of the potential error conditions correctly and efficiently. What I ended up doing to get it right, was I basically parsed through Apache 2.1.x's code for all of the above, sorted it out from all the abstracted ap_/apr_ library calls as to what exactly it was doing in terms of libc and system calls, and started translating that into perl. It's going pretty well so far, and doing much better than my earlier implementations including the one that's updated in the node above.

Someday when (if??) I ever finish this project which has spawned most my various questions over the past several months, I think I'll have to make writeup about it (without of course giving away the project, it is private inhouse commercial software after all). While I often seem frustrated with perl when I post here, that's just because I only post here when I'm frustrated. Perl (and PostgreSQL too) has far exceeded what I would have expected from it before I started this project.

You'd be amazed the scale and complexity and reliability you can ultimately get out of a Perl-based architecture. In testing I'm churning hundreds of gigabytes in a PostgreSQL database, all network-driven by ~3500+ distinct client machines and hitting the database at a rate of somewhere in the neighborhood of ~200 database write transactions per second, 24/7 with no lulls in activity allowed.

Actually I think I'm going to truncate most of the toplevel node here, as it's pretty useless now, and was always unintelligible :)

  • Comment on Re^2: send() + recv() on nonblocking tcp sockets

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://500123]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found