Blog  
 
  Lextech Blog  

Recent Articles

Making Money
With Technology
Systems
Engineering

Lextech

Tech News

Archive for the ‘Systems Engineering’ Category

Are people reading what you write (without asking)? Part 1

by: David

Wednesday, July 2nd, 2008

When connecting to remote systems, it’s often easy to overlook a very simple fact;  many methods of communication are not protected in any way, shape, or form.  Even as you read this post, the data is being sent in cleartext and anyone with the desire to watch over your shoulder, can.  Data is the foundation of the internet and businesses in general, and not all of it is a big deal if someone else gets it.  However, there is a lot of information that should be protected, and there are a lot of ways to protect it.

First, a common example and, hopefully, some answers.  Let’s start with probably the #1 offender: Instant Messaging.  IMs have exploded on the internet in the last few years as a great, simple way for people to talk (ok, type) to each other.  Here is the problem.  Odds are very good that your message to your wife with your account information for the bank website was sent in the clear because you aren’t using any encryption.  Yes, most IM technology has no concept of secure communication at all, so everything you type is like talking on a party line; anyone that’s listening can hear it, too.  

Now, depending on what IM system you are using (AIM, Yahoo!, MSN, etc), there are different ways to deal with this one.  Some of them may have an encryption option built in, which is a lot more rare than it should be.  Because of this, there are some third-party IM client solutions.  One of the more popular IM clients is pidgin. Not only does it allow for multiple messaging protocols (because you can’t get all your friends to use the same one), but it’s available for most Operating Systems, and has more than one encryption option available as a plugin.  If you primarily use AIM, then the OTR plugin is probably what you want.  Adium (the MacOS native IM client based on the pidgin libraries), has OTR built in.  The pidgin-encryption plugin is another option that has been around almost as long as pidgin.

Unfortunately, this is just one of many potential examples/solutions.  Do a little research into whether or not your favorite IM client or protocol has any way to encrypt your messages.  The real point is just to be aware that what you are sending is probably vulnerable, so don’t send anything that you deem to be important without setting something up first.  

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Why I Hate Your Website

by: Nate

Friday, June 27th, 2008

I can’t think of any nice way to put this, so I’m just gonna say it: I really hate your website. Looking at it makes my eyeballs bleed. The pain and suffering that it inflicts upon the world has caused me to question my belief in a benevolent God. I just finished writing a letter to the Hague requesting that the creation of your website be prosecuted as a war crime.

Among its many grievous crimes:

Flash
You did the entire site in Flash. In addition to making everything much slower, this also completely defeats the mechanism of open standards that has made the Web such a success. Now I have absolutely no control over my browsing experience at your site. Also, I can’t view it on my iPhone. I can’t bookmark the only page on your site that I’m actually interested in. And if I happen to have special accessibility needs, I can’t use your site at all. Why do you hate freedom so much? What do you have against disabled people?

Unconscionable Use of PDFs
Look, PDFs exist for a very specific purpose. They are to be used when you need to give someone a perfect replica of a printed document, for instance a sales brochure. I should not have to download a PDF just to read your FAQs.

Non-Standard Navigation
Maybe you don’t understand the purpose of site navigation controls. They allow you to quickly and easily navigate the site. I know you think that the ones you made that pop out of a little button halfway down the page are really ‘creative’ and ‘innovative’, but I shouldn’t need navigational assistance to find your navigation controls. These controls should be in a bar across the top of the screen, or in a bar down the left side. I’m even willing to overlook some extras along the bottom of the page, as long as they are discrete. But the navigation controls should always be visible; they should never hide themselves.

Printing Problems
I don’t even know how you managed to do this, but your site doesn’t print correctly. Maybe you have some horrible and convoluted CSS that causes it. The important page on your site comes out to three printed pages. Of course, all of the stuff I care about is on the first page. The other pages are just junk that your lawyers made you tack on the bottom. So I tell my browser to just print the first page. What do I get? Your logo and top navigation bar. Nothing else. The only information on your entire site that I actually wanted has just disappeared into the void.

