Latest Ramblings

Developer Ignite Phoenix: Real World Cryptography

Our lead developer and resident technical genius, Chris Chandler gave a presentation called "Real World Cryptography" at Developer Ignite #1 in Phoenix back in July. We recently found out Intel has made the videos available, so please enjoy. (Real World Cryptography starts 7 minutes in) Let us know your thoughts on this talk in the comments below.

Desert Code Camp Followup

Thanks to everyone who attended the two sessions taught by Chris at Desert Code Camp! We hope that you had a great time and learned a lot. I know we did! As promised, here are the slides from the Understanding Functional Programming session:

If you have any questions or comments, please send Chris an email; he loves to explore and discuss technology. What topic(s) would you like to see next time?

Desert Code Camp

Looks like it's almost time for Desert Code Camp again! What is this event, you ask? From their site:

"Code Camps have been taking place all over the country. This is a free, one-day event put on by the local Phoenix community to help promote software development in general. There is no right or wrong language, platform, or technology. If a topic relates in any way to the code that causes a machine to produce a desired result, it's welcome here."
This year it will be held at the DeVry University Phoenix Campus and is once again being organized by Lorin Thwaits. Flatterline will be teaching two sessions this year in the 21st Century Software Development track: Developing with CouchDB and Understanding functional programming. The schedule became available today, so if you haven't registered do so now and build your schedule for Saturday. It looks like there are a lot of great sessions this year and we can't wait to learn from all of our colleagues. See you there!

2009-04-30: Recap of Phoenix OpenCoffee Club

Photo by tonx.

Photo by tonx.

We had a great turnout for the first Phoenix OpenCoffee Club, which took place April 30th at Fair Trade Cafe. About a dozen people, both entrepreneurs and investors, attended and spent several hours getting to know each other over some great coffee.

We heard at least 6 ideas pitched and discussed during the 2 hours we were there. The assembled group wasn't shy about asking questions and raising concerns of the entrepreneurs pitching their ideas either. I know everyone appreciated hearing the perspectives of entrepreneurs and investors alike. We hope everyone who attended found the meetup engaging and useful. We sure did!

Special thanks to Fair Trade Cafe for allowing us to host our event there. The May 7th Phoenix OpenCoffee Club will be held at Hob Nobs Coffee House. We'll try to have OpenCoffee Club every Thursday, so it's not a big deal if there are times you can't make it. Hope to see you there!

Optimizing hardware costs for Amazon EC2

Cloud

A happy application in the cloud. Photo by Timothy K. Hamilton.

Flatterline believes heavily in the power of cloud computing. Dynamically allocated hardware on a pay-for-what-you-need basis has tremendous advantages when it comes to helping clients manage and provision their clusters. The main advantage of cloud computing is dynamically growing, or shrinking, hardware as the needs of the application change.

Because of the dynamic nature of cloud computing, we don't need a guaranteed answer on hardware requirements up front. However, a client may want a ballpark figure in order to set aside the right amount of budget or let investors know the estimated operational cost. You could crunch the numbers yourself, but why would you do that when we've already automated the process for you?

Determining optimal cost

We've constructed a very basic model for minimizing the cost of Amazon EC2 hardware resources which satisfies a minimum number of EC2 Compute Units and a given amount of RAM per process. The technique uses linear programming and the GNU linear programming kit (GLPK)Note: I'm a math geek that likes linear modeling, so if you're unfamiliar with either, I'd be happy to chat with you about them over lunch.

Installation

First, install the GLPK. On Ubuntu execute the command

sudo aptitude install glpk
on Mac OS X execute the command
sudo port install glpk
Next, download the following gist as cloud_cost.txt.

Computing the cost

The model requires the specification of two variables: total number of EC2 Compute Units and RAM. Both variables are specified at the bottom with param unitsNeeded and param ramRequiredPerAppInstance respectively. Change these params to reflect your particular situation. Note: A future article will explore capacity planning in more detail.

When you're ready, execute the solver using the following command:

glpsol --model cloud_cost.txt --output result.txt

Analyzing the results

The program generates the result into a file called result.txt. Assuming 500 EC2 Compute Units with 125MB of RAM per process, the file will look something like the following:

Problem:    cloud_cost
Rows:       7
Columns:    5 (5 integer, 0 binary)
Non-zeros:  15
Status:     INTEGER OPTIMAL
Objective:  cost = 14400 (MINimum)

 1 InstanceQuantity[Small]
                    *              0             0
 2 InstanceQuantity[Large]
                    *              0             0
 3 InstanceQuantity[XLarge]
                    *              0             0
 4 InstanceQuantity[HCPULarge]
                    *              0             0
 5 InstanceQuantity[HCPUXLarge]
                    *             25             0

