Package: archangel
Archangel is a webserver designed to be fast and easy to use for personal
usage. It was created to replace an internal webserver based off of flup for
fcgi and wsgiref for http serving (basically anything would be an improvement) as
well as explore the newpep-3156/Tulipbased library by Guido van RossumArchangel is designed to be ‘fast’. This does not mean however that archangel
is fast, Archangel is instead intended to explore how fast a server using an
event loop based of tulip can be made to go and what is needed to get it there.As an additional side effect it should serve as a light house in the fog as to
what you should or should not do withTulip(Of course it is still yet to be
determine on which side of the divide Archangel ends up)Tenets:Only do things when we need to:Do things “Just in Time”Only do things we have to:Be lazyDo it quickly:Go back to sleep as fast as possibleWhat Archangel providesPre-forking WebserverWSGI connectorThe ability to run multiple dissimilar WSGI apps in the same process and
route requests to them individually based off of PATH_INFO or HOST headersWhat Archangel does not provide‘Cron’ like functionality, this is now implemented viaTulip. get a copy of
the mainloop withloop = tulip.get_event_loop(), then attach your cron
function withloop.call_repeatably(15.0, my_cron)which will call yourmy_cronfunction every 15 secondsUnix Signal support, this functionality is already provided byTulipvia theadd_signal_handlerfunctionalityLong running background tasks.Tulipcan be used to launch background
contexts viacall_soon. note that CPU bound tasks shouldyieldperiodically to prevent blocking of other tasks or userun_in_executorprovided by the main loop.Possible Future FeaturesInternal ‘signalling’ allowing applications to signal each other and respond
accordinglyCompatibility NotesFor performance, any 3rd party library you use will need to betulip/pep-3156compatible and return a future on blocking calls so that it
may beyield from’d. libraries using open() and socket.socket or other
blocking calls will still work without issue but will prevent other requests
from being handled while the system call is blockedTo use traditional style locks and events, use the implementations intuliprather than thethreadinglibraryTWIG: Tulipe Webservices Gateway InterfaceArchangel provides a test-bed for developing a new protocol loosely based
off ofpep-3333/WSGI, Designed for use withTulipand providing a more
‘stream’ like interface. This can be used to implement long polling clients as
well as support traditional WSGI like request/response through the use of
middleware that will be bundled with Archangel.An inital draft of the TWIG spec can be foundhereRequirementsPython 3.3 or greaterDistutils2 (to replace setup.py, a fallback is provided)A copy of theTuliplibraryPyYaml for parsing the config filesGetting the Latest versionThe latest version of Archangel can be obtained with mercurial/hg using the
following command:hg clonehttp://code.pocketnix.org/archangelLinksDesign NotesChange Log0.3Added twig moduleAdded Request objectAdded Response objectExpand on TWIG PEP0.2.1Minor bump to update filenames (WSGI-STREAM => TWIG)0.2: Fresh BreezeSplit code into modulesName changes to WSGIProtocol and friends, now split along ‘FCGI’ and
‘HTTP’ linesFramework can make requests with to a special function using a
‘looks like wsgi if you squint hard enough’ protocol0.1.2Added WSGI-STREAM specRefined documentation and linksAdded Changelog0.1.1Inital codeREADME file