Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Search Repo:
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Improve documentation
Hongli Lai (Phusion) (author)
Sun Mar 02 06:16:42 -0800 2008
commit  2c9448a9dbb9ca2d3a67c77a4b75b00ee8359dee
tree    c4fc9f31b6aa5b949d43c25d2698a42fb6852677
parent  46064f22e9f53c5123404a8c5a0472def8f59dfe
...
7
8
9
 
 
10
11
12
...
7
8
9
10
11
12
13
14
0
@@ -7,6 +7,8 @@ of the application's own licensing terms. The application will not be bound to
0
 the terms of the GPL in any way. That is, the GPL only applies to Passenger
0
 itself, and not to applications that are run through Passenger.
0
 
0
+We also explicitly allow Apache to load the Passenger Apache module.
0
+
0
 ----------------------------------------------------------------------
0
 
0
      GNU GENERAL PUBLIC LICENSE
...
11
12
13
 
 
 
14
15
16
...
18
19
20
 
 
 
21
22
23
...
11
12
13
14
15
16
17
18
19
...
21
22
23
24
25
26
27
28
29
0
@@ -11,6 +11,9 @@ module Passenger
0
 class SpawnError < StandardError
0
 end
0
 
0
+# TODO: check whether preloading the application succeeded. spawn_application()
0
+# should throw an exception with the error message if the app couldn't initialize.
0
+
0
 # This class is capable of spawns instances of a single Ruby on Rails application.
0
 # It does so by preloading as much of the application's code as possible, then creating
0
 # instances of the application using what is already preloaded. This makes it spawning
0
@@ -18,6 +21,9 @@ end
0
 #
0
 # Use multiple instances of ApplicationSpawner if you need to spawn multiple different
0
 # Ruby on Rails applications.
0
+#
0
+# *Note*: ApplicationSpawner may only be started asynchronously with AbstractServer#start.
0
+# Starting it synchronously with AbstractServer#start_synchronously has not been tested.
0
 class ApplicationSpawner < AbstractServer
0
   include Utils
0
   
...
30
31
32
33
34
35
 
 
 
36
37
38
...
30
31
32
 
 
 
33
34
35
36
37
38
0
@@ -30,9 +30,9 @@ require 'stringio'
0
 module Passenger
0
 
0
 # Modifies CGI so that we can use it. Main thing it does is expose
0
-# the stdinput and stdoutput so SCGI::Processor can connect them to
0
-# the right sources. It also exposes the env_table so that SCGI::Processor
0
-# and hook the SCGI parameters into the environment table.
0
+# the stdinput and stdoutput so RequestHandler can connect them to
0
+# the right sources. It also exposes the env_table so that RequestHandler
0
+# can hook the request parameters into the environment table.
0
 #
0
 # This is partially based on the FastCGI code, but much of the Ruby 1.6
0
 # backwards compatibility is removed.
...
6
7
8
9
10
11
 
 
 
 
 
 
 
 
 
 
 
 
 
12
13
14
...
6
7
8
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
0
@@ -6,9 +6,21 @@ require 'passenger/application_spawner'
0
 require 'passenger/utils'
0
 module Passenger
0
 
0
-# TODO: check whether Rails version is supported
0
 # TODO: check whether preloading Rails was successful
0
 
0
+# This class is capable of spawning Ruby on Rails application instances
0
+# quickly. This is done by preloading the Ruby on Rails framework into memory,
0
+# before spawning the application instances.
0
+#
0
+# A single FrameworkSpawner instance can only hold a single Ruby on Rails
0
+# framework version. So be careful when using FrameworkSpawner: the applications
0
+# that you spawn through it must require the same RoR version. To handle multiple
0
+# RoR versions, use multiple FrameworkSpawner instances.
0
+#
0
+# FrameworkSpawner uses ApplicationSpawner internally.
0
+#
0
+# *Note*: FrameworkSpawner may only be started asynchronously with AbstractServer#start.
0
+# Starting it synchronously with AbstractServer#start_synchronously has not been tested.
0
 class FrameworkSpawner < AbstractServer
0
   APP_SPAWNER_CLEAN_INTERVAL = 125
0
   APP_SPAWNER_MAX_IDLE_TIME = 120
...
5
6
7
 
 
 
 
 
 
 
 
8
9
10
...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
0
@@ -5,6 +5,14 @@ require 'passenger/message_channel'
0
 require 'passenger/utils'
0
 module Passenger
0
 
0
+# This class is capable of spawning Ruby on Rails application instances.
0
+# Spawning a Ruby on Rails application is usually slow. But SpawnManager
0
+# will preload and cache Ruby on Rails frameworks, as well as application
0
+# code, so subsequent spawns will be very fast.
0
+#
0
+# Internally, SpawnManager uses FrameworkSpawner to preload and cache
0
+# Ruby on Rails frameworks. FrameworkSpawner, in turn, uses
0
+# ApplicationSpawner to preload and cache application code.
0
 class SpawnManager < AbstractServer
0
   DEFAULT_INPUT_FD = 3
0
   SPAWNER_CLEAN_INTERVAL = 30 * 60

Comments

    No one has commented yet.