Browser Dependence
You may not be aware of this, but there are web browsers other than Internet Explorer. Nearly half the world doesn’t use IE, and I happen to be one of that group. Why doesn’t your site work properly in my browser? Why are you restricting your site to only people that use a Microsoft-brand browser (which, by the way, means it’s also restricted to only people that use Windows)?

Automatic Videos
So I go to your website, for whatever reason people go there, and some video starts automatically playing. Not only does it slow everything down, distract me, annoy me, and take up valuable screen real estate, it also has sound. Now your your stupid video is screaming in my quiet office and everyone is looking at me. Congratulations, you have created the commercial equivalent of a MySpace page.

Slow Ad Servers
You know, it’s annoying enough that I have to look at ads on your site at all. But when I click on a link, and the page starts to load, and then it stalls before it’s even a quarter done, and I look down at my status bar and see “Waiting for ads.doubleclick.com”, that’s really infuriating.

Because of you, somewhere, a Care Bear is weeping.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

How the iPhone Changed Mobile App Development

by: Alex

Thursday, June 26th, 2008

Apple’s iPhone has radically changed the mobile applications landscape by opening up mobile application development to any web development firm using Web 2.0 standard technology.  No longer is a specialized team who know the intricacies of proprietary cell phone software development necessary.  This allows much faster development of mobile apps and also removes the dependency on a mobile carrier to approve software on their wireless network. And with the 3G iPhone coming soon, web apps will be even faster than the current versions.

What is Web 2.0?

Web 2.0 is the term commonly used to describe a new generation of web technologies and their focus on interactivity and data collaboration.  The core technology is typically AJAX (javascript in a web browser which talks back to the web server), which provides the snazzy functionality in sites like Google maps.  This new level of interactivity in a web page also usually includes providing the user access to different types of data at the same time (merging functionality from different web sites together in a single place).

Any Web Developer Can Do It…

Using web technologies to build connected apps has proven to be more efficient than using traditional mobile technologies. Mobile applications today are typically developed in J2ME (Java for phones), Brew or .Net, depending on what the target phone(s) support.  These technologies provide a standard but often require phone specific tweaks as not all phones behave the same way.  Usually this meant that a development team built up a special library over time that handled the quirks and work arounds for various phones.

Using Web 2.0 technologies means that nearly any capable web developer with any technology skill set (Java, Open Source, Microsoft, etc.) can now create mobile applications. It also means that existing applications can have new ‘skins’ applied to them to allow already developed functionality to be rolled out in a mobile environment.

All this boils down to it being much faster to build a connected app using web technologies than with traditional mobile technologies.

For example, during a recent Lextech training session, a small team developed a web app that pulled news headlines from the Tribune, created an audio file with the converted text to speech and sent it to the iPhone. With only about 4 hours of development work, the iPhone read news headlines aloud to the user.

Power to the People

With the mobile Web 2.0 revolution, wireless carriers are no longer the gate keepers controlling what applications users can access.  The mobile user merely points their web browser to the correct place and away they go.  This also simplifies the often nightmarish aspects of rolling out and updating applications that live inside of cell phones.  Now an update to the main server updates the mobile application for everyone.

Companies Already on Board

Many leading online firms are already creating iPhone specific versions of their applications to better serve existing customers and tap into the growing market of mobile app demanding consumers. Google, Facebook and LinkedIn have already rolled out versions of their applications dedicated to iPhone users. 

The Future…

The iPhone is merely the first in what will be a wave of Web 2.0 standards capable mobile devices in the market.  This mobile revolution will rapidly accelerate new kinds of applications we’ve never seen before and allow deeper interactivity while we’re physically anywhere.

 

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Ubuntu - My Favorite Linux Distro

by: Jeff

Monday, June 23rd, 2008

I’ve been tinkering around with Canonical’s Ubuntu (Oo - boon - too) since the first release 4.10 “Warty Warthog” all the way up to their latest release 8.04 “Hardy Heron.” Since then I’ve flirted with other distributions, but I always end up back with Ubuntu for several reasons. The top three are as follows:

1. Nice package management and abundant repositories. 

Ubuntu uses APT, which means getting thousands of applications is as easy as a simple apt-get from the shell, or for GUI lovers, there are nice options for any desktop environment you choose. Adding support for multimedia codes and proprietary hardware is a snap as well, it will prompt you if it detects you need it and ask you if you would like to install support for it.