The objective function was cost, so the optimal arrangement of hardware needed to get that computational power costs $14,400/month. The second column of the hardware arrangement indicates the number of instance needed. In this case we need 25 high-CPU, extra large instances.

Did you find this useful? Let us know in the comments!

Phoenix OpenCoffee Club

occ_logo

At Flatterline, our stated mission is to help startups realize their vision. To that end, we've decided to help bring OpenCoffee Club to Phoenix.

What is OpenCoffee Club?

OpenCoffee Club is a weekly gathering of entrepreneurs and investors in an informal setting (a.k.a, a coffee shop). The goal is to bring these entrepreneurs and investors together to talk about projects, collaborate and get to know each other.

It was originally started in London by Saul Klein, a venture partner at Index Ventures. Since then, over 80 OpenCoffee Clubs have sprung up worldwide. You can read more about it on Saul's blog or at ReadWriteWeb.

Why?

On a recent trip to Boulder, CO I attended an OpenCoffee Club facilitated by Jason Mendelson of the Foundry Group. It was really inspiring to see such a vibrant startup community meeting regularly to discuss ideas, share problems, give advice and, most of all, listen to each other.

We believe that Phoenix has a lot of talented, entrepreneurial people. We want them to have the best chance to grow and succeed and this is one small way we see that happening.

The first meetup will be on Thursday, April 30 from 8am - 10am at Fair Trade Coffee. Please let us know you're coming.

In what other ways can we help the Phoenix startup community thrive?

Disposable proxy for secure coffee shop browsing

Amazon Web Services

If you are a highly mobile laptop user, chances are you work out of a lot of varying public locations such as coffee shops, libraries, and just about anywhere that has public wifi. Are you concerned about the privacy of your data? If you're like me, and our clients, you're very concerned. Applications like tcpflow and Wireshark are not only particularly effective at grabbing content from the network, they also happen to be readily available.

Here's a very simple scheme to leverage the inexpensive power of Amazon's EC2 to create a disposable, secure proxy.

Getting started

You will need the following to make this recipe work:

  • Amazon AWS account
  • A Ubuntu-based Amazon AMI with keypair (we are using public ami-7cfd1a15 for this article)
  • An EC2 security group allowing a minimum of port 22 for SSH

To start, launch a small instance of your AMI of choice.  Once again, we prefer Ubuntu so most of this article is going to be Ubuntu-centric.  This instance will need to be setup with whatever key pair you plan on using as well as be placed in the security group that allows SSH access.  If you need help with this the Amazon AWS console is particularly useful.

Putting the pieces together

Once the instance is made available ssh to your newly created instance.

ssh -i identity_file -L 3128:localhost:3128 root@public_ec2_domain_name

The noteworthy addition to the previous line is -L 3128:localhost:3128. This addition to the SSH command will open port 3128 locally and forward all traffic to the remote port 3128 across the open SSH connection.

Once the connection is open you will need to install a proxy, we prefer squid.  Squid can be installed through the following command:

aptitude update
aptitude install squid

The last remaining step is to configure your browser of choice to use proxy localhost:3128.

The final result is all local HTTP traffic will be relayed across local port 3128 across the encrypted SSH tunnel to the 10 cents / hour remote server. From there it will go out to the internet at large away from the prying eyes of nefarious coffee shop patrons. Keep the SSH connection open for as long as you need access to the proxy.

Cleaning up after yourself

When your done at the coffee shop feel free to decommission the AMI instance and you're done. The machine will go away with all records of the proxy's cache.

If you're looking for a solution to more than just your HTTP traffic you have options such as OpenVPN. Look for an article from us soon.

What you don’t know is affecting your performance

Does your Linux-based virtualized hosting feel a little slow? Does it suffer from preemptive swapping? Here's a quick tip on getting some more performance out of your current setup. This is especially useful if you have a significant ratio of physical RAM to in-memory programs.

Swappiness

The Linux 2.6 kernel has a parameter called vm.swappiness that regulates the kernel's likelihood to swap memory to disk (e.g., to free up memory for disk/content caching, load other programs, etc). Valid values are between 0 and 100.  On the current release of Ubuntu (Intrepid) this value has a default value of 60 that you can investigate with the following command:

