Staging magento sites: multiple sites running APC == broken

Well, it’s been a wild webhosting ride recently.  I’ve been automating dev/staging/live production procedures with my Drupal and Magento clients.  In a few days I’ll publish a comprehensive blogpost about this whole project, replete with nginx, php, php-fpm, etc configuration goodies.

For now, here’s one tidbit that I just can’t hold back:

I ran into an interesting problem with running multiple Magento sites on the same server: the new Magento devsite I set up would unfailingly read the old site’s db configuration information (from app/etc/local.xml) 9/10 times after restarting nginx and php5-fpm. And to make things even more confusing, on some restarts, it’d read the devsite db configuration and so would the live site!

After trying every single possible iteration of php5-fpm and nginx options that I thought might be relevant, I remembered that I had set up Magento to use APC for caching, and changed the prefix:

1
2
3
4
5
6
7
8
9
10
<config>
  <global> 
<!-- ... -->
        <cache>
            <backend>apc</backend>
            <prefix>alphanumeric (i.e. change this to something else)</prefix>
        </cache>
<!-- ... -->
     </global>
  </config>

It took a LONG time to track down this issue.  I had forgotten that I had apc cache running on this site, and I never would’ve guessed that it would mix up different site’s caches.  The search was even more complicated because I am not as confident with my nginx/php-fpm skills as i am with apache/mod_php. Serves me right for blindly implementing the magento apc cache without understanding what the various xml config options mean.

After finding the problem on my own, I searched to see if anyone else has experienced this and found a post on the magento board.  Wish I’d seen that 6 hours ago.

I’m going to add an APC-prefix-changing sed operation to my magento dev/staging/production scripts now.

Posted in Uncategorized | Tagged , , , , | Leave a comment

Stolen bike

My bicycle was just stolen from the WSU farmers market today, around noon.

Details:
* large orange Nashbar mountain bike frame, only decal is a “nashbar” signature on outside of left chainstay
* black rigid fork
* dt/hugi hubs, avid mechanical disc brakes, mismatched rims
* slick tires: specialized armadillos
* titec bar/stem/post
* sram 9.0 rear derailleur, shimano front
* green raceface cranks

Posted in Bicycles | Tagged , , , | Leave a comment

Late summer updates: leaves, chicken races, hacker spaces, garden sensors

I’d like to share a few stories:

Auto the dog, with leaves

Auto the dog, with leaves

1) Leaves

For some odd reason a tree in my backyard thinks it’s Autumn, turned yellow, and pooed its leaves all over the place.  Here’s a photo with my dog Auto.

This leaf event, combined with the end of an endless heat wave, has noticeably  changed my mood.  Time to start storing up nonperishables and fattening up for winter.  Gotta fix my fender-clad bicycle, fortify my insulation, and spend more time outside before detroit winter coma sets in.

A group of chicken racers prepare to release their hens

Racers prepare to drop hen

2) Chicken races

My friend Karthik Kavasseri convinced seventeen chicken farmers to let their fastest hens walk around in circles at the Temple Bar a few weeks ago.

Check a Flickr page for my photos, and also use the google to read other people’s reports.  Mr. Todd Scott has a lovely summary and additional photos.

Blair Nosan featured her frozen yogurt product at the Chicken Race

Blair Nosan featured her frozen yogurt product at the Chicken Race

While I was busy coaxing one of my chickens down a gravelly aisle, my girlfriend Blair Nosan served up some mean frozen-yogurt (fro-yo, if you will) with toppings.  The froyo was met with universal accolades, save for the one or two people who’d never tasted yogurt before.  Her offerings were nicely paired with the renegade food-cart offerings of the Pink Flamingo, which arrived fashionably late.

My upstairs neighbors and I ran one chicken in this event and I think we finished second.  I delivered the chicken to the event by bungee-cording a gigantic dog crate atop my B.O.B. trailer.  Yes, it was copping a backwards lean but the chicken and more importantly all of the straw was contained.  I delighted in riding through the Motor City Casino stretch of Temple with this contraption on display.  Nothing attracts a crowd like a bicycle trailer and a chicken.

I totally soldered that Garduino

I totally soldered that Garduino

3) Hacker spaces and garden sensors

As I mentioned in an earlier posting, I joined OmniCorpDetroit, a splendid hackety-hacker outfit in Eastern Market.  I’m currently trying to figure out how to construct mesh-networked temperature sensors to deploy in various Detroit greenhouses and hothouses.

Ideally, every greenhouse will have four temperature probes: soil and ambient, indoor and outdoor.  The probes would transmit back to a nearby wireless mesh network node that would operate as a local data server and, when there’s a good ‘net connection, upload data somewhere safe.  Mesh nodes would also act as community wireless extensions, if they’re in a useful location for that.