2. Consistency and reliability.

I’ve only really gotten burned once with a bad Ubuntu update, which was resolved immediately (xorg.config bombed, not good). In my experience, other distributions that offer the breadth of software and updates that Ubuntu does typically break and require a lot of forum searching and manual tweaks to fix. Which is about the time I say screw it and reinstall Ubuntu.

3. Excellent community.

Be it forums, IRC, or user groups - Ubuntu has a great following and a lot of good people willing to help you out with any issues.

So, I guess I could wrap things up by saying Ubuntu is easy to work with and provides me the least amount of headaches of any Linux distribution. I can get up and running quickly with out the stupid little things breaking like they do on a lot of distributions while maintaining the freedom to pop under the hood and be a nerd with it too, because after all it is Linux!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Build a System With ZERO Infrastructure Investment

by: Alex

Wednesday, June 18th, 2008

Web based systems typically require an investment in hardware, hosting and management to get them off the ground once they’re beyond a prototype. That is starting to change with things like Google’s App Engine being released.

The Google App Engine allows developers to create applications using Google’s framework, test them locally and then upload the applications into the Google virtual computing cloud (the same cloud infrastructure powering Google’s own applications). It provides integration capabilities with Google’s applications, build in online storage and a variety of other features to speed up launching an application.

While this sounds like the silver bullet of web apps, there are a number of reasons some companies won’t be using it.

First off, building a SaaS (software as a service) system that you’d like to make money with may not be possible (Google user account management is included but the capability to charge users and restrict access is not yet). Second applications are limited to specific technologies (they must be written in Python). This will make repurposing existing applications much more difficult and Python may not be the language of choice for most developers.

Google’s App Engine is a great first step into making systems scalability a simple infrastructure issue that developers can ignore but it will need to evolve to be deeply useful to most organizations.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Activity Monitor: A Private Eye To Shadow Your Unfaithful Applications

by: Nate

Friday, June 13th, 2008

I thought we had a good thing going; I thought we could trust each other. I wouldn’t play with her heart, and she wouldn’t let me down. We seemed to be in a stable, long-term relationship. Then she just stopped trying and completely locked me out. I couldn’t figure out why her behavior just changed overnight, and I didn’t know what else to do. So I had someone follow her, to find out what was really going on.

While I would never hire some sneaky character to follow a person, I have no such qualms about having something stalk a misbehaving application. A problem came up with a Mac program that I had written in C. It would run great for a while, and then after some random number of days or weeks it would simply stop producing output. Not only would it apparently stop doing anything, it would also use all available CPU cycles. It was furiously doing nothing.

It was difficult to debug, since I couldn’t really set breakpoints to try to catch something that might not happen for weeks. And there didn’t seem to be a way to just break into the current instruction, like I am used to doing in embedded programming.

Lucky for me, my boss Alex happened to notice an interesting function of the Activity Monitor while experimenting on his Mac. Though I had used that utility before, I had completely overlooked the intriguing button at the top labeled “Sample Process”. Using this understated gem, you can select any running process on your machine and take a peak at what it’s doing with its time. There are a few different ways to have the information displayed, but I found the most useful to be “Percent of Thread”.

What I did was take a sample of my application while it was running normally, to get a baseline. There wasn’t anything too surprising in there; CPU usage seemed to be widely distributed among a variety of function calls. Then I sat back and waited for it to lock up, as I knew it eventually would.

So a few weeks later the application became unresponsive again. I took a new sample and what do you know? There was one function call that was using 99.7% of the CPU cycles. It turns out that there was a problem with the hardware drivers I was using. They would get in a bad state in which a particular asynchronous process would never complete. The interface was such that I had to poll to check if the process had completed. It was never completing and I was polling as fast as I could, which maxed out the CPU usage. Long story short, it was a recoverable problem and I just had to put in a timeout to give up waiting after a reasonable amount of time.

If you think your application is running around behind your back, sample it and find out what’s really going on.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Car Geekin: Mac Mini in a Nissan 300zx, part 2 — Install Day

