Sha256: 99a248d5b0f074d61ae5846573a3a662cf56e9d625cba5b6292aa76ac34ccfeb

Contents?: true

Size: 1003 Bytes

Versions: 1

Compression:

Stored size: 1003 Bytes

Contents

# = AppServer
#
# code:: gmosx
#
# (c) 2004 Navel, all rights reserved.
# $Id: server.rb 89 2004-10-20 12:55:58Z gmosx $

require "drb"

require "n/application"
require "n/server"
require "n/app/session"

module N; module App

# = AppServerMixin
#
module ServerMixin

	def initialize_app
		if $drb_state
			# Cluster
			$lm = N::Cluster::Slm.new($drb_lm_server, "druby://:8000")
			$sessions = DRbObject.new(nil, $drb_sessions_cluster)
		else
			$lm = N::SafeHash.new
			$sessions = N::App::SessionManager.new
		end

		# initialize app
		initialize_sitemap()
		initialize_shaders()
		initialize_events()		
	end
	
end

# = AppServer
#
# The Application Server. Handles dynamic requests in a web application.
# Dont keepalive (or use a VERY SMALL keepalive). Typically this server
# is used along with a standars http server that handles other resources.
#
class Server < N::Server
	include N::App::ServerMixin
	
	def initialize(name = "AppServer")
		super
		initialize_app()
	end
end

end; end  # module

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.1.2 lib/n/app/server.rb