This work builds on the idea of connecting technology democracy / digital justice work with community gardening / environmental justice principals.  Read more about these ideas in OTI’s Hot Mesh report.

The initial prototyping will take place at the Mt Elliot Makerspace and the Earthworks Garden on the eastern side of our city.

Random thoughts to be expanded at a later date: thermocouple vs thermistor for temperature sensing: may have opportunity to make our own thermocouples…. do cost comparisons… length of cable, power draw? RF concerns with xbee vs 2.4/5.8 networking / lots of thermo sensors?

Posted in Tech | Tagged , , , , , , , , | Leave a comment

GSM hijacking + VoIP + community wifi

Via HN: Chris Paget demonstrated a nifty little GSM hijacking device at Defcon: with a directional antenna and some clever OpenBTS-based software, he was able to provide an irresistably-strong signal for cellphones, which would switch off call encryption and then trunk the call onto a VoIP network.

Sure, this is awesome for espionage, playing jokes on your neighbors, etc. but how about running an experimental cellphone network that can provide service for not only VoIP handsets but also old GSM phones?  It’d be great fun to build a renegade cell network using throwaway old GSM handsets and cobbled-together VoIP devices / homemade phonebooths.

NB: One commenter on hackernews pointed out the different types of phones that would allow this hijacking.  Good to know.

Posted in Tech | Tagged , , , , , , , | Leave a comment

Lyme disease

Well, it’s Maker Faire weekend and after attending a somewhat lackluster and under-attended “can do camp” in Detroit Proper this past thursday, I’ll visit the actual Faire (in Dearborn) on Sunday. I’m excited to hear Dewayne Hendricks speak, and can’t wait to see some metro-area residents come out of the woodwork.

This coming week, I’ll be helping Jenny Lee of Allied Media Projects put together a community wireless network care-package for some Albuquerque community groups.  It’s exciting to see our little mesh nodes travel so far!  I’m teaching Jenny not only the mesh setup (using the openmesh dashboard) but also the procedure for jailbreaking and flashing our nonstandard equipment.

After a bit of internal deliberation, I’ve decided to join Detroit’s hackerspace, OmniCorpDetroit.  I want to be a part of a nerd club, basically.  Plus, it’s a great place to store my SparcStation 20 and VT-420 terminal.  Maybe I can teach someone about baud rates.  PS: I just helped out with their blog/website and it’s progressing very well.  The logo is radical.

Finally, during a recent trip to the eastern seaboard, I seemed to have contracted Lyme Disease, and have started a regiment of antibiotic to stymie the lyme.  Why hasn’t modern medicine made me invulnerable to this?!?! We should be giving ticks the chronic fatigue and nauseating headaches, not vice-versa.

Well, there goes a perfectly good blog post.  Sorry you had to read about my bacterial infection.  Kids, watch out for ticks.

Posted in Tech | Tagged | Leave a comment

Typesetting the web

I’ve been reading the backlog of the Scribd team’s programming blog and am thoroughly amazed.  For some reason, I’d blindly assumed that flash was being used for a lot of this stuff, but they’ve been html5-ifying and css3-izing their game.

Check http://www.fontsquirrel.com/fontface/generator and http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

Posted in Asides, Tech | Tagged , , | Leave a comment

Extensive mesh

After an invigorating AMC2010, and a very fruitful HOT MESH conference session and media lab presence, I’m back at my daily work of code wrangling, system adminstering, etc.  But this afternoon I had the chance to extend the North Corktown community wireless network, with Dan from OTI and a few freshly-prepared wireless routers.

Back story

I live in North Corktown, a Detroit neighborhood about two miles from downtown.  I used to live up the street and had a cable modem, but when I moved a few blocks away and tried to transfer my account, the cable company refused to install service.  After a struggle, I ended up with a barely-broadband DSL connection.  Many of my neighbors have had similar problems in trying to get internet access.  To solve this, I set up a small network of meshed routers to repeat my signal down my block.  Also, a neighbor up the street from me was willing to share his connection with nearby residents, so I set him up a mesh router as well.  Hot Mesh was born, and North Corktown got a little bit of free internet.  People started noticing the signal, random cars started hanging out in front of my house, and I got to meet my new neighbors.

Enter the Spaulding Court

Spaulding Court is an apartment complex.  I live across the street from it.  After being neglected by an absentee landlord for a decade or so, some neighbors started getting serious with it and are fixing the place up.  Read more about this whole process in a Detroit YES! thread or via the official Spaulding Court web presence.

The US Social Forum served as a catalyst for Spaulding Court.  It’s playing host to a couple dozen tent-dwellers and temporary apartment tenants, as well as one long-term tenant.  Read a slightly-tongue-in-cheek mise-en-scène by my neighbor (and community wireless participant) Patrick.  The project’s organizers were interested in providing internet access to the new residents, and I was willing to help.