by: Alex

Monday, June 9th, 2008

Previous step — Getting started in part 1

Install day. Pull the car in from the 20 degree November day to the garage with the big space heater going. Numb hands and warming surfaces with a heat gun to make them pliable or to get adhesives to actually stick definitely slows things a bit.

Disassembly is the first step. We (the dynamic duo of my Dad and myself — he’s the automotive and analog electrical expert while the digital side is my domain) pull out the center console & radio, pull the spare and pop panels as we route wires. Next comes building out the cozy, safe and secure home for the mac mini. To help with the vibrations in the car we’ve placed two 1/2 inch layers of sorbathane foam padding (expensive stuff but well worth it) under the mini (cut just smaller than the mini’s base so the air intakes can still pull air in). This stuff is amazing at damping vibrations. The car had a hard styrofoam case already in place previously so we drilled out access and air holes in that and then built out supports around the mini using the blue foam padding you see in the pictures. We made sure to allow air channels to flow around all sides and out into the trunk through the styrofoam.

After the mini is secure we finagle the power, audio and USB wiring under the back seat, under the driver’s side door frame and around under the dash. The power supply is then attached to the base of the trunk and the rest of the wiring tested out and cleaned up. Lots of heat shrink tubing goes in place to make sure there’s no chance of disconnects or shorts.

  

Now comes the time I’ve been waiting for — connecting the audio and touchscreen. First the AUX audio cabling and switch goes into the back of the Bose system. We then plug in the VGA and USB to the screen and fire everything up (yes, we’ve routed cables for both that are about 20′ long including a distance extender for the USB to make sure there aren’t any signal drops). After some rechecking of settings on the power supply it all comes to life.

Now back to the Xenarc 7″ touchscreen I mentioned before. It works really well — it’s just large. It’s about an inch think and has a good sized bezel around the outside. Rather than completely chopping up the console to fit it in we decide to attach it to the front of the console for this initial version. I think a smaller screen will be a better fit in the future.

Finally everything gets buttoned up again, tested and re-tested. It’s working and I can drive the audio from the mini through the car audio system. Version 1.0 is a success.

Next, it’s on to the development of a simple GUI that is a whole lot easier to use than selecting things in iTunes using a touchscreen.

Next step — Touchscreen GUI software in part3

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Debug CakePHP in Eclipse - Bake Cakes Not Brownies

by: Jeff

Thursday, June 5th, 2008

Having developed several CakePHP projects in Eclipse, I’ve always been on the lookout for things to make my life easier. Not too long ago I stumbled across an addition to Eclipse’s PHP Development Tools (PDT), which integrates the Zend/Xdebug debuggers into the Eclipse environment. The ZendDebugger binaries are available for OS X, Linux and Windows platforms at Zend’s website http://www.zend.com/en/community/pdt.

Also on this page, you may also find an all-in-one bundle for Eclipse that has everything you need to get started. Once the debugger is loaded in PHP and your web server has been restarted, you can open Eclipses debug dialog and create a new PHP Web Page profile.

First configure the “PHP Server” section to point to the development server your project exists on. Then set /<project name>/app/webroot/index.php for the “File” section of the PHP server debug dialog as well as http://<host name>/ , index.php respectively for the two entry boxes of the “URL” section. On the advanced tab select “Debug All Pages” and the debugger will now recognize any breakpoints in all .php files in your project!

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

VLC: Really Frustrating Real-Time Video

by: Nate

Wednesday, June 4th, 2008

So here is a problem we’ve run up against several times: displaying live, streaming video in real-time. Doesn’t sound that hard, but you’d be amazed. We are generally dealing with RTSP streams, which both QuickTime and RealPlayer handle just fine - for pre-recorded content. But I’ll tell you what, no matter how many preferences you enable with names like “Instant-On”, “PlayNow”, and “TrueLive”, these players will continue to suck for real-time video.

Despite those useful sounding options, both QuickTime and RealPlayer will always insist on buffering at least 3 seconds of video. And that’s fine for your standard video clip fare. But if you are trying to use the video feed to steer a device in real-time, a 3 second delay might as well be 3 minutes.