$ cat /proc/sys/vm/swappiness
60

This value is generally fine, but if your physical memory is significantly higher than what you need it's worth investigating other choices. I personally find a pretty significant performance increase in Rails behavior with a value of 0; essentially telling the kernel to not swap anything out until it becomes absolutely necessary.

The value can be changed either with:

$ sysctl vm.swappiness=0

or

$ echo 0 > /proc/sys/vm/swappiness

A persistent lack of swappiness

If you restart the server, then your change will be lost. If you want the change to remain persistent across restarts you'll either need to create a script that calls one of these commands or edit /etc/sysctl.conf to specify the swappiness. As always, exercise caution playing with kernel parameters :-).

Swapping it back in

If you change vm.swappiness and want to force the kernel to swap everything back in you can temporarily disable the swap partition and then immediately re-enable it.

$ swapon -s

Filename                 Type            Size    Used    Priority
/dev/sda2                partition       524280  33948   -2

$ swapoff /dev/sda2
$ swapon /dev/sda2

If the machine doesn't have enough memory to accommodate the swap-in the command will fail with an error.

Let us know if this helps you out!

Current activity and a thanks to everyone!

Just about everything is finally underway here at Flatterline!  We've finished our first full month of activity and we've been having a blast while we've been doing it. I need to say this to the entire community and everyone we've talked with:

Thank You!  Thank you for the support, the referrals, the chats, and everything else!

In the last month we have been approached by numerous individuals and companies who have been searching for developers.  They all said they were referred to us by people in the community that had favorable past experiences with us or because they have worked with us directly.  I cannot even begin to say what a compliment it is that no sooner did we form a company that people are already being referred to us.

The only downside to all of these referrals is that we simply cannot take on all these clients.  Curtis and I fundamentally believe, and agree, that we are not in any rush to grow or take on more clients than we believe we can handle at any given time.  That being said, we absolutely believe in referring potential clients to people who do have the capacity and availability for more work.  If your a development shop we will happily try and pair you with the awesome clients that we don't have the capacity for right now.

The ultimate goal is a win-win for clients and other developers.  We want our potential clients to know that we value their time and future success, and sometimes that future success means hitting the ground running immediately with other developers in the community.

Return from SXSW and followup

Team Flatterline is now back in Phoenix!

Rather than try to recap the events of the conference, which were too numerous to do any sort of justice, I want to say thanks to all the great people we got to spend time with.  If we got a business card from you then we're going to be in contact.... though it might take a few days while we catch up on the sheer volume.

As pictures and media become available I'll post the links here.  More likely than not I'll get around to creating an account on Tumblr to keep the Flatterline feed a little more active.

SXSW Interactive 2009: Flatterline will be there!

That's right, folks, both Chris Chandler and Curtis Miller will be hitting up SXSW this year in Austin. We arrive Thursday night and leave Tuesday night. Unfortunately, we made our plans when we still worked for someone else, so we tried to minimize time off from work... boo!

Follow Chandler on Twitter Follow Curtis on Twitter

But wait, there's more. We're also going with some awesome people from Phoenix and sharing a loft right on 6th street!

Who's Coming?

Are you going to SXSW? Let us know in the comments and we'll see you there!

In the beginning…

Tomorrow marks the last day of the first full week of Flatterline operations, and let me say it's been awesome.

First and foremost, I would like to thank everyone that's wished us luck on this endeavor!  All the support has really meant a lot to us.  I would also like to thank everyone that has so innocently asked "Dude, why do you still have the default WordPress post up?"  The essential answer is that everything came together so quickly for Curtis and I to put this company together that getting some content up became a secondary-but-still-really-high-priority item.  Which I am now rectifying...

That being said, the weeks ahead are going to be busy.  Amazingly wonderful and deliciously busy.  Next Thursday Curtis and I, along with several other cohorts, will be trekking out to Texas for SXSW.  We plan on spending some time to really get the name out there, so if you're going please help spread the word to your entrepreneur friends (more on why we're focusing on this segment to come!).  We're also going to be looking to make this page a little more "custom".  Sure, it's a nice theme but it would benefit from a logo (which we don't have) and some more style (which we have, but not in CSS form).

Personality Flatline has taken a temporary hiatus while we are getting everything in motion, but rest assured the content on my harddrive that was recorded mid-December is still both salient and awesome.  If we do it right, all the references to "the holidays" will seamlessly sound like Easter.

The Team: Chris Chandler & Curtis Miller (Learn Mroe About Us)