Skip to Content
BLOG.

Blog?

Blog Downtime

Hi all,
I’ve been having difficulty with my service provider recently. We’re back up and running though. I’ll get to posting these as blog posts, but in the meantime, you can view my recent writing about Iran, the Elections, etc by following these links:

An analysis of Twitter’s role in the Iranian Election protestsĀ here.
The first-hand account from an Iranian living in Tehran, about the election turmoil isĀ here.
The second conversation in this series can be found here.

Photos I took of the Chicago Iranian Election rally at Federal Plaza can be found here.

Ineffective Marketing?

Ineffective Advertising #1

WHY?

3 Comments Category: Chicago

Freeways in Illinois

No Comments Category: Chicago

Mosso’s Cloud Servers + Cloud Files = Solid Image Processing Farm.

As CTO of Pathfinder Media (a startup with no other dev resources than myself), I have the pleasure of designing, developing, administering, and scaling every single insignificant (or life saving) feature/enhancement/bugfix ever to cross my desk. While it’s definitely awesome to be able to maintain that level of oversight, it can get … well, fairly involving.

Example: One of Pathfinder’s portfolio sites, CentSports.com, is seeing a massive redesign. One seemingly minor part of the redesign is allowing a user to upload an avatar. Yep, that’s it. Upload an avatar. I’m writing a blog post about uploading images, get over it.

Why does this matter? Basically, the sheer scale of things. Lets say CentSports has 500,000 users, and each avatar averages at about 20kB. That comes to just under 10GB worth of images, and even more if we decide to resize the image multiple times. Now, lets say 150,000 of those users visit the site daily, visit their and four buddies’ profiles, and for some reason have a broken cache (unlikely, yes, but roll with it). That would end up being around 440GB of monthly bandwidth. Which really isn’t a big deal, if you have the infrastructure to process them, serve them out, back them up, etc etc. That comes to my next point:

Right now, CentSports has a few solid webservers. They fare decently during peak hours, but are only tuned for the type of traffic currently being served, with not too much breathing room. That being said, keep in mind that image resizing is not a cheap process. Using PHP+gd, If you upload a large (4000×6000) image and downsample to something as small as 200×300, you could see your process’s RAM usage peak to 40-50MB (per image). That’s pretty steep. Plus, we’ve noticed that during most feature rollouts, those new features tend to get a solid beating immediately after unveiling. The thought of a tens of thousands of stampeding image resize requests going through my regular web servers all at once is pretty scary (and something to keep in mind while designing a solution).

Cloud, Come Hither!

I’ve been looking for a good excuse to put Mosso’s CloudFiles CDN to the test for a few months now, and here happens to be a perfect (cpu-bound) task to take advantage of todays latest cloud computing offering. So, today, in a matter of hours (I actually spent more time compiling than engineering), I whipped up a simple, but potentially robust-as-hell solution to my problems. Here’s what you do:

  1. Get a Cloud Files account.
  2. Get a Cloud Server. Start small, for testing.
  3. Set up Apache + PHP (with curl and libgd) on your new Cloud Server.
  4. Create an upload form on your Cloud Server, and in the capture stage implement your resizing functions as well as the Cloud Files API to push the images into Cloud Files CDN. Q&D Example:
    <?php
    ...
    //"new" filename and location of the image you just uploaded. Probably coming from $_FILES.
    $filename = 'existing_file.jpg';
    $file_location = 'images/'.$filename;

    $auth = new CF_Authentication($cf_user, $cf_api); //set up CF auth obj, with your username and API key
    $auth->authenticate(); //validate into CF

    $conn = new CF_Connection($auth); //connect to CF
    $images = $conn->get_container(’images’); //Get and use the ‘images’ container.

    $put_image = $images->create_object($filename); //create the object in CF. The file’s path name will be $filename
    $put_image->load_from_filename($file_location); //insert the contents of $file_location into the new object you just created

    echo $put_image->public_uri(); //returns the URL of the new $filename object. Useful for storage later
    ?>

  5. Make your app aware of the new image servers. The nice thing about this, is that if you create multiple (read: as many as you want) server instances and have the same logic across all, you can easily track which servers are the busiest, and your app can effectively direct traffic to each leaf on its own. Very cheap load balancing. Update: you can create new instances from backup images, which should make it much easier to replicate server (be careful when using ip-based configs).
  6. Finally: go get a drink. Since both your instances and your data within the CDN are backed up and replicated, you have less maintenance to worry about it. Note: I didn’t say no maintenance. At the end of the day, service providers can’t be trusted to be perfect, and it’s still your responsibility as Administrator to maintain off-site backups and remote+hot failover. But that’s a discussion for another day.