That’s why I was so delighted to find VLC. Then I was frustrated. Then I was really frustrated. And finally I was delighted again. To understand the emotional roller coaster I experienced, you’ll need to know a bit more about VLC.

VLC is an open source media player. Like a lot of open source software, it’s incredibly powerful. And like a lot of open source software, it’s incredibly difficult to use. I guess I should qualify that: if you just want to open a GUI and play a video file, it’s fairly simple. On the other hand, if you want to harness the awesome power that sets it apart from other players, it’s obscure and almost completely undocumented.

Fortunately you don’t have to endure the emotional highs and lows that I did, since I’ll just tell you what I figured out. For real-time RTSP streams, the option we are interested in is “rtsp-caching”. It takes an argument in milliseconds, and we’ve been able to set the value as low as 100 and still get reliable feeds on a LAN. Setting this via the GUI is not too difficult; it’s found in the preferences under Input/Codecs -> Access modules -> Real RTSP. You can also set it via the command line by appending the option “–rtsp-caching value“.

But by far the most obscure way to set it (and for us, the most useful) is via JavaScript. Among its many other wonders, VLC is also available as a browser plugin. This allows you to embed in a webpage anything that VLC knows how to play. First, you must add the necessary HTML:

<embed type="application/x-vlc-plugin"
    pluginspage="http://www.videolan.org"
    version="VideoLAN.VLCPlugin.2"
    width="352"
    height="288"
    loop="no"
    id="vlc"
</embed>

Note that you could also set the URL of the video to display in that HTML, but that will not work for our purposes. There is no way to set any of VLC’s funky options via HTML. Instead, you use JavaScript to set the URL after the page has loaded:

var options = new Array(":rtsp-caching=100");
var elem = document.getElementById("vlc");
elem.playlist.add("rtsp://some.url.com/video.sdp", "live", options);
elem.playlist.play();

There you have it: “really” real-time video embedded in a webpage. And you can save your manic-depressive tendencies for things that are really important, like the new iPhone SDK.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

How To Avoid A Messy Break Up With Your Data Center, Part 2

by: Jim

Tuesday, June 3rd, 2008

Our data center move checklist had 3 major parts - what to do before the move, what to do a short time before and at the time of the move, and how to validate that everything was up and running correctly. The advance portion of it included things like notifying customers of the planned downtime, figuring out who’s DNS was where so it could be properly modified at the time of the move, and quite a few others.

One item caught in advance using this checklist, for example, was that our own network-accessible power strips (for remote rebooting, etc) had the wrong kind of plug to interface with the data center’s power distribution setup - we needed to get adapters. This is an example of one of those things you definitely want to know in advance so you’re not standing in the data center late at night with no way to power your gear.

The “during” portion had a complete checklist for both the tear down at the old location and the build out at the new one. It was ordered sequentially, with the idea of maximum speed in mind while preserving systems integrity. The tear down portion involved readdressing and clean shutdowns of each machine in the correct order, followed by removing equipment from the racks and shuttling them out to waiting transportation, followed by cleanup of cables, etc.

The build out portion had the order listed out to bring the systems back online as quickly as possible, and designated specific portions of it to individuals, ideally timed so that as machines were mounted and cabled they could quickly be turned back on and checked.

Once the build out was finished the final part of the checklist was run through, and we made sure each service was back online. Once finished, it was time to clean up and go home. There was some more follow up work in that part of the checklist that was planned for the next day, and was taken care of then. The first move had a team of 2; the second move expanded up to a team of 4. A good rule of thumb in this situation seemed to be correct - more than two people per rack is probably too many. The second move, with twice as much equipment took about twice as long as the first, so in our case it scaled pretty linearly.

The data center we chose has been performing spectacularly since our last move. We haven’t had any downtime, support has been excellent, and the security arrangements and access policies allow us to get in to work whenever we wish. As we’ve added new racks they quickly take care of their end and make sure they can meet our future needs. The moves may have been a little painful, but we’re happy knowing that we shouldn’t have to do it again.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

You are the Weakest Link

by: David

Thursday, May 29th, 2008

