[Twisted-Python] WSGI Question
I deploy code. Then I modify the code on my file system. The code does not automatically change on the server. It does this on the django dev server. How can I make this happen? I start the server as follows twistd -ny server.py # Django and static file server: root_resource = get_root_resource() root_resource.putChild("static", static.File("static")) http_factory = server.Site(root_resource, logPath="http.log") internet.TCPServer(STATIC_PORT, http_factory, interface=INTERFACE).setServiceParent(serviceCollection) ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Re: [Twisted-Python] WSGI Question
Thanks for the help. On Wed, Jan 20, 2010 at 11:04 AM, sstein...@gmail.com wrote: > > On Jan 20, 2010, at 10:37 AM, Phil Christensen wrote: > > > On Jan 20, 2010, at 9:58 AM, adamjamesdrew same wrote: > >> I deploy code. Then I modify the code on my file system. The code does > not automatically change on the server. It does this on the django dev > server. How can I make this happen? > > > > This is a Django-specific feature that doesn't exist in Twisted. > > > > It wouldn't be too hard to write, but it's the kind of feature that tends > to be useful more to web developers than authors of other kinds of > applications. > > > > As it is, automatic code reloading is tricky to achieve in Python, since > reload(modulename) only reloads modulename in the current scope, and must be > reloaded everywhere that module is used. > > There is/was a Twisted ticket about this and a quick sketch of how it might > be done for Twisted by using the Django module itself by one of the Twisted > devs. > > I gave it a brief shot, but couldn't get it working in the time I had to > spend on it. > > Sure would be handy, though... > > S > > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] WSGI Production ready
Is twisted WSGI production ready as compared to apache and mod_wsgi For a simple server with 4 cores would you simple start 4 instances and load balance between them? How would you recommend a production deploy of twisted wsgi? ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] HOTDOT , Love the code, I'm curious about your thought's on it's goals and some other solutions with orbited
I c that you have used the embedded morbiq with the restq interface. To replace the morbidQ restq.py would I just create an activeMQ.py factory class? Since twisted is hosting both django and orbited you have access to the session data. If you had an architecture like so what are some strategies for handling security of orbited apache->mod_wsgi->django javascript->orbited->twisted->activemq or rabbitmq Here are some potential use cases. Case #1 Everyone has access to read any Q Write's to the Q are done via a secret account on the server side code can be called an authenticated via standard ajax Case #2 Only logged in users have access to a private Q Write's to the Q are done via a secret account on the server side code can be called an authenticated via standard ajax Thanks a lot ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
[Twisted-Python] Twisted newb I can't add a cred checker to a Factory class
class ProxyIncomingProtocol(Protocol): . class ProxyOutgoingProtocol(Protocol): . class ProxyFactory(Factory): protocol = ProxyIncomingProtocol class SimplePerspective(pb.Avatar): def perspective_echo(self, text): print 'echoing',text return text def logout(self): print self, "logged out" class SimpleRealm: implements(IRealm) def requestAvatar(self, avatarId, mind, *interfaces): if pb.IPerspective in interfaces: avatar = SimplePerspective() return pb.IPerspective, avatar, avatar.logout else: raise NotImplementedError("no interface") portal = Portal(SimpleRealm()) checker = InMemoryUsernamePasswordDatabaseDontUse() checker.addUser("guest", "password") portal.registerChecker(checker) proxy_factory = proxy.ProxyFactory() # ??? how can I add the portal to the factory? internet.GenericServer(cometsession.Port, factory=proxy_factory, resource=root_resource, childName="tcp", interface=INTERFACE).setServiceParent(serviceCollection) ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python