A few days ago, we deployed a few more nodes and extended the wireless coverage to the west.   The network now solidly covers about three blocks and is served by two residential DSL connections and a cable modem shared between nine wireless mesh nodes.  All of the new infrastructure will stay in place for the neighborhood to benefit from.

Technical Details

Take a look at the network map and notice the distance between nodes — even with a few trees in the way, we have a couple very large gaps between gateways and repeaters.  The node in the middle, codenamed “landyacht” and stowed in the pantry of an Airstream trailer, acts as a repeater that would bridge traffic if either of the gateways had a problem.  Landyacht is often out of service due to power issues.  The other out-of-service node, Courteous, is sitting on my table waiting to receive a specially-crafted XSS payload.

Both Dan and I were surprised at the power of these little 30mW routers: some of them are traversing multiple empty lots.  We’d thought that we would’ve needed some cantennas, but it wasn’t needed.

[update]   The North Corktown network is actually made up of a few separate Open-Mesh networks:  the one linked to above uses another network as a backhaul, and any other network can use it as a backhaul.  This means that anyone can set up their own nodes, with or without an internet connection, and easily extend the network.  These new networks can have completely different settings (i.e. you can set a password for your own personal network, or limit bandwidth, or give it a funny name).

The Future

This is my neighborhood’s network.  It worked well because I knew quite a few neighbors who were interested, and I was able to school them in mesh networking theory over and over again until they were all comfortable participating.  Many neighborhoods might not have the advantage of a resident community wifi zealot, but it only takes a few hours of playing with the hardware and learning some networking concepts to become a very capable mesh network technician.

I’d like to see the next DiscoTech happen alongside a mesh network install and computer training /giveaway.  I think there’s a nice pile of computers left around after the US Social Forum that ought to be put to good use.

Posted in Tech | Tagged , , , , , , , | Leave a comment

AMC 2010 liveblogging: gleaning tweets with node.js and mysql

A bit about my recent work:

As the web dev for the Allied Media Conference, I’ve been tasked with creating a system for participants to liveblog about all the sessions at this year’s conference.  I decided on setting up a three-part system: a tweet searcher+archiver, a JSON server, and the existing 2010 AMC and USSF discussion message board software.

  • Tweet searcher+archiver: a node.js app that reads a filtered twitter feed from the Streaming Twitter API (using a version of twitter-node, separates out relevant hashtags (each relating to a conference session) and stores them in a MySQL db. (80% complete)
  • Tweet server: another node.js app, this time a HTTP server using djangode, that responds to queries for certain hashtags and returns a JSON stream of tweets with that tag, or alternatively returns a “last tweet” timestamp for comparison on the frontend. (10% complete)
  • Frontend: a modified Drupal forum setup with a special field on topics that offers the relevant hashtag as an element on the page.  Javascript by PaulH will form a HTTP request using that hashtag to retrieve tweets from the tweet server and, based on the twitter timestamp, intertwine them with the topic replies. (80% complete)

This may seem like a complicated system.  Why not just draw tweets using clientside javascript during pageload?  Why use bespoke node.js servers instead of doing a Drupal implementation or buying cloud services?  Respectively, temporariness and efficiency.  With our setup, the twitter conversation isn’t temporary anymore:  we can archive the conversation and guarantee that it lasts for future viewers (no need to rely on twitter to keep on serving tweets).  It’s also more efficient: for one thing, it’s only one stream request from twitter (maybe two if i want to do redundancy) instead of a bunch of in-browser requests, and the streaming API seems to be more timely and reliable.  Node.js lends itself very well to this type of system.

While the current implementation is definitely off-the-cuff hackish, I’m going to work on generalizing the code and will release it on github afterwards.  If anyone is interested in collaboration, please comment!

Posted in Tech | Tagged , , , | Leave a comment

Upcoming DISCOTECH

Discover Technology at the DiscoTech … Saturday Jun 12 2-5pm @ MOCAD … Brought to you by the Detroit Digital Justice Coalition …. Own technology, together … Download PDF of flyer

Posted in Tech | Tagged , | Leave a comment

hotMesh update

Hi,

Things have been extremely busy for me with work, and I haven’t been able to spend much time with the community wireless network development. I have, however, rolled out a couple test networks.

Two of the networks are running quite well. One is in the south Cass Corridor, the other in North Corktown. The next big network experiment will be in the Northwest Goldberg neighborhood, as a collaborative project with the Detroit Digital Justice Coalition, the Hush House, and some US Social Forum planners.

In addition to this planned network, I’d be interested in rolling out a smaller mesh (3-4 nearby nodes) in the shorter term, for real-world testing.

I’m eventually going to switch one of these networks to a self-hosted management server, as opposed to the Openmesh dashboard, to make it easier to experiment with router firmware and settings.

Posted in Tech | Tagged , , , , | Leave a comment