web server

GitHub Rebase #38

Welcome to Rebase 38. Suggestions for projects to cover are always welcome, check out the criteria here. In the meantime, check out this preview of some neat visualizations using the GitHub API of how developers are connected:

Where's Waldo: Track user locations with Node.js and Redis

Where’s Waldo is my little node.js/Redis project to keep track of users in an app. Say hi!

hi waldo!

Tracking hits on every request can get costly, and I didn’t want to hold up the more important server processes with this. So, it felt like a good fit for a quick asynchronous web server. Node.js and Redis fit the bill perfectly.

The Path to Rails 3: Approaching the upgrade

Now that we’ve looked at some of the core architecture, I’d like to shift my focus first to upgrading an application. Originally I had planned on writing about upgrading plugins first, but apparently that API isn’t quite stable. So, I figured rather than write a blog post that will be deprecated in 2 weeks, I’d rather write one that will be deprecated in 3-6 months instead.

Ruby EventMachine: a short introduction

Introduction

Before answering what is EventMachine, first I will try to explain the problem that EventMachine solves.

A network server like http server or chat server usually works in a threaded model. What it means is that on a particular port, a process is listening for connections. When a client makes a connection then this process spawns a new thread and that thread is handed over the task of responding to that client. If server is getting too much traffic then the number of threads created by the main process goes up very quickly.

Racksh: A Rails-Console-A-Like for Rack-Based Ruby Apps

Have you ever yearned for something like Rails's script/console or Merb's merb -i in your other Rack based apps? If so, then Marcin Kulik's racksh, inspired by Heroku's console, might be for you.

Setup Ruby Enterprise Edition, nginx and Passenger (aka mod_rails) on Ubuntu

The following is a very short guide on setting up Ruby Enterprise Edition (REE), nginx and Passenger, for serving Ruby on Rails applications on Ubuntu. It also includes a few quick and easy optimization tips.

We start with setting up REE (x64), using the .deb file provided by Phusion:

Expiring an entire page cache tree atomically

As you’ll all know, Rails has page caching baked right in – the first time an action is hit, it writes a html file of the result to the filesystem. Subsequent hits are served direct from the html file at high speed by the web server without ever involving your Rails app.

Expiring the cache is just a case of deleting the html file. But what if you want to expire an entire tree of cache files? Say you change something in a header or footer, so every single page needs expiring at once.

Rails-like console for any Rack based ruby web app

I always miss script/console from Rails while developing my Sinatra apps, especially ones built with DataMapper where I need to auto-migrate my db. Sinatra doesn't come with any comparable solution as it's not a full framework, but rather library for creating simple web apps. Recently I tried Heroku platform and their "heroku console" command inspired me to create something similar - racksh aka Rack::Shell.

GitHub Rebase #28

Now that news from the move has slightly settled down, it’s Rebase time! As always, if you’ve got awesome projects you’d like featured, feel free to send me a message.

Cookie-based Sessions in Sinatra

Cookie-based Sessions in Sinatra

Julio Javier CicchelliThis is a guest post from Julio Javier Cicchelli.

Syndicate content