<br><br><div class="gmail_quote">On Sat, Mar 26, 2011 at 1:32 PM, Michael Snoyman <span dir="ltr">&lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,<br>
<br>
JP Moresmau recently sent me an email asking for recommendations on<br>
hosting a Yesod app. I think a number of you have heard me mention the<br>
idea of setting up a WAI web hosting system (code named Lambda<br>
Engine). I think it&#39;s time to start hitting this idea hard, and I&#39;d<br>
like community involvement as much as possible.<br><br></blockquote><div><br></div><div>I think this is an interesting idea but hosting Haskell apps is basically just providing an OS with open ports on which they can run their http or fcgi servers. </div>
<div> </div><div>...</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
At the other extreme, we could simply provide a set of shell scripts<br>
for setting up a vanilla Ubuntu (or Debian, or Cent, or FreeBSD...)<br>
install to support compiling a WAI application, provide an nginx<br>
setup, etc. The user would be responsible- and have the freedom to-<br>
set up his/her own server however he/she wants.<br>
<br></blockquote><div><br></div><div>This seems like a better idea.  IMO,  it doesn&#39;t matter where we host, the OS images are what matter. </div><div>I&#39;m a security guy by trade, so my app servers will never have any type of compiler on them when I host in production, and I would prefer all of my apps to be statically linked.  </div>
<div><br></div><div>The thing that people new to web hosting suffer from is that there are approximately 1 billion ways to configure and host. Some ways are better than others, so I think we could provide: </div><div><br>
</div><div>* A hardened OS image that understands our required configuration and provides no other services. My recommendation would be Turn Key Linux [3] [4]</div><div>* A deployment script (private key auth based) which would push out new binaries, swap and bounce them. </div>
<div>* A set of *-server.hs that understand our set of server configurations**</div><div><br></div><div>If someone had these items, they could take their game to any hosting company in town that supported VMs on custom ISOs.  We could probably even come up with a Ubuntu or RedHat hardening script for those that don&#39;t want to use VMs/ISOs. </div>
<div><br></div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
There are lots of in-between points on that spectrum. For example, I<br>
was thinking of perhaps providing a central compilation server that<br>
everyone could use. In my experience, Haskell applications take very<br>
few resources to run, but actually building the things take a while.<br>
Compiling on a local system and then uploading is painful because (1)<br>
you have to deal with architecture issues and (2) you might have a<br>
slow upload speed.<br>
<br></blockquote><div> </div><div>I see no reason why a person couldn&#39;t build on their own machine, but if they don&#39;t have the resources, we could certainly set up a micro share on EC2 for that purpose.  Making a secure build environment where they send over the code and it gets turned into a binary  could be done.. but there is a *huge* amount of mutual trust going on.  I wouldn&#39;t want to be involved at either end. </div>
<div><br></div><div> ...</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Anyway, I&#39;m very interested to hear what other people think about all<br>
this. I&#39;ll enumerate a bunch of random thoughts on this topic:<br>
<br>
* Should this be a for-profit venture, bankrolled by a few members, or<br>a community, non-profit approach? (I&#39;m favoring the latter.)<br></blockquote><div><br></div><div>Using my recommended approach, the cost would be nominal. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
* If we decide to provide some serious hosting power, we might be able<br>
to make a deal with a hosting provider, stating that we&#39;re<br>
representing the &quot;entire Haskell web community&quot;.<br></blockquote><div><br></div><div>I&#39;m sure some hosting providers would love to play ball if we could guarantee some </div><div>long term customers if they did. </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
* I don&#39;t really think this needs to be WAI specific: assuming we just<br>
use reverse HTTP proxies, this will work for any app that uses</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
standalone hosting. We could also support FastCGI if we wanted.<br></blockquote><div><br></div><div>Yep. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

* Remember that Amazon is now providing a free tier, which provides a<br>
micro EC2 instance (available as either 32 or 64 bit). I think the<br>
micro instance should be sufficient for running a few web apps, nginx<br>
and PostgreSQL.<br></blockquote><div><br></div><div>This is a great idea, certainly a decent proving ground. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

* Since starting up and shutting down instances is so easy with<br>
Amazon, we could provide both a &quot;web host&quot; image and a &quot;Haskell<br>
compiler&quot; image. The web host could automatically start up a compiler<br>
instance as needed.<br></blockquote><div><br></div><div>Yep.  </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
* Are we going to provide email sending support, with all of the<br>
complications of dealing with spam lists, or simply offload to<br>
external services (like Amazon SES[2])?<br></blockquote><div><br></div><div>Not gonna touch that one. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

* Does anyone have a good recommendation on who to use as a host?<br>
<br></blockquote><div>If we really want to go down this path, I have some contacts we could talk to, but don&#39;t want to bother them unless we have a solid plan. </div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
<br class="Apple-interchange-newline">** By server configurations, I mean a 1 tier approach, where the front-end http server, the applications, and the database are on on the same machine, through the 3 tier approach. </div>
<div><br></div><div><br></div><div>[3] <a href="http://en.wikipedia.org/wiki/TurnKey_Linux_Virtual_Appliance_Library">http://en.wikipedia.org/wiki/TurnKey_Linux_Virtual_Appliance_Library</a></div><div>[4] <a href="http://www.turnkeylinux.org/">http://www.turnkeylinux.org/</a></div>
</div><div><br></div><div><br></div><div><br></div></div>