#Reverse proxy setup - fdesk.ditchyourip.com/clinic_workflow* ---> fdesk.ditchyourip.com:9000/clinic_workflow* root_resource.putChild( 'clinic_workflow', twisted_proxy.ReverseProxyResource(INTERFACE, 9000, "clinic_workflow")) http_factory = server.Site(root_resource, logPath=PROJECT_DIR + "/logs/http.log") tcpServ = internet.TCPServer(STATIC_PORT, http_factory, interface=INTERFACE).setServiceParent(multi) # Orbited server: For Commetsession - proxy_factory = proxy.ProxyFactory() internet.GenericServer(cometsession.Port, factory=proxy_factory, resource=root_resource, childName="tcp", interface=INTERFACE).setServiceParent(multi) # Stomp server: stomp_factory = get_stomp_factory(INTERFACE, RESTQ_PROXY_PORT) internet.TCPServer(STOMP_PORT, stomp_factory, interface=INTERFACE).setServiceParent(multi) # RestQMessageProxy (message filter/logger/modifier): restq_resource = RestQMessageProxy(MESSAGE_HANDLERS) restq_proxy_factory = server.Site(restq_resource, logPath=PROJECT_DIR + "/logs/restqproxy.log") internet.TCPServer(RESTQ_PROXY_PORT, restq_proxy_factory, interface=INTERFACE).setServiceParent(multi)
from orbited import proxy #local imports from djangoweb.twisted_wsgi import get_root_resource from realtime.stompfactory import get_stomp_factory from realtime.message_handlers import MESSAGE_HANDLERS from realtime.restq import RestQMessageProxy #Twisted Application setup: application = service.Application('hotdot') serviceCollection = service.IServiceCollection(application) # 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) # Orbited server: proxy_factory = proxy.ProxyFactory() internet.GenericServer(cometsession.Port, factory=proxy_factory, resource=root_resource, childName="tcp", interface=INTERFACE).setServiceParent(serviceCollection) # Stomp server: stomp_factory = get_stomp_factory() internet.TCPServer(STOMP_PORT, stomp_factory, interface=INTERFACE).setServiceParent(serviceCollection) # RestQMessageProxy (message filter/logger/modifier): restq_resource = RestQMessageProxy(MESSAGE_HANDLERS) restq_proxy_factory = server.Site(restq_resource, logPath="restqproxy.log") internet.TCPServer(RESTQ_PROXY_PORT, restq_proxy_factory, interface=INTERFACE).setServiceParent(serviceCollection)
from orbited import proxy #local imports from djangoweb.twisted_wsgi import get_root_resource from realtime.stompfactory import get_stomp_factory from realtime.message_handlers import MESSAGE_HANDLERS from realtime.restq import RestQMessageProxy #Twisted Application setup: application = service.Application('dotmap') serviceCollection = service.IServiceCollection(application) # 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) # Orbited server: proxy_factory = proxy.ProxyFactory() internet.GenericServer(cometsession.Port, factory=proxy_factory, resource=root_resource, childName="tcp", interface=INTERFACE).setServiceParent(serviceCollection) # Stomp server: stomp_factory = get_stomp_factory("http://" + INTERFACE) internet.TCPServer(STOMP_PORT, stomp_factory, interface=INTERFACE).setServiceParent(serviceCollection) # RestQMessageProxy (message filter/logger/modifier): restq_resource = RestQMessageProxy(MESSAGE_HANDLERS) restq_proxy_factory = server.Site(restq_resource, logPath="restqproxy.log") internet.TCPServer(RESTQ_PROXY_PORT, restq_proxy_factory, interface=INTERFACE).setServiceParent(serviceCollection)
from orbited import proxy #local imports from djangoweb.twisted_wsgi import get_root_resource from realtime.stompfactory import get_stomp_factory from realtime.message_handlers import MESSAGE_HANDLERS from realtime.restq import RestQMessageProxy #Twisted Application setup: application = service.Application('hotdot') serviceCollection = service.IServiceCollection(application) # 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) # Orbited server: proxy_factory = proxy.ProxyFactory() internet.GenericServer(cometsession.Port, factory=proxy_factory, resource=root_resource, childName="tcp", interface=INTERFACE).setServiceParent(serviceCollection) # Stomp server: stomp_factory = get_stomp_factory(INTERFACE, RESTQ_PROXY_PORT) internet.TCPServer(STOMP_PORT, stomp_factory, interface=INTERFACE).setServiceParent(serviceCollection) # RestQMessageProxy (message filter/logger/modifier): restq_resource = RestQMessageProxy(MESSAGE_HANDLERS) restq_proxy_factory = server.Site(restq_resource, logPath="restqproxy.log") internet.TCPServer(RESTQ_PROXY_PORT, restq_proxy_factory, interface=INTERFACE).setServiceParent(serviceCollection)