[{"data":1,"prerenderedAt":266},["ShallowReactive",2],{"project-3165679":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":41,"post_text":43,"what":44,"said":71,"maker_in_thread":147,"shape":156,"grid":161,"attempts":229,"same_week":230,"maker_shows":40,"maker_hidden":258,"reader_version":259,"card":260},"3165679","Hellepoll","Hellepoll is a blazingly-fast async HTTP server written in C++","title","Show HN: Hellepoll is a blazingly-fast async HTTP server written in C++","https:\u002F\u002Fgithub.com\u002Fwilliame\u002Fhellepoll","github.com","willvarfar",1319751390,2011,35,28,339,1097,31,"shown","infrastructure","http server","library",[21,24,25,26,27],"epoll","async server","c++ server","high performance","curious",-0.304,{"positive":31,"neutral":32,"mixed":31,"critical":33},0,6,5,11,{"idea":36,"execution":37,"performance":39},{"positive":31,"critical":31},{"positive":31,"critical":38},2,{"positive":31,"critical":40},3,[40,42,31,31,40,40,42,31,31,42,42,31,31,42,31,31,40,31,31,31,31,31,31,31,31,31,40,40],1,"This is based on an approach I made for a very high performance message and video multiplexing server.\n\nThe project died, but I'm glad I get to share the a basic version with some http test code now.\n\nI admit this is the second time I've tried to show this off here today; I posted earlier but it got lost when no-one was watching :(",{"problem":45,"audience":45,"pricing":45,"motivation":46,"time_to_build":45,"stack":52,"openness":70,"stage":70,"team_size":70},null,{"value":47,"source":48,"evidence":49},"Maker wanted to share a basic version of a high-performance server approach from a project that died","maker",[50],{"id":51},"post",[53,57,65],{"value":54,"source":48,"evidence":55},"C++",[56],{"id":51},{"value":58,"source":59,"evidence":60},"C","commenter",[61],{"id":62,"by":63,"text":64},"3166020","apaprocki","Not sure that matters much.. the code style is very C\u002FC++. (e.g. using stdio instead of iostreams, malloc\u002Ffree instead of new\u002Fdelete, no STL)",{"value":24,"source":48,"evidence":66},[67],{"id":68,"by":11,"text":69},"3167165","Right, there is indeed a mode switch to read\u002Fwrite from\u002Fto the tcp buffer or accept a connection. Luckily mode switches are not context switches - which are typically massively…","unknown",{"praise":72,"objections":81,"requests":105,"questions":113,"alternatives":125},[73],{"value":74,"source":59,"evidence":75},"Interesting performance-focused design",[76,80],{"id":77,"by":78,"text":79},"3166525","k33n","Cool stuff. I assume you wrote this for your own personal gratification and not to compete with Nginx or something. What was the coolest thing you learned in putting this together?",{"id":68,"by":11,"text":69},[82,92,99],{"value":83,"source":59,"evidence":84},"Benchmarks measure requests per second rather than replies per second",[85,89],{"id":86,"by":87,"text":88},"3166180","kqueue","I believe you are testing the requests \u002F sec and not replies \u002F sec. While requests \u002F sec matters a bit, you'll most probably be bottle-necking in your context switches. What…",{"id":90,"by":87,"text":91},"3166271","Measuring requests per second is close to measuring the number of accept system calls you can do. Since it's a system call you have a context switch.",{"value":93,"source":59,"evidence":94},"C++ overhead makes it slower than nginx",[95],{"id":96,"by":97,"text":98},"3166010","givan","Probably because is much slower than nginx, C++ adds extra \"fat\" that nginx (writen in C) doesn't have.",{"value":100,"source":59,"evidence":101},"Extern C block wrapping of headers is incorrect",[102],{"id":103,"by":63,"text":104},"3166011","You should not be #include-ing headers inside of an extern \"C\" block. It is up to those headers to: ``` #ifdef __cplusplus extern \"C\" { #endif ```",[106],{"value":107,"source":59,"evidence":108},"Compare against libevent evhttp or other servers",[109],{"id":110,"by":111,"text":112},"3167023","pilooch","How does it compare to libevent evhttp server? Besides being written in C++...",[114,121],{"value":115,"source":59,"evidence":116},"Why not compare with nginx",[117],{"id":118,"by":119,"text":120},"3165958","tewks","I'm curious as to why the author hasn't referenced nginx, which is written also event based (epoll\u002Fkqueue) and written in C.",{"value":122,"source":59,"evidence":123},"What was the coolest thing learned building it",[124],{"id":77,"by":78,"text":79},[126,130,137,141],{"value":127,"source":59,"evidence":128},"nginx",[129],{"id":118,"by":119,"text":120},{"value":131,"source":59,"evidence":132},"ULib",[133],{"id":134,"by":135,"text":136},"3166927","enduser","ULib is a mature and well-considered C++ framework for developing high-performance applications that includes a blazingly-fast async HTTP server--more batteries included.…",{"value":138,"source":59,"evidence":139},"libevent evhttp",[140],{"id":110,"by":111,"text":112},{"value":142,"source":59,"evidence":143},"libev",[144],{"id":145,"by":87,"text":146},"3167352","Network IO, Disk IO, scheduling, locks etc.. all trigger context switches and not only mode switch because only the kernel is allowed to manipulate data structures related to…",{"comments":32,"answered":31,"key":148},[149,152,155],{"id":150,"text":151},"3166091","I've used nginx a lot. So I guess that's why I don't see the overlap. Nginx is not tornado in c. Its not about complex custom logic, its about rules redirects and caching.",{"id":153,"text":154},"3166227","I am confused. What context switches?",{"id":68,"text":69},{"commenters":157,"max_depth":158,"maker_replies":32,"first_comment_mins":159,"lifespan_hours":160},16,12,64,37,[162,164,166,170,173,177,179,181,182,186,189,191,195,197,198,200,202,206,208,210,211,214,216,218,220,222,224,225],[77,31,40,163,78,31],"maker\u002Fneutral\u002Fidea",[103,42,42,165,63,31],"project\u002Fcritical\u002Fexecution",[167,42,31,168,169,31],"3166064","commenter\u002Fneutral\u002Fnone","humbledrone",[171,42,31,168,172,31],"3166418","DiabloD3",[174,42,40,175,176,31],"3166112","project\u002Fneutral\u002Fexecution","CamperBob",[118,38,40,178,119,31],"project\u002Fneutral\u002Fidea",[96,38,42,180,97,31],"project\u002Fcritical\u002Fperformance",[62,38,31,168,63,31],[183,38,31,184,185,31],"3166021","commenter\u002Fcritical\u002Fperformance","swah",[187,38,42,180,188,31],"3166037","sigil",[190,38,42,165,185,31],"3166052",[192,38,31,193,194,31],"3166675","other\u002Fneutral\u002Fnone","kingkilr",[150,38,31,196,11,42],"commenter\u002Fneutral\u002Fidea",[86,40,42,180,87,31],[153,40,31,199,11,42],"maker\u002Fneutral\u002Fperformance",[90,40,31,201,87,31],"commenter\u002Fneutral\u002Fperformance",[203,40,40,204,205,31],"3166744","project\u002Fneutral\u002Fperformance","jerf",[207,40,31,201,87,31],"3166876",[68,40,31,209,11,42],"maker\u002Fpositive\u002Fperformance",[145,40,31,201,87,31],[212,40,31,213,11,42],"3167385","commenter\u002Fcritical\u002Fnone",[215,40,31,213,87,31],"3167437",[217,40,31,168,11,42],"3167561",[219,40,31,201,87,31],"3170223",[221,40,31,199,11,42],"3171618",[134,223,31,193,135,31],4,[110,33,40,178,111,31],[226,32,40,227,228,31],"3166007","project\u002Fneutral\u002Fnone","WALoeIII",[],[231,236,241,244,248,253],{"id":232,"name":233,"points":234,"category":235},"3182331","WikiMaze",82,"games",{"id":237,"name":238,"points":239,"category":240},"3167356","Read",69,"productivity",{"id":242,"name":243,"points":159,"category":240},"3175091","Trnsfr",{"id":245,"name":246,"points":247,"category":240},"3170809","Getting help with your ideas",61,{"id":249,"name":250,"points":251,"category":252},"3179296","B2B Reviews",54,"web_saas",{"id":254,"name":255,"points":256,"category":257},"3172695","js-typed-array-sha1",47,"security_privacy",false,"v2",{"id":261,"name":5,"line":6,"ai":258,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":262,"top":18,"kw":263,"maker":11,"domain":10,"tier":19,"attempts":31,"strip":264,"url":9,"mix":265,"praise":74,"objection":83,"sub":21},3165679,-0.3,[21,24,25,26,27],"3100331001100100300000000033",[31,32,31,33],1794036491133]