One of the things that constantly comes up when you start taking the security of your computer systems seriously is the simple fact that your users are the weakest part of any security policy. You can spend all day working out intrusion detection systems, firewalls, nearly impossible to crack passwords, and doors with five levels of authentication, but when your security guard holds the door open for the pizza guy, you have a problem.

This is a type of hacking called “Social Engineering” and it can undermine all your work in a hurry. In general, people are trained from birth to be helpful and trusting, and hackers are going to take advantage of that. It ranges from the guy that tailgates behind an employee, to the admin that has the administrative password on a stickie under the keyboard because the password is too hard to remember. It also includes seemingly innocuous questions about the company or that innocent “I forgot my password” problem that a “user” calling the helpdesk is having.

So the real question is; How do you protect your company against a social engineering attack? In one word, Education. You need to make sure that your employees are properly educated in how to recognize and deal with social engineering attempts. For example, with physical security problems like tailgating, make sure they understand that holding the door for someone is not an option. They may even know the person, but what if the attacker is an ex-employee and they didn’t know?

At the end of the day, just remember that proper training and education of your employees will do wonders for your company’s security posture. It is also one of the most important aspects of security that gets left behind. Remember, most employees aren’t trained to worry about “Security” and think that it is someone else’s job. It’s your job to make sure that they think otherwise.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Car Geekin: Mac Mini in a Nissan 300zx, part 1

by: Alex

Thursday, May 22nd, 2008

One of the great things about working with really interesting systems for our clients is the inspiration it can give for those personal side projects. After working on a touch screen application for one client I had the thought to mount one in my car (a 1996 Nissan 300zx) and drive it with one of Apple’s Mac Mini computers (being older, the car doesn’t have a CD player so it made sense to skip a few generations and go fully digital). After some research online there were a few folks who had successfully integrated the mini into their car’s systems but no one had taken the functionality to where I’m envisioning. This series of articles will cover the research, install and evolution of my in car computer system.

Of course it has to handle the audio system (using iTunes for the music library and playback) but I’m thinking about slightly more advanced applications as well. Additional features I’d like to implement are checking email using a broadband wireless card and then having the system read any new messages to me while driving. GPS integration with a simple positioning device can then be linked to something like Google Maps for live traffic conditions. And with an always on internet connection the car can do all sorts of data collection such as sending video streams from in car cameras, providing a great test bed for some of the video streaming projects we’re doing in the office.

To get started, I dove in to the systems others had put together to see the components that seemed to work well and those to avoid.

The key components boiled down to:

Following the same process we would for any fancy military system, the next step was creating a system diagram to show all the wiring points, approximate cable lengths and power requirements. It looked like the best mounting setup was to put the mini and power supply in the trunk and run cables for everything else back to the front of the car. I was able to purchase a copy of the service manual for the car which helped immensely in finding the right points to tap. Using the diagram as the master plan, I purchased the components and hooked everything up on a workbench to make sure I was happy with how it all functioned prior to installation. Not wanting to run the auxiliary device power output from the CarNetix supply all the way back up to the front of the car I opted for a simple unpowered USB hub in the dash rather than a powered unit that would need to be switched on and off.

So everything was planned out and tested. Next step — Install Day in part 2.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

How To Avoid A Messy Break Up With Your Data Center, Part 1

by: Jim

Wednesday, May 21st, 2008

The decision to move your IT infrastructure from one data center to another is not one that ever should be taken lightly. There can be a considerable investment in planning time and personnel, and there is usually some downtime unless you have purchased twice as much equipment as is needed to do a live cutover. However, by planning it well you can minimize the negative factors and make the transition painless.

We ended up needing to move data centers twice in one year, and our planning made both moves go as smoothly as possible. Our first move was made necessary because of the data center’s policies. Some of these policies (which I won’t get into here) made it difficult or impossible to get our work done. After researching other nearby data centers we moved to a new one, but within a few months it was obvious this data center wasn’t meeting our needs. Although we didn’t want to move again we didn’t really have a choice.

At the time of our first move we had 1 rack of equipment, which had both a mix of our servers and network gear and customer equipment. The services included email, web servers, terminal services, and others, and needed to be up as close to 100% as possible. By the time we moved again we had expanded to two racks, and had started allotting serious downtime from periodic network failures that the data center support personnel could not identify or clear up. As time went on the situation became intolerable and required the second move. In both moves we planned well in advance.

