News for hackers. Stuff that matters.
Re:Why did OKCupid write their own web server? by tobias3 on Thursday March 10, 2011 @01:50PM (#2310186)
If you have a small team and everybody has much C++ experience you can pull this off. Otherwise one person who doens't have the discipline to do the manual memory management right can crash the whole server. Don't try it at home ;) use an VM-language instead which can recover from such errors.

(I wrote some C++ webapps myself)

Re:Why did OKCupid write their own web server? by maxtaco on Thursday March 10, 2011 @02:13PM (#2310305)
Manual memory management is for the birds. Use something like Boost's shared pointers and you never need to worry about it.
Re:Why did OKCupid write their own web server? by Peaker on Thursday March 10, 2011 @05:07PM (#2311014)
That's not entirely honest.

A) You still have to worry about it when interfacing with libraries that use plain pointers

B) Shared pointers incur runtime penalties (larger data pushes things off the cache, spurious inc/dec-refs messing said cache. If you don't care about that, why do you use a language like C++ in the first place?

C) Reference counting is a poor form of automatic memory management, you still have to worry about cycles, and use weak references or such to break the cycles.

Re:Why did OKCupid write their own web server? by api on Thursday March 10, 2011 @03:01PM (#2310513)
You can also often make clever use of RAII and STL container classes and do memory management that way.