Re: Why does ThreadedAppServer.addSocketHandler() write to disk?
Steve Schwarz <[email protected]> Tue, 8 Jun 2010 14:27:21 -0500
| Newsgroups | gmane.comp.python.webware |
|---|---|
| Message-ID | <[email protected]> |
--===============5748900162784215992== Content-Type: multipart/alternative; boundary=001636c92d434658a5048889c70c --001636c92d434658a5048889c70c Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jun 8, 2010 at 2:00 PM, Christoph Zwerschke <[email protected]> wrote: > Am 07.06.2010 22:00 schrieb Steve Schwarz: > > We are looking to run multiple Webware instances from a single Webware > > directory/checkout and can do so by providing configuration differences > > via command line args. > > Just out of curiosity, why do you want to do that? I'm usually running > different instances from different working dirs only. > We'd like to simplify our deployment. Now our admins have to install Webware multiple times for each appserver instance on multiple servers. It would be easier to just deploy once and have all instance refer to that one check out. We also see better performance running with a pool of single threaded appservers instead of using the ThreadedAppServer. So we are looking to substantially increase the number of AppServers running and don't want to setup dozens of Webware directories that only differ in port number and some logging parameters. > > But I noticed that ThreadedAppServer.addSocketHandler() creates files > > like http.address and adapter.address containing the address:port for > > each adapter: ... > > Can anyone explain the purpose? Trying to stop running multiple > > appservers on the same address/port? If so the port will already be > > bound so the appserver will fail... > > I think they are only used as a way to communicate the appserver port to > some of the adapters, e.g. the CGIAdapter. > We're only using the HTTP adapter for our current tests and it didn't seem to care if that file exists. So I didn't look any further... > > If you start a second instance, the file should be overwritten with a > warning, doesn't this work for you? > > If you don't want this, you can set a different name for it in the 2nd > instance via the AppServer setting "AddressFiles", e.g. '%s.address2' > Thanks I didn't see that config. We'll just specify it also on the command line and now I won't have to override addSocketHandler() anymore > see > > http://www.webwareforpython.org/WebKit/Docs/Configuration.html#appserver-config > > -- Christoph > Best Regards, Steve --001636c92d434658a5048889c70c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <br><div class=3D"gmail_quote">On Tue, Jun 8, 2010 at 2:00 PM, Christoph Zw= erschke <span dir=3D"ltr"><<a href=3D"mailto:[email protected]">cito@online= .de</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"bor= der-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-= left: 1ex;"> Am 07.06.2010 22:00 schrieb Steve Schwarz:<br> <div class=3D"im">> We are looking to run multiple Webware instances fro= m a single Webware<br> > directory/checkout and can do so by providing configuration difference= s<br> > via command line args.<br> <br> </div>Just out of curiosity, why do you want to do that? I'm usually ru= nning<br> different instances from different working dirs only.<br></blockquote><div>= We'd like to simplify our deployment. Now our admins have to install We= bware multiple times for each appserver instance on multiple servers. It wo= uld be easier to just deploy once and have all instance refer to that one c= heck out. <br> <br>We also see better performance running with a pool of single threaded a= ppservers instead of using the ThreadedAppServer. So we are looking to subs= tantially increase the number of AppServers running and don't want to s= etup dozens of Webware directories that only differ in port number and some= logging parameters.<br> <br></div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid= rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class=3D"im"><br> > But I noticed that ThreadedAppServer.addSocketHandler() creates files<= br> > like http.address and adapter.address containing the address:port for<= br> </div>> each adapter: ...<br> <div class=3D"im">> Can anyone explain the purpose? Trying to stop runni= ng multiple<br> > appservers on the same address/port? If so the port will already be<br= > > bound so the appserver will fail...<br> <br> </div>I think they are only used as a way to communicate the appserver port= to<br> some of the adapters, e.g. the CGIAdapter.<br></blockquote><div>We're o= nly using the HTTP adapter for our current tests and it didn't seem to = care if that file exists. So I didn't look any further...<br>=A0<br> </div><blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb= (204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> If you start a second instance, the file should be overwritten with a<br> warning, doesn't this work for you?<br> <br> If you don't want this, you can set a different name for it in the 2nd<= br> instance via the AppServer setting "AddressFiles", e.g. '%s.a= ddress2'<br></blockquote><div><br>Thanks I didn't see that config. = We'll just specify it also on the command line and now I won't have= to override addSocketHandler() anymore<br> =A0<br></div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D"borde= r-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-le= ft: 1ex;"> see<br> <a href=3D"http://www.webwareforpython.org/WebKit/Docs/Configuration.html#a= ppserver-config" target=3D"_blank">http://www.webwareforpython.org/WebKit/D= ocs/Configuration.html#appserver-config</a><br> <br> -- Christoph<br></blockquote><div>=A0</div></div>Best Regards,<br>Steve<br>= <br> --001636c92d434658a5048889c70c-- --===============5748900162784215992== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo --===============5748900162784215992== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Webware-discuss mailing list Webware-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/webware-discuss --===============5748900162784215992==--