The key item during planning was building a comprehensive checklist. This checklist included every possible aspect of the move that I could think of, from planning our address allocations and usage, notifying customers, dealing with DNS, and quite a few others. I’ve found that in dealing with large, complex tasks (such as moving to a new data center) a growing checklist, planned out in order, helps keep you on track, makes sure you don’t miss anything, and, when you’re moving servers and readdressing at 3:00 AM and incredibly tired, keeps you from losing track of what you have and haven’t already done and helps you avoid making serious mistakes. Next time I’ll get into what we put into the checklist.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Eclipsing Xcode for Mac Development

by: Nate

Friday, May 16th, 2008

Apple has a (well-earned) reputation for creating products that are simply a pleasure to use. The iPhone springs to mind as a crowning achievement in this regard. But man, do I ever hate Xcode.

Nothing is where I expect it to be. I can’t seem to close a window I don’t want without closing the whole project. When I try to debug an application, I can’t get the present value of variables in all levels of the stack trace.

I’m willing to consider the possibility that it works great, and I’m just doing it wrong. Maybe it’s just the inertia of being comfortable with my current IDE. But in any event, when I found myself needing to write and compile a C application using OSX libraries, I let out a bit of a groan.

Imagine my relief when I finally figured out how make Eclipse see the OSX libraries. All you have to do is add an entry to Project Properties-> C/C++ Build-> Settings-> Tool Settings-> MacOS X C Linker-> Miscellaneous-> Linker flags. For each framework you want to use, just add:

-framework framework_name

For instance, after adding:

-framework QuickTime

I was able to use the Quicktime libraries by adding the appropriate import to my files:

#include <QuickTime/QuickTimeComponents.h>

Easy, right? I would add the caveat that I have not yet done any GUI development using the native OSX libraries, so YMMV. Xcode may still be your best choice when making interfaces using Cocoa and Quartz. But if you just want to write C/C++ applications to unleash your Mac’s inner Unix, Eclipse is hard to beat.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

CakePHP… Brain Dessert for PHP Developers

by: Jeff

Tuesday, May 13th, 2008

The guys over at CakePHP have whipped up something full of awesomeness for the PHP community. They have provided a tool to make our lives easier and more productive by removing the hassles of creating redundant boilerplate code using a framework to cleanly build web applications. I’ll briefly delve into what Cake is and why I think it is so awesome.

The main concept to learn behind cake is the Model-View-Controller (MVC) architecture. This basically means that the code to handle data (model), the code to handle html (view), and the code to handle logic (controller) is neatly broken up into three separate files. In essence, the controller gets data from the model (usually synonymous with a database table) and figures out what it wants to do with the data, then supplies the view with the processed data. Additionally, if you want to get started quickly, you can declare a variable called scaffold in your controller and CRUD pages will be auto-magically created for that table in your database!

To take things a step further, you can run a command line utility that can create permanent copies of these CRUD pages and help you define relationships between your models. The CakePHP project is very active and I’ve only glanced on a couple of the cool features.

Once you get in the mindset of using it, which includes familiarizing yourself with some naming conventions and taking full advantages of models instead of making raw queries, you’ll be creating PHP sites in a fraction of the time. (For further information about getting started, please look at The CakePHP Manual.)

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Interface Zen: Intuitive Apps On the iPhone

by: Nate

Saturday, May 10th, 2008

Here at Lextech, we have internal training events a couple times a month. We take occasional surveys to find out what technologies people are interested in learning about, then figure out who among us knows it or might be interested in picking it up. These teachers are then cajoled into giving a class with the promise of free food. The classes take the form of either a brief overview during lunch, or a more in-depth look during the evening.

We’ve all been very excited about the release of the iPhone SDK (official and otherwise), so an evening training event covering that was a no-brainer. After a brief discussion, it became clear that I would be the easiest one to talk into leading the class since I respond well to flattery.

I decided that the focus of the class should be creating extremely intuitive applications that make use of the iPhone’s rather unique user interface. Coincidentally I had just finished up a project that involved controlling a pan & tilt camera from a PC, and this struck me as the perfect application for the iPhone.

Rather than throw an entire application at people and then try to go through all the different pieces, I thought it would be best to take an incremental approach. I presented the application in essentially the same way that I created it: one layer at a time. For the sake of clarity, each layer was shown as a separate Xcode project that built upon the previous one.

These are the different layers I used:

Video

The first task was to display live video from the camera we would be using. This seemed like a great layer to start with, since it provides an immediate usefulness all by itself. It would also be quick and easy to implement, or so I thought.

The output from the video cameras is analog, so we use a video server (an Axis 241Q) to digitize and stream it. It works great and is easy to use; just set it up and enter the URL in QuickTime.

Unfortunately it turns out that the iPhone does not support RTSP/RTP, the standard protocol for streaming video. After scratching my head for a while, I figured out how to use a UIWebView to render some HTML and Javascript that displayed the video as Motion JPEG. As an added bonus, this has much less lag than using QuickTime for live video.

Network

The server software that controls the pan & tilt cameras is Java based. Fortunately we already had an experimental AJAX interface to the Java server. All I had to do was create an NSURLConnection to talk to the existing web interface.

Touch

Now we get to the part that really shines on the iPhone: the user interface. Our standard GUI interfaces for these cameras have buttons for moving left - right (pan), and up - down (tilt). The obvious iPhone enhancement was to implement these controls using finger flicks and drags, just like scrolling in the other native applications. I just had to override the default touch behavior and send commands to the server using the network layer.

Bonjour

The metaphorical cherry-on-top for ease of use was auto-configuration. Instead of the user needing to know what cameras were available and, even worse, having to type in the addresses and other configuration data, we used Bonjour to make it all automagical.

Apple provides some very nice Java interfaces for Bonjour. It was quite simple to setup the Java server to broadcast information about the cameras using a custom service type. The application is set up as a listener for that service, and when the user launches it they are presented with a real-time list of all the cameras available on the local network. All they have to do is click on the one they want to control.


The class went even better than I could have hoped. We all learned a bunch of cool stuff that’s going to give us a real head-start on developing iPhone applications. To try out their newly acquired skills, the class attendees even extended the application I presented, adding a pinching interface for zooming the camera. I was a bit surprised when they fixed the compilation errors and it just worked perfectly on the first go. It was a pretty impressive demonstration of the platform’s unique capabilities.

And really, this is what I hope to see more of on the iPhone. Applications that don’t just blandly replicate existing desktop functionality, but instead provide tools conceived within the framework of the revolutionary iPhone interface. Tools that exceed desktop functionality.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Build It In: Instrumentation and Monitoring of a System

by: Alex

Monday, May 5th, 2008

Most systems (especially web applications) are built with very little thought about the post implementation life cycle of the system. One of the key components to staying ahead of the growth curve of a system (and quickly diagnosing problems) is a monitoring system that includes key system metrics.

Ping monitoring a server to determine if it’s alive is helpful to identify critical failures but does very little to tell you in advance when you’re going to run out of disk space or need to upgrade the server. The monitoring system should include key server level parameters (hard drive free space, memory used, CPU usage, network interface bandwidth, disk activity) as well as application specific items (numbers of users, page views, transaction counts, queue lengths, etc.) Having this information available for trending analysis makes it very managable to plan for system upgrades well in advance of the system going BOOM.

Identifying those key system metrics up front and building them into the application initially will be much more cost effective than try to retrofit them into an existing infrastructure. Putting in place a simple web based dashboard that includes graphs over time of those metrics allows any member of the technical or operational team to identify potential pitfalls.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati

Lextech’s New Website & Blog Are Live

by: Alex

Sunday, May 4th, 2008

I’m proud to say that through the hard work of a bunch of folks on our team, Lextech has a new online image. The web site does a much better job communicating our focus on building technology based revenue streams for clients and this blog will let us get lots of content out to the world much quicker.

With 6+ writers for the blog you’ll see all kinds of useful revenue generating ideas and technology tidbits appearing.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Facebook
  • Slashdot
  • Technorati