From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.216.144 with SMTP id hi16cs7225qcb; Sun, 2 Oct 2011 04:30:35 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCNv0qIbzCBDXlqH0BBoE7XaBbA@googlegroups.com designates 10.216.229.92 as permitted sender) client-ip=10.216.229.92; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCNv0qIbzCBDXlqH0BBoE7XaBbA@googlegroups.com designates 10.216.229.92 as permitted sender) smtp.mail=rack-devel+bncCNv0qIbzCBDXlqH0BBoE7XaBbA@googlegroups.com; dkim=pass header.i=rack-devel+bncCNv0qIbzCBDXlqH0BBoE7XaBbA@googlegroups.com Received: from mr.google.com ([10.216.229.92]) by 10.216.229.92 with SMTP id g70mr1977420weq.15.1317555034344 (num_hops = 1); Sun, 02 Oct 2011 04:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:x-sourceip:message-id:date:from:user-agent :mime-version:to:subject:x-cloudmark-analysis:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type :content-transfer-encoding; bh=/swnUpke+myGyhNHwtFdDXIlTp2Mqeuv2qPNGrSWOR4=; b=mLmD0dLWtfpvqpCZRso6m7IS3mKghdfSpnsQ0GrFpmfyWsn+VIL/cZY64ifUZvTBz5 tLQzyLlQJpwtXyKevy60g/52UjGn6byYnXqEadQDmiCI2HII4fQ5zfbEo5BFKvcS3kW7 yQUE4O19J27qWyQISYJEG9uHWwYzRjegcLGvU= Received: by 10.216.229.92 with SMTP id g70mr634698weq.15.1317555031750; Sun, 02 Oct 2011 04:30:31 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.216.206.224 with SMTP id l74ls19745800weo.2.gmail; Sun, 02 Oct 2011 04:30:30 -0700 (PDT) Received: by 10.216.229.207 with SMTP id h57mr32954weq.3.1317555030858; Sun, 02 Oct 2011 04:30:30 -0700 (PDT) Received: by 10.216.150.224 with SMTP id z74mswej; Sun, 2 Oct 2011 04:26:00 -0700 (PDT) Received: by 10.204.156.138 with SMTP id x10mr1422822bkw.17.1317554732094; Sun, 02 Oct 2011 04:25:32 -0700 (PDT) Received: by 10.204.156.138 with SMTP id x10mr1422821bkw.17.1317554732075; Sun, 02 Oct 2011 04:25:32 -0700 (PDT) Received: from fep17.mx.upcmail.net (fep17.mx.upcmail.net. [62.179.121.37]) by gmr-mx.google.com with ESMTP id a4si4919814fad.3.2011.10.02.04.25.29; Sun, 02 Oct 2011 04:25:29 -0700 (PDT) Received-SPF: neutral (google.com: 62.179.121.37 is neither permitted nor denied by best guess record for domain of matthias@waechter.wiz.at) client-ip=62.179.121.37; Received: from edge02.upcmail.net ([192.168.13.237]) by viefep17-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20111002112529.YUGL1911.viefep17-int.chello.at@edge02.upcmail.net> for ; Sun, 2 Oct 2011 13:25:29 +0200 Received: from waechter.wiz.at ([84.112.189.224]) by edge02.upcmail.net with edge id fnRR1h00g4qw4HQ02nRS9h; Sun, 02 Oct 2011 13:25:29 +0200 X-SourceIP: 84.112.189.224 Received: from [192.168.1.21] (doppelherz.waechter.lan. [192.168.1.21]) by waechter.wiz.at (MeTA1-1.0.Alpha5.0) with ESMTPSA (TLS=TLSv1/SSLv3, cipher=CAMELLIA256-SHA, bits=256, verify=NO) id S00000000008F186900; Sun, 2 Oct 2011 13:25:25 +0200 Message-ID: <4E884A1D.2080102@waechter.wiz.at> Date: Sun, 02 Oct 2011 13:25:17 +0200 From: =?windows-1252?Q?Matthias_W=E4chter?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0a1) Gecko/20111001 Thunderbird/10.0a1 MIME-Version: 1.0 To: rack-devel@googlegroups.com Subject: Purpose of config.ru (regarding server options), #245 X-Cloudmark-Analysis: v=1.1 cv=1spcbIYDqsXqpWho1FqXt/RH1HhH/N0x2ckrrSfPMwM= c=1 sm=0 a=Hdpe-0g4zoMA:10 a=ZXFmmBp8BLcA:10 a=N659UExz7-8A:10 a=NEAV23lmAAAA:8 a=R9nxedvQ80zV6rH4GsEA:9 a=pILNOxqGKmIA:10 a=GK-HenI_ExkIlVYY:21 a=L9CAgUq21nHCOBNj:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-Original-Sender: matthias@waechter.wiz.at X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 62.179.121.37 is neither permitted nor denied by best guess record for domain of matthias@waechter.wiz.at) smtp.mail=matthias@waechter.wiz.at Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Hi, Recently, I forked rack and created a feature [https://github.com/rack/rack/pull/245] that allows one to specify web server options as commands within config.ru, not only on the rackup command line or the comment line (#\) within config.ru. The need for this arises from new web server technologies like the ones typically used for Mongrel2 which need significantly more setup information than a simple Webrick or (legacy) Mongrel server. Mongrel2 typically exchanges its web server requests and responses through *two* sockets, based on ZeroMQ, and these sockets can finally be Unix Domain Sockets which don’t waste the TCP socket address space. OTOH, in well-structured environments those IPC sockets need longer path names than a simple TCP port number, additionally it might be beneficial to use Ruby techniques to build up the IN and OUT IPC sockets based on some common pattern. Furthermore, Mongrel2 relies on a uuid setting for identifying sessions. Setting all those options on the command line to a standalone rackup execution defeats its purpose, and setting them within the config.ru file inside the tiny littly comment line is ugly and cannot make use of Ruby constructs at all. So the idea was to let the newly created Rack::Builder object handle those options and hand it over to the calling process. My change request, together with the necessary code and test changes, was rejected and closed right away by James with the comment > config.ru is supposed to be portable and not bound to a particular server. I wonder whether it’s James who doesn’t understand what I want, or whether it’s me who doesn’t understand what config.ru is supposed to be. I thought it is meant as a server configuration file: It • defines which server technology to use (if there are multiple to choose from or if I want a specific solution), • configures the used server, and • defines which application and possible middleware to load. The goal, as far as I got it, is to have the application and its setup bound together in a single configuration file, called config.ru. Sadly, the current syntax is only optimized for defining the application; the first two items on the list are handled via a clumsy comment line that gets longer the more options the web server requires for configuration. So, can someone enlighten me, what’s the purpose of config.ru? Isn’t it supposed to carry the configuration for the web server as well? Is it a bad idea to let Rack::Builder collect all these options within the config.ru body instead of the comment line? – Matthias