{"id":6,"date":"2005-07-10T23:51:57","date_gmt":"2005-07-10T23:51:57","guid":{"rendered":""},"modified":"2017-03-07T20:08:45","modified_gmt":"2017-03-07T20:08:45","slug":"harmonious_and_glsr_in_harmony","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/port001\/2005\/07\/10\/harmonious_and_glsr_in_harmony\/","title":{"rendered":"Harmonious and GLSR in harmony"},"content":{"rendered":"<p>It&#8217;s been a while since my <a href=\"http:\/\/planet.gentoo.org\/developers\/port001\/2005\/05\/17\/introducing_harmonious_python_web_framew\">last entry<\/a> about harmonious and like-wise; a lot of work has been done.<\/p>\n<p>A large majority of the server basics have been implemented (some only partially): sessions, domain module loading, serving up static files and the templating engine. A couple of extras have also been added: restricted directories (very similar to Apache&#8217;s htaccess) and support for virtual hosts.<\/p>\n<p>Oddly enough, I&#8217;ve started to enjoy going to bed so I can lay there thinking up weird and wonderful ideas. That doesn&#8217;t mean I&#8217;m going to bed any earlier than usual though \ud83d\ude09 No doubt I&#8217;ll implement many in the future, persistent connections and SSL are both a must.<\/p>\n<p>Next up is getting the thing all threaded up, my current ideas for how to do this goes a little something this&#8230;<\/p>\n<p>As the server starts up, it starts a base number of worker threads that sit there waiting to processes requests that enter the queue (this is how CherryPy works). If a request comes in and there is another request waiting in the queue for a thread to process it, the server will create a new worker thread. At scheduled intervals the server will check each worker thread to see if it&#8217;s processing a request or not, if two or more are not doing anything, the server will kill one or two of them. The server can either have a max-threads configuration option set or allow the server to find the optimal amount of worker threads by monitoring the average time taken to process requests. <\/p>\n<p>I have a feeling the server will be need to be under some pretty intense loads (and hence a large number of threads) before it decides on an optimal amount of threads. Heh, I&#8217;m not even too sure the server *will* be able to discern an optimal amount, I don&#8217;t know enough about the effects threading has on the system. Comments are welcome on this.<\/p>\n<p>As for GLSR (GLEP 15), we have it running on Harmonious which was a rather painless process. Scott Hadfield (hadfield) even commented that he enjoyed coding with the Harmonious framework. I couldn&#8217;t agree more, it feels a lot cleaner and more organised than that pure CGI crap we were using before. Though I&#8217;m biased \ud83d\ude09<\/p>\n<p>On a personal note, I&#8217;m off on holiday for 1 week in the Italian alps, tomorrow. My first in 3 years! I&#8217;ll try my hardest to uphold the typical drunken-Englishman stereotype \ud83d\ude09 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a while since my last entry about harmonious and like-wise; a lot of work has been done. A large majority of the server basics have been implemented (some only partially): sessions, domain module loading, serving up static files and the templating engine. A couple of extras have also been added: restricted directories (very &hellip; <a href=\"https:\/\/blogs.gentoo.org\/port001\/2005\/07\/10\/harmonious_and_glsr_in_harmony\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Harmonious and GLSR in harmony<\/span><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/posts\/6"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":1,"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":19,"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/posts\/6\/revisions\/19"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/port001\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}