Off Topic rant: all of this is moot if you can’t get your UI to play nice. Man, how I hate cross-host scripting.

CTA Digital Signage

Got dinner with Jason Rexillius of HostedLabs and Harper Reed of Threadless at Rezas. Let me tell you something: If you’ve never had persian food, you’re seriously missing out.

Persian food is GREAT.

Anyway. Reza’s is on Clark – one of the main routes for the local CTA busses. It’s also on the east side, which means if you’re sitting next to the window, you get a full view of everything going on outside. This includes the new LED-based digital signage on the right side of these busses. And man, let me tell you – these things are BRIGHT. So bright, we were actually looking away. That can’t be effective advertising, can it? I’m sure it’s less harsh in the day, but seriously, what was the CTA thinking?

I’ll try to grab a real pic tonight. See original article here.

Bright enough, eh?

Bright enough, eh?

3 Comments Category: Chicago

Hello There/Foocamp East

Hello There.
My name is Wilfried Schobeiri. I’m a software architect and entrepreneur, and until recently, gave up on blogging, networking, and playing the game altogether. This has changed.

Why am I blogging?

Long story. This past weekend, I went to the first annual Foocamp East, in Boston. For those of you unfamiliar with Foocamp, it’s an unconference where ~150 of emerging technology’s smartest, most interesting, most relevant people come together to connect, discuss, and share in the interest of contributing to the greater good. It was great being around so many intelligent people; the potential in the connections being made at the event were dizzying. Foo East reignited passions in me I long sold out as naivete: I love trying to solve big problems, and I love working on things that matter.

I arrived today in Chicago in a state of calm unlike anything I’d ever expect, especially considering the 100+ hour workweek behind me and the challenges and deadlines of this coming week. Maybe I’ve finally encountered that crowd that deserves respect for it’s innovation yet is more interested in pushing forward than taking time out for accolades? Or perhaps it’s because these people were truly passionate in their work? They weren’t just leaders because they were smart and effective, but because they love what they’re doing and have made it their life. My mind hasn’t been exercised in such a way in probably over a decade; I think I’ve finally found the crowd that I feel most comfortable in.

Again, Why am I blogging?

Well, I’ve been bitten. The desire to make a difference has become overwhelming. I want to help. I want to do my part. Expect writeups of challenges, project, life, and travels.

Things learned

  • Work on things that matter. Work on things you enjoy working on. Hopefully these go hand in hand.
  • Use your brain. Exercise it. Be around people smarter and more experienced than you, but also pour into others. Grow with others, don’t try to grow yourself. I’ve been very bad about this.
  • Get excited! Be passionate! It’s important to be excited about what you’re doing. Fervor and passion result in quality results, traction, and a stronger following. People can always tell if you care about what you’re doing.
  • Network. No one’s going to take you seriously if they don’t know who you are. In the same vain, be sociable – specially if you’re not an extrovert. This will help you grow.

What a hasty writeup. Have much sleep to catch up on. See you soon.

1 Comment Category: 2.0, travel
Search for specific content:
Browse content by category:

Recent Photos

View full collection on Flickr.

Iran Rally, 6/20 @ Daley Plaza, Chicago
Iran Rally, 6/20 @ Daley Plaza, Chicago