Hands on with AppInsight @ VMWorld 2011

Today I had an opportunity to spend some time with AppInsight, a new product being delivered by VMWare as they enter into the application virtualization space. Essentially, AppInsight is an attempt at addressing the Visualization concerns within the Application Delivery space.

AppInsight allows you to breakup your virtualized network into logical segments, or tiers. For example, you might have a load balancing tier, web server tier, app server tier and database tier. Superficially, the product is on par with other user-to-database monitoring solutions. My problem, however, is their approach.

Personally, I think the idea that organization would, or could, virtualize 100% of their infrastructure is far fetched. Not to mention the plethora of catch 22 situations you could find yourself in. For arguments sake, lets say that we virtualized our load balancers. And our load balancers front infrastructure services like DNS and NTP. What would happen if we had an outage where we had to reboot ESX? Well, the load balancer instances can’t be started until ESX is running, but ESX relies on DNS!

Without digressing too far, I think the point is clear. Virtualization makes sense, in certain places. Therefore, for products like AppInsight to really take off they’ll need to develop API’s that can call into physical infrastructure appliances and gather the necessary information.

Lizamoon Infects 4,000,000 websites

Personally, I find it very sad that this many sites have been vulnerable to SQL injection hacks. Read more…

HSRP, vPC and the vPC peer-gateway Command

Hot Standby Routing Protocol is a well-known feature of Cisco IOS.  The goal of HSRP is to provide a resilient default-gateway to hosts on a LAN.  This is accomplished by configuring two or more routers to share the same IP address and MAC address.  Hosts on the LAN are configured with a single default-gateway (either statically or via DHCP).  Read More…

vText by Kung Fu Rabbits, LLC

THE BEST WAY AVAILABLE TO SEND AND RECEIVE SMS ON THE IPHONE.

JUST SAY “TELL JASON I’LL MEET YOU AT STARBUCKS IN 15MINUTES” OR REPLY TO JASON’S CONVERSATION BY SAYING “I’LL MEET YOU AT STARBUCK IN 15 MINUTES” AND YOUR VOICE WILL AUTOMATICALLY BE TRANSCRIBED TO TEXT AND SENT TO JASON! WHAT COULD BE MORE EASY WHEN YOU’RE ON THE GO?

VTEXT IS THE EASIEST TO USE VOICE TO TEXT SMS APPLICATION ON THE MARKET!

KEY FEATURES INCLUDE:

  1. UNLIMITED VOICE TRANSCRIPTIONS
  2. UNLIMITED SMS TO ALL YOUR CONTACTS (U.S., ONLY)
  3. USES THE MOST ACCURATE FREE-FORM TRANSCRIPTION SERVICE AVAILABLE
  4. RECIPIENTS ARE NOT REQUIRED TO HAVE VTEXT
  5. USE CONTACT NICKNAME OR FULL NAME
  6. TYPING ABILITY IF YOU’RE IN A PLACE WHERE YOU CAN’T SPEAK OUT LOUD
  7. PRIVATE AND SECURE SINCE IT USES COMPUTERS TO CONVERT MESSAGES, NOT HUMANS
  8. MESSAGES SENT FROM YOUR PHONE NUMBER @VTXT.MOBI SO RECIPIENTS KNOW WHO YOU ARE (OTHER SERVICES PROVIDE A RANDOM PHONE NUMBER FOR THIS)

MySQL vs. MSSQL on the Amazon Cloud

Recently I’ve been working on a application that requires some serious database performance and had chosen MySQL as the engine based on the common wisdom that MySQL is faster, and cheaper, than MSSQL. After some serious performance problems on a couple of local machines, I decided to use Amazon’s MySQL RDS service and compare it’s performance to their Windows 2008 / MSSQL 2008 instance. This is by no means and exhaustive study, but it is informative at least.

Amazon Instance Type

  • Large Instance 7.5 GB of memory, 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each), 850 GB of local instance storage, 64-bit platform

Table Structure

  • 5 VarChar(50) columns
  • ~2.1 Million Records
  • Un-Indexed
  • No Primary or Foreign Key Constraints

SQL Process

  • Table data copy using: INSERT INTO myTable2 (SELECT * FROM myTable1)

Processing Time

  • MySQL: Killed at +15 minutes
  • MSSQL: Completed at 1 minute 33 seconds

For large data moving operations, the winner is clear — MSSQL outperforms MySQL by an enormous margin. In further testing I’ve also found simple select operations on MySQL to be lacking as well. Looks like Microsoft had a leg up on the database world finally.

Zip Code Radius Search using MySQL

I had a project that required me to get a list of zip codes within a certain distance from a given zip code.

First, you are going to need to get a database that maps zip codes to longitude & latitude.

Zip code databases:

  1. Free from: http://www.populardata.com/downloads.html
  2. 5$ from http://www.teamredline.com/zc/

Next, you need to create a MySQL function to calculate distances between two longitudes and latitudes:

DROP   FUNCTION  IF EXISTS `GetDistance`

CREATE   FUNCTION  `GetDistance`(
lat1  numeric (9,6),
lon1  numeric (9,6),
lat2  numeric (9,6),
lon2  numeric (9,6)
)  RETURNS   decimal (10,5)
BEGIN
DECLARE  x  decimal (20,10);
DECLARE  pi  decimal (21,20);
SET  pi = 3.14159265358979323846;
SET  x = sin( lat1 * pi/180 ) * sin( lat2 * pi/180  ) + cos(
lat1 *pi/180 ) * cos( lat2 * pi/180 ) * cos(  abs ( (lon2 * pi/180) -
(lon1 *pi/180) ) );
SET  x = atan( ( sqrt( 1- power( x, 2 ) ) ) / x );
RETURN  ( 1.852 * 60.0 * ((x/pi)*180) ) / 1.609344;
END

You will now need to create a MySQL stored procedure that accepts a zip code and a radius and returns a list of zip codes that fall within the given radius:

DROP   PROCEDURE  IF EXISTS `GetNearbyZipCodes`

CREATE   PROCEDURE  `GetNearbyZipCodes`(
zipbase  varchar (6),
range  numeric (15)
)
BEGIN
DECLARE  lat1  decimal (5,2);
DECLARE  long1  decimal (5,2);
DECLARE  rangeFactor  decimal (7,6);
SET  rangeFactor = 0.014457;
SELECT  latitude,longitude  into  lat1,long1  FROM  tbl_zipcodes  WHERE  zipcode = zipbase;
SELECT  B.zipcode
FROM  tbl_zipcodes  AS  B
WHERE
B.latitude  BETWEEN  lat1-(range*rangeFactor)  AND  lat1+(range*rangeFactor)
AND  B.longitude  BETWEEN  long1-(range*rangeFactor)  AND  long1+(range*rangeFactor)
AND  GetDistance(lat1,long1,B.latitude,B.longitude)  <= range;
END

Lastly you need to make a call to this stored procedure:

CALL GetNearbyZipCodes( '85254' , 30
Posted in Uncategorized. Tags: . 1 Comment »

Using Voice Recognition to IM on the iPhone & Blackberry

Recently, the makers of IM+ integrated the Yap voice recognition service for their application. As a mobile user who’s constantly on the go, this is a very nice feature, especially in states where texting while driving in illegal. With this recent update, I can finally continue to chat with people on my gTalk account while I’m on the move.

So far, I’m fairly happy with the application. There are some rough spots with regards to performance, but I hope IM+ will have those ironed out shortly. For $0.99 a month, it’s not a bad deal.

Follow

Get every new post delivered to your Inbox.