Hello Everyone, This is a rough BETA release of the SCGI Rails Runner. It''s only for the experts and the brave as it''s got only a README for documentation (which means it''s better documented than most open source projects). You can get it at: http://www.zedshaw.com/downloads/scgi_rails/scgi_rails-0.4.0.tar.bz2 And then just read the README to figure out what to do. Please send any requests, comments, or bugs to me. One current bug is that it doesn''t really shutdown if you tell it to. If you do a stop command and it doesn''t stop right away, do a status to make sure nobody''s really connected, then do stop with the -f option. Same applies to restart. FEATURES * A separate library that contains the SCGI server so that other people can re-use the SCGI protocol in their project. Implementing an SCGI processor involves subclassing and extending one function. * A service that handles the requests and runs about 50% faster from the previous version. * The service currently doesn''t support the "simple clustering" the previous version had. I had several reports that this was problematic. * A complete DRb based control API that allows you to remotely stop, restart, reconfigure, monitor, and shutdown. * There''s a scgi_ctrl command that configures and starts as well. * There''s a sample quick-hack WEBrick manager that lets you control scgi_service via a web browser. * The shutdown and restart use a graceful shutdown process which lets currently connected clients finish, and redirects new connections to a /busy.html page. SECURITY This release ***is not secure***. Each of the DRb commands requires a password, and that password is stored in the config file using Ruby''s crypt, so it''s reasonably OK. But, if you don''t own the machine (i.e. shared hosting) then you''ll need SSL on your DRb. I''m still working on instructions and code to help make SSL on DRb easier. Expect anybody who can sniff localhost to get your password, and anyone who can get to your config/scgi.yaml will be able to crack the password if you pick a shitty one. SAMPLES The main difference is that you use the scgi_ctrl command to configure and start the scgi_service command. The plan is to make it easy to kick off and manage many scgi_service processes. This also lets you configure several scgi_service processes, but let Apache or Lighttpd start them, and still manage them with scgi_ctrl. Here''s the normal start procedure for Unix people: scgi_ctrl config -e production scgi_ctrl start That''s from your Rails application''s directory. If you''re on Windows it''s nearly the same: scgi_ctrl config -e production scgi_service The scgi_service can also take the config file as a parameter or SCGI_CONFIG environment variable (so you can pass the config from Apache or Lighttpd). When you first configure it you''ll need to give a password. You can use the -P to give the password, but read the "scgi_ctrl help config" output for more information on this. Now that it''s running you can use the scgi_ctrl to do special stuff: scgi_ctrl help -- You should read this. scgi_ctrl status -- Prints out some useful status. scgi_ctrl monitor -- Prints useful status all the time. scgi_ctrl reconfig -- Reloads the config/scgi.yaml. scgi_ctrl stop -- Graceful shutdown (see bug above). scgi_ctrl restart -- Graceful restart (see bug above). Each command has extra options you should read--especially the -u option to specify the DRb URL--but here''s an example of a safe graceful shutdown: scgi_ctrl status -- notice there''s nobody connected scgi_ctrl stop -- wait a bit scgi_ctrl status -- still nobody connected scgi_ctrl stop -f Yeah, I''ll be working on that one. Enjoy! And please forward comments to me. Especially regarding the use of DRb in a shared hosting setup. Zed A. Shaw http://www.zedshaw.com/
How do I get AJAX requests to work with SCGI! Is there a FAQ somewhere? -larry On 10/12/05, Zed A. Shaw <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org> wrote:> > Hello Everyone, > > This is a rough BETA release of the SCGI Rails Runner. It''s only for > the experts and the brave as it''s got only a README for documentation > (which means it''s better documented than most open source projects). > > You can get it at: > > http://www.zedshaw.com/downloads/scgi_rails/scgi_rails-0.4.0.tar.bz2 > > And then just read the README to figure out what to do. Please send any > requests, comments, or bugs to me. > > One current bug is that it doesn''t really shutdown if you tell it to. > If you do a stop command and it doesn''t stop > right away, do a status to make sure nobody''s really connected, then do > stop with the -f option. Same applies to restart. > > FEATURES > > * A separate library that contains the SCGI server so that other people > can re-use the SCGI protocol in their project. Implementing an SCGI > processor involves subclassing and extending one function. > * A service that handles the requests and runs about 50% faster from > the previous version. > * The service currently doesn''t support the "simple clustering" > the previous version had. I had several reports that this was > problematic. > * A complete DRb based control API that allows you to remotely stop, > restart, reconfigure, monitor, and shutdown. > * There''s a scgi_ctrl command that configures and starts as > well. > * There''s a sample quick-hack WEBrick manager that lets you > control scgi_service via a web browser. > * The shutdown and restart use a graceful shutdown process which lets > currently connected clients finish, and redirects new connections to > a /busy.html page. > > SECURITY > > This release ***is not secure***. Each of the DRb commands requires a > password, and that password is stored in the config file using Ruby''s > crypt, so it''s reasonably OK. But, if you don''t own the machine (i.e. > shared hosting) then you''ll need SSL on your DRb. I''m still working on > instructions and code to help make SSL on DRb easier. > > Expect anybody who can sniff localhost to get your password, and anyone > who can get to your config/scgi.yaml will be able to crack the password > if you pick a shitty one. > > SAMPLES > > The main difference is that you use the scgi_ctrl command to configure > and start the scgi_service command. The plan is to make it easy to > kick off and manage many scgi_service processes. This also lets you > configure several scgi_service processes, but let Apache or Lighttpd > start them, and still manage them with scgi_ctrl. > > Here''s the normal start procedure for Unix people: > > scgi_ctrl config -e production > scgi_ctrl start > > That''s from your Rails application''s directory. If you''re on Windows > it''s nearly the same: > > scgi_ctrl config -e production > scgi_service > > The scgi_service can also take the config file as a parameter or > SCGI_CONFIG environment variable (so you can pass the config from > Apache or Lighttpd). > > When you first configure it you''ll need to give a password. You can > use the -P to give the password, but read the "scgi_ctrl help config" > output for more information on this. > > Now that it''s running you can use the scgi_ctrl to do special stuff: > > scgi_ctrl help -- You should read this. > scgi_ctrl status -- Prints out some useful status. > scgi_ctrl monitor -- Prints useful status all the time. > scgi_ctrl reconfig -- Reloads the config/scgi.yaml. > scgi_ctrl stop -- Graceful shutdown (see bug above). > scgi_ctrl restart -- Graceful restart (see bug above). > > Each command has extra options you should read--especially the -u > option to specify the DRb URL--but here''s an example > of a safe graceful shutdown: > > scgi_ctrl status > -- notice there''s nobody connected > scgi_ctrl stop > -- wait a bit > scgi_ctrl status > -- still nobody connected > scgi_ctrl stop -f > > Yeah, I''ll be working on that one. > > Enjoy! And please forward comments to me. Especially regarding the > use of DRb in a shared hosting setup. > > Zed A. Shaw > http://www.zedshaw.com/ > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
The ajax issue was fixed by mod_scgi author Neil. Grab the new src from http://arctrix.com/nas/scgi/src/ and recompile the module. Kevin On 10/13/05, Larry Kelly <ldk2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How do I get AJAX requests to work with SCGI! Is there a FAQ somewhere? > -larry > > > On 10/12/05, Zed A. Shaw <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org > wrote: > > Hello Everyone, > > > > This is a rough BETA release of the SCGI Rails Runner. It''s only for > > the experts and the brave as it''s got only a README for documentation > > (which means it''s better documented than most open source projects). > > > > You can get it at: > > > > > http://www.zedshaw.com/downloads/scgi_rails/scgi_rails-0.4.0.tar.bz2 > > > > And then just read the README to figure out what to do. Please send any > > requests, comments, or bugs to me. > > > > One current bug is that it doesn''t really shutdown if you tell it to. > > If you do a stop command and it doesn''t stop > > right away, do a status to make sure nobody''s really connected, then do > > stop with the -f option. Same applies to restart. > > > > FEATURES > > > > * A separate library that contains the SCGI server so that other people > > can re-use the SCGI protocol in their project. Implementing an SCGI > > processor involves subclassing and extending one function. > > * A service that handles the requests and runs about 50% faster from > > the previous version. > > * The service currently doesn''t support the "simple clustering" > > the previous version had. I had several reports that this was > > problematic. > > * A complete DRb based control API that allows you to remotely stop, > > restart, reconfigure, monitor, and shutdown. > > * There''s a scgi_ctrl command that configures and starts as > > well. > > * There''s a sample quick-hack WEBrick manager that lets you > > control scgi_service via a web browser. > > * The shutdown and restart use a graceful shutdown process which lets > > currently connected clients finish, and redirects new connections to > > a /busy.html page. > > > > SECURITY > > > > This release ***is not secure***. Each of the DRb commands requires a > > password, and that password is stored in the config file using Ruby''s > > crypt, so it''s reasonably OK. But, if you don''t own the machine (i.e. > > shared hosting) then you''ll need SSL on your DRb. I''m still working on > > instructions and code to help make SSL on DRb easier. > > > > Expect anybody who can sniff localhost to get your password, and anyone > > who can get to your config/scgi.yaml will be able to crack the password > > if you pick a shitty one. > > > > SAMPLES > > > > The main difference is that you use the scgi_ctrl command to configure > > and start the scgi_service command. The plan is to make it easy to > > kick off and manage many scgi_service processes. This also lets you > > configure several scgi_service processes, but let Apache or Lighttpd > > start them, and still manage them with scgi_ctrl. > > > > Here''s the normal start procedure for Unix people: > > > > scgi_ctrl config -e production > > scgi_ctrl start > > > > That''s from your Rails application''s directory. If you''re on Windows > > it''s nearly the same: > > > > scgi_ctrl config -e production > > scgi_service > > > > The scgi_service can also take the config file as a parameter or > > SCGI_CONFIG environment variable (so you can pass the config from > > Apache or Lighttpd). > > > > When you first configure it you''ll need to give a password. You can > > use the -P to give the password, but read the "scgi_ctrl help config" > > output for more information on this. > > > > Now that it''s running you can use the scgi_ctrl to do special stuff: > > > > scgi_ctrl help -- You should read this. > > scgi_ctrl status -- Prints out some useful status. > > scgi_ctrl monitor -- Prints useful status all the time. > > scgi_ctrl reconfig -- Reloads the config/scgi.yaml. > > scgi_ctrl stop -- Graceful shutdown (see bug above). > > scgi_ctrl restart -- Graceful restart (see bug above). > > > > Each command has extra options you should read--especially the -u > > option to specify the DRb URL--but here''s an example > > of a safe graceful shutdown: > > > > scgi_ctrl status > > -- notice there''s nobody connected > > scgi_ctrl stop > > -- wait a bit > > scgi_ctrl status > > -- still nobody connected > > scgi_ctrl stop -f > > > > Yeah, I''ll be working on that one. > > > > Enjoy! And please forward comments to me. Especially regarding the > > use of DRb in a shared hosting setup. > > > > Zed A. Shaw > > http://www.zedshaw.com/ > > > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
What he said. Additionally, Curt Hibbs gave me new compiled win32 stuff that I keep forgetting to post to my site. Sorry Curt, tonight I promise. Zed A. Shaw http://www.zedshaw.com/ On Thu, 13 Oct 2005 14:51:23 -0700 K C <born70s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The ajax issue was fixed by mod_scgi author Neil. Grab the new src > from http://arctrix.com/nas/scgi/src/ and recompile the module. > > Kevin >
The binaries I gave you just include the one-line fix the Kevin created, and not the complete solution that Neil just implemented. The binaries I gave you are the same ones I have in my current preview release of Instant Rails, and I just got a report that AJAX is not working in Instant Rails. Tomorrow night I''ll try to get new binaries built for windows. Curt On 10/13/05, Zed A. Shaw <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org> wrote:> > What he said. Additionally, Curt Hibbs gave me new compiled win32 > stuff that I keep forgetting to post to my site. Sorry Curt, tonight I > promise. > > Zed A. Shaw > http://www.zedshaw.com/ > > > On Thu, 13 Oct 2005 14:51:23 -0700 > K C <born70s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > The ajax issue was fixed by mod_scgi author Neil. Grab the new src > > from http://arctrix.com/nas/scgi/src/ and recompile the module. > > > > Kevin > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails