<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/2.4.6" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Webnology</title>
		<link>http://www.evarions.com/index.php/webnology/</link>
		<description>This blog contain information about php, mysql, ajax, html, css and Interviews Help</description>
		<language>en-GB</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=2.4.6"/>
		<ttl>60</ttl>
				<item>
			<title>HipHop for PHP: Move Fast</title>
			<link>http://www.evarions.com/index.php/webnology/2010/04/07/hiphop-for-php-move-fast</link>
			<pubDate>Thu, 08 Apr 2010 05:57:11 +0000</pubDate>			<dc:creator>shardulk10</dc:creator>
			<category domain="main">PHP</category>
<category domain="alt">MySQL</category>
<category domain="alt">HTML</category>
<category domain="alt">CSS</category>
<category domain="alt">Applications</category>			<guid isPermaLink="false">58@http://www.evarions.com/</guid>
						<description>&lt;p&gt;One of the key values at Facebook is to move fast. For the past six years, we have been able to accomplish a lot thanks to rapid pace of development that PHP offers. As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.&lt;/p&gt;

&lt;p&gt;Today I'm excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP. While HipHop has shown us incredible results, it's certainly not complete and you should be comfortable with beta software before trying it out.&lt;/p&gt;

&lt;p&gt;HipHop for PHP isn't technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features &amp;#8212; such as eval() &amp;#8212; in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.&lt;/p&gt;

&lt;p&gt;Scaling PHP as a Scripting Language&lt;br /&gt;
PHP's roots are those of a scripting language, like Perl, Python, and Ruby, all of which have major benefits in terms of programmer productivity and the ability to iterate quickly on products. This is compared to more traditional compiled languages like C++ and interpreted languages like Java. On the other hand, scripting languages are known to generally be less efficient when it comes to CPU and memory usage. Because of this, it's been challenging to scale Facebook to over 400 billion PHP-based page views every month.&lt;/p&gt;

&lt;p&gt;One common way to address these inefficiencies is to rewrite the more complex parts of your PHP application directly in C++ as PHP Extensions. This largely transforms PHP into a glue language between your front end HTML and application logic in C++. From a technical perspective this works well, but drastically reduces the number of engineers who are able to work on your entire application. Learning C++ is only the first step to writing PHP Extensions, the second is understanding the Zend APIs. Given that our engineering team is relatively small &amp;#8212; there are over one million users to every engineer &amp;#8212; we can't afford to make parts of our codebase less accessible than others.&lt;/p&gt;

&lt;p&gt;Scaling Facebook is particularly challenging because almost every page view is a logged-in user with a customized experience. When you view your home page we need to look up all of your friends, query their most relevant updates (from a custom service we've built called Multifeed), filter the results based on your privacy settings, then fill out the stories with comments, photos, likes, and all the rich data that people love about Facebook. All of this in just under a second. HipHop allows us to write the logic that does the final page assembly in PHP and iterate it quickly while relying on custom back-end services in C++, Erlang, Java, or Python to service the News Feed, search, Chat, and other core parts of the site.&lt;/p&gt;

&lt;p&gt;Since 2007 we've thought about a few different ways to solve these problems and have even tried implementing a few of them. The common suggestion is to just rewrite Facebook in another language, but given the complexity and speed of development of the site this would take some time to accomplish. We've rewritten aspects of the Zend Engine &amp;#8212; PHP's internals &amp;#8212; and contributed those patches back into the PHP project, but ultimately haven't seen the sort of performance increases that are needed. HipHop's benefits are nearly transparent to our development speed.&lt;/p&gt;

&lt;p&gt;Hacking Up HipHop&lt;br /&gt;
One night at a Hackathon a few years ago (see Prime Time Hack), I started my first piece of code transforming PHP into C++. The languages are fairly similar syntactically and C++ drastically outperforms PHP when it comes to both CPU and memory usage. Even PHP itself is written in C. We knew that it was impossible to successfully rewrite an entire codebase of this size by hand, but wondered what would happen if we built a system to do it programmatically.&lt;/p&gt;

&lt;p&gt;Finding new ways to improve PHP performance isn't a new concept. At run time the Zend Engine turns your PHP source into opcodes which are then run through the Zend Virtual Machine. Open source projects such as APC and eAccelerator cache this output and are used by the majority of PHP powered websites. There's also Zend Server, a commercial product which makes PHP faster via opcode optimization and caching. Instead, we were thinking about transforming PHP source directly into C++ which can then be turned into native machine code. Even compiling PHP isn't a new idea, open source projects like Roadsend and phc compile PHP to C, Quercus compiles PHP to Java, and Phalanger compiles PHP to .Net.&lt;/p&gt;

&lt;p&gt;Needless to say, it took longer than that single Hackathon. Eight months later, I had enough code to demonstrate it is indeed possible to run faster with compiled code. We quickly added Iain Proctor and Minghui Yang to the team to speed up the pace of the project. We spent the next ten months finishing up all the coding and the following six months testing on production servers. We are proud to say that at this point, we are serving over 90% of our Web traffic using HipHop, all only six months after deployment.&lt;/p&gt;

&lt;p&gt;How HipHop Works&lt;br /&gt;
The main challenge of the project was bridging the gap between PHP and C++. PHP is a scripting language with dynamic, weak typing. C++ is a compiled language with static typing. While PHP allows you to write magical dynamic features, most PHP is relatively straightforward. It's more likely that you see if (...) {...} else {..} than it is to see function foo($x) { include $x; }. This is where we gain in performance. Whenever possible our generated code uses static binding for functions and variables. We also use type inference to pick the most specific type possible for our variables and thus save memory.&lt;/p&gt;

&lt;p&gt;The transformation process includes three main steps:&lt;/p&gt;

&lt;p&gt;Static analysis where we collect information on who declares what and dependencies, &lt;br /&gt;
Type inference where we choose the most specific type between C++ scalars, String, Array, classes, Object, and Variant, and &lt;br /&gt;
Code generation which for the most part is a direct correspondence from PHP statements and expressions to C++ statements and expressions.&lt;/p&gt;

&lt;p&gt;We have also developed HPHPi, which is an experimental interpreter designed for development. When using HPHPi you don't need to compile your PHP source code before running it. It's helped us catch bugs in HipHop itself and provides engineers a way to use HipHop without changing how they write PHP.&lt;/p&gt;

&lt;p&gt;Overall HipHop allows us to keep the best aspects of PHP while taking advantage of the performance benefits of C++. In total, we have written over 300,000 lines of code and more than 5,000 unit tests. All of this will be released this evening on GitHub under the open source PHP license.&lt;/p&gt;

&lt;p&gt;Learn More this Evening&lt;br /&gt;
This evening we're hosting a small group of developers to dive deeper into HipHop for PHP and will be streaming this tech talk live. Check back here around 7:30pm Pacific time if you'd like to watch.&lt;/p&gt;

&lt;p&gt;As I'm sure there will be plenty of questions, starting this evening take a look at the HipHop wiki or join the HipHop developer mailing list. You'll also find us at FOSDEM, SCALE, PHP UK, ConFoo, TEK X, and OSCON over the next few months talking about HipHop for PHP. We're very excited to evolve HipHop into a thriving open source project along with all of you.&lt;/p&gt;

&lt;p&gt;Referance By : &lt;a href=&quot;http://developers.facebook.com/news.php?story=358&amp;amp;blog=1&quot;&gt;http://developers.facebook.com/news.php?story=358&amp;amp;blog=1&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.evarions.com/index.php/webnology/2010/04/07/hiphop-for-php-move-fast&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>One of the key values at Facebook is to move fast. For the past six years, we have been able to accomplish a lot thanks to rapid pace of development that PHP offers. As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.</p>

<p>Today I'm excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP. While HipHop has shown us incredible results, it's certainly not complete and you should be comfortable with beta software before trying it out.</p>

<p>HipHop for PHP isn't technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features &#8212; such as eval() &#8212; in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.</p>

<p>Scaling PHP as a Scripting Language<br />
PHP's roots are those of a scripting language, like Perl, Python, and Ruby, all of which have major benefits in terms of programmer productivity and the ability to iterate quickly on products. This is compared to more traditional compiled languages like C++ and interpreted languages like Java. On the other hand, scripting languages are known to generally be less efficient when it comes to CPU and memory usage. Because of this, it's been challenging to scale Facebook to over 400 billion PHP-based page views every month.</p>

<p>One common way to address these inefficiencies is to rewrite the more complex parts of your PHP application directly in C++ as PHP Extensions. This largely transforms PHP into a glue language between your front end HTML and application logic in C++. From a technical perspective this works well, but drastically reduces the number of engineers who are able to work on your entire application. Learning C++ is only the first step to writing PHP Extensions, the second is understanding the Zend APIs. Given that our engineering team is relatively small &#8212; there are over one million users to every engineer &#8212; we can't afford to make parts of our codebase less accessible than others.</p>

<p>Scaling Facebook is particularly challenging because almost every page view is a logged-in user with a customized experience. When you view your home page we need to look up all of your friends, query their most relevant updates (from a custom service we've built called Multifeed), filter the results based on your privacy settings, then fill out the stories with comments, photos, likes, and all the rich data that people love about Facebook. All of this in just under a second. HipHop allows us to write the logic that does the final page assembly in PHP and iterate it quickly while relying on custom back-end services in C++, Erlang, Java, or Python to service the News Feed, search, Chat, and other core parts of the site.</p>

<p>Since 2007 we've thought about a few different ways to solve these problems and have even tried implementing a few of them. The common suggestion is to just rewrite Facebook in another language, but given the complexity and speed of development of the site this would take some time to accomplish. We've rewritten aspects of the Zend Engine &#8212; PHP's internals &#8212; and contributed those patches back into the PHP project, but ultimately haven't seen the sort of performance increases that are needed. HipHop's benefits are nearly transparent to our development speed.</p>

<p>Hacking Up HipHop<br />
One night at a Hackathon a few years ago (see Prime Time Hack), I started my first piece of code transforming PHP into C++. The languages are fairly similar syntactically and C++ drastically outperforms PHP when it comes to both CPU and memory usage. Even PHP itself is written in C. We knew that it was impossible to successfully rewrite an entire codebase of this size by hand, but wondered what would happen if we built a system to do it programmatically.</p>

<p>Finding new ways to improve PHP performance isn't a new concept. At run time the Zend Engine turns your PHP source into opcodes which are then run through the Zend Virtual Machine. Open source projects such as APC and eAccelerator cache this output and are used by the majority of PHP powered websites. There's also Zend Server, a commercial product which makes PHP faster via opcode optimization and caching. Instead, we were thinking about transforming PHP source directly into C++ which can then be turned into native machine code. Even compiling PHP isn't a new idea, open source projects like Roadsend and phc compile PHP to C, Quercus compiles PHP to Java, and Phalanger compiles PHP to .Net.</p>

<p>Needless to say, it took longer than that single Hackathon. Eight months later, I had enough code to demonstrate it is indeed possible to run faster with compiled code. We quickly added Iain Proctor and Minghui Yang to the team to speed up the pace of the project. We spent the next ten months finishing up all the coding and the following six months testing on production servers. We are proud to say that at this point, we are serving over 90% of our Web traffic using HipHop, all only six months after deployment.</p>

<p>How HipHop Works<br />
The main challenge of the project was bridging the gap between PHP and C++. PHP is a scripting language with dynamic, weak typing. C++ is a compiled language with static typing. While PHP allows you to write magical dynamic features, most PHP is relatively straightforward. It's more likely that you see if (...) {...} else {..} than it is to see function foo($x) { include $x; }. This is where we gain in performance. Whenever possible our generated code uses static binding for functions and variables. We also use type inference to pick the most specific type possible for our variables and thus save memory.</p>

<p>The transformation process includes three main steps:</p>

<p>Static analysis where we collect information on who declares what and dependencies, <br />
Type inference where we choose the most specific type between C++ scalars, String, Array, classes, Object, and Variant, and <br />
Code generation which for the most part is a direct correspondence from PHP statements and expressions to C++ statements and expressions.</p>

<p>We have also developed HPHPi, which is an experimental interpreter designed for development. When using HPHPi you don't need to compile your PHP source code before running it. It's helped us catch bugs in HipHop itself and provides engineers a way to use HipHop without changing how they write PHP.</p>

<p>Overall HipHop allows us to keep the best aspects of PHP while taking advantage of the performance benefits of C++. In total, we have written over 300,000 lines of code and more than 5,000 unit tests. All of this will be released this evening on GitHub under the open source PHP license.</p>

<p>Learn More this Evening<br />
This evening we're hosting a small group of developers to dive deeper into HipHop for PHP and will be streaming this tech talk live. Check back here around 7:30pm Pacific time if you'd like to watch.</p>

<p>As I'm sure there will be plenty of questions, starting this evening take a look at the HipHop wiki or join the HipHop developer mailing list. You'll also find us at FOSDEM, SCALE, PHP UK, ConFoo, TEK X, and OSCON over the next few months talking about HipHop for PHP. We're very excited to evolve HipHop into a thriving open source project along with all of you.</p>

<p>Referance By : <a href="http://developers.facebook.com/news.php?story=358&amp;blog=1">http://developers.facebook.com/news.php?story=358&amp;blog=1</a></p><div class="item_footer"><p><small><a href="http://www.evarions.com/index.php/webnology/2010/04/07/hiphop-for-php-move-fast">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.evarions.com/index.php/webnology/2010/04/07/hiphop-for-php-move-fast#comments</comments>
		</item>
				<item>
			<title>Enhance PHP session management</title>
			<link>http://www.evarions.com/index.php/webnology/2009/11/17/enhance-php-session-management</link>
			<pubDate>Tue, 17 Nov 2009 13:23:17 +0000</pubDate>			<dc:creator>shardulk10</dc:creator>
			<category domain="main">PHP</category>			<guid isPermaLink="false">57@http://www.evarions.com/</guid>
						<description>&lt;p&gt;In PHP, sessions can keep track of authenticated in users. They are an essential building block in today's websites with big communities and a lot of user activity. Without sessions, everyone would be an anonymous visitor.&lt;br /&gt;
In system terms, PHP sessions are little files, stored on the server's disk. But on high traffic sites, the disk I/O involved, and not being able to share sessions between multiple webservers make this default system far from ideal. This is how to enhance PHP session management in terms of performance and shareability.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Session sharing in web clusters&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;If you have multiple webservers all serving the same site, sessions should be shared among those servers, and not reside on each server's individual disk. Because once a user gets load-balanced to a different server, the session cannot be found, effectively logging the user out.&lt;/p&gt;

&lt;p&gt;A common way around this is to use custom session handlers. Writing a class that overrules default behavior and stores sessions in a MySQL database.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Sessions in Database&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;All webservers connect to the same database and so, as soon as www01 registers a session (insert in a sessions table), www02 can read it. All servers can now see all sessions: problem solved?&lt;/p&gt;

&lt;p&gt;Yes, and no. This sure is functional and tackles the shareability issue. But databases seem to be the biggest bottlenecks of web clusters these days. They are the hardest to scale, and so in high traffic environments you don't want to (ab)use them for session management if you don't have to. We have to tackle the 'performance' issue.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Database memory&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Memory is about 30 times faster than disk storage. So storing our sessions in memory somehow, could deliver great performance.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;MySQL query caching&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;One form of using database memory is the standard MySQL query caching. But MySQL query caching isn't very effective because it invalidates all cache related a table, if only one record in that table is changed.&lt;/p&gt;

&lt;p&gt;Of course the session table is changed all the time, so the session cache is purged all the time, rendering it quite useless for our purposes.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Heap tables / Memory tables&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;We're really closing in to our goal now. Storing the sessions in a heap/memory table (a table that lives in your database server's RAM) speeds up things greatly. Many demanding sites have opted for this solution.&lt;/p&gt;

&lt;p&gt;In my eyes however, it's still not optimal. Because it still requires a lot of additional queries that your database server(s) shouldn't necessarily have to process.&lt;/p&gt;

&lt;p&gt;One other possible solution is using Memcache. And you will find it's easier to setup and has a smaller footprint than most alternatives. For one thing, because you will not have to code custom session handler classes in PHP. Memcache session support comes native.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Sessions in Memcache&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;PHP allows you to overrule the default session handler in two ways:&lt;/p&gt;

&lt;p&gt;   1. session_set_save_handler(). By programming your own session handlers, allowing you to virtually use any type of storage, as long as you can read/write to it from PHP. This example uses a MySQL database. We could also use this method to connect to Memcache.&lt;br /&gt;
   2. session.save_handler. By specifying one of the default handlers in the php.ini file using the session.save_handler &amp;amp; session.save_path directives.&lt;/p&gt;

&lt;p&gt;Option 1 allows greater flexibiliy. And it even allows you to create a combined database/memcache mechanism. Resulting in a fallback-on-database in case memcache goes offline and loses all of it's sessions (effictively logging out all users).&lt;/p&gt;

&lt;p&gt;Option 2 is very easy to implement, doesn't require changing your existing code, and is the one I'm going to show you today.&lt;br /&gt;
session.save_handler&lt;/p&gt;

&lt;p&gt;Assuming that you have one webserver, and installed the Memache server on that same machine, the hostname will be 127.0.0.1. If you have it on a different server, you will know what IP to substitute it with.&lt;/p&gt;

&lt;p&gt;session.save_handler = memcache&lt;br /&gt;
session.save_path = &quot;tcp://127.0.0.1:11211&quot;&lt;/p&gt;

&lt;p&gt;Done! Huh? what just happened?&lt;/p&gt;

&lt;p&gt;Well, because we enabled Memcache session handler support, all work is done for us. PHP will now know not to use the default files handler so save session files in /var/lib/php5 but uses memcache running at 127.0.0.1 instead.&lt;/p&gt;

&lt;p&gt;Don't forget to restart your webserver to activate your changes to the php.ini&lt;/p&gt;

&lt;p&gt;/etc/init.d/apache2 restart&lt;/p&gt;

&lt;p&gt;Referance Site &lt;b&gt;&lt;a href=&quot;http://kevin.vanzonneveld.net/&quot;&gt;http://kevin.vanzonneveld.net/&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Thanks And Regards &lt;img src=&quot;http://www.evarions.com/rsc/smilies/icon_smile.gif&quot; alt=&quot;&amp;#58;&amp;#41;&quot; class=&quot;middle&quot; /&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.evarions.com/index.php/webnology/2009/11/17/enhance-php-session-management&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>In PHP, sessions can keep track of authenticated in users. They are an essential building block in today's websites with big communities and a lot of user activity. Without sessions, everyone would be an anonymous visitor.<br />
In system terms, PHP sessions are little files, stored on the server's disk. But on high traffic sites, the disk I/O involved, and not being able to share sessions between multiple webservers make this default system far from ideal. This is how to enhance PHP session management in terms of performance and shareability.</p>

<p><b>Session sharing in web clusters</b></p>

<p>If you have multiple webservers all serving the same site, sessions should be shared among those servers, and not reside on each server's individual disk. Because once a user gets load-balanced to a different server, the session cannot be found, effectively logging the user out.</p>

<p>A common way around this is to use custom session handlers. Writing a class that overrules default behavior and stores sessions in a MySQL database.</p>

<p><b>Sessions in Database</b></p>

<p>All webservers connect to the same database and so, as soon as www01 registers a session (insert in a sessions table), www02 can read it. All servers can now see all sessions: problem solved?</p>

<p>Yes, and no. This sure is functional and tackles the shareability issue. But databases seem to be the biggest bottlenecks of web clusters these days. They are the hardest to scale, and so in high traffic environments you don't want to (ab)use them for session management if you don't have to. We have to tackle the 'performance' issue.</p>

<p><b>Database memory</b></p>

<p>Memory is about 30 times faster than disk storage. So storing our sessions in memory somehow, could deliver great performance.</p>

<p><b>MySQL query caching</b></p>

<p>One form of using database memory is the standard MySQL query caching. But MySQL query caching isn't very effective because it invalidates all cache related a table, if only one record in that table is changed.</p>

<p>Of course the session table is changed all the time, so the session cache is purged all the time, rendering it quite useless for our purposes.</p>

<p><b>Heap tables / Memory tables</b>.</p>

<p>We're really closing in to our goal now. Storing the sessions in a heap/memory table (a table that lives in your database server's RAM) speeds up things greatly. Many demanding sites have opted for this solution.</p>

<p>In my eyes however, it's still not optimal. Because it still requires a lot of additional queries that your database server(s) shouldn't necessarily have to process.</p>

<p>One other possible solution is using Memcache. And you will find it's easier to setup and has a smaller footprint than most alternatives. For one thing, because you will not have to code custom session handler classes in PHP. Memcache session support comes native.</p>

<p><b>Sessions in Memcache</b></p>

<p>PHP allows you to overrule the default session handler in two ways:</p>

<p>   1. session_set_save_handler(). By programming your own session handlers, allowing you to virtually use any type of storage, as long as you can read/write to it from PHP. This example uses a MySQL database. We could also use this method to connect to Memcache.<br />
   2. session.save_handler. By specifying one of the default handlers in the php.ini file using the session.save_handler &amp; session.save_path directives.</p>

<p>Option 1 allows greater flexibiliy. And it even allows you to create a combined database/memcache mechanism. Resulting in a fallback-on-database in case memcache goes offline and loses all of it's sessions (effictively logging out all users).</p>

<p>Option 2 is very easy to implement, doesn't require changing your existing code, and is the one I'm going to show you today.<br />
session.save_handler</p>

<p>Assuming that you have one webserver, and installed the Memache server on that same machine, the hostname will be 127.0.0.1. If you have it on a different server, you will know what IP to substitute it with.</p>

<p>session.save_handler = memcache<br />
session.save_path = "tcp://127.0.0.1:11211"</p>

<p>Done! Huh? what just happened?</p>

<p>Well, because we enabled Memcache session handler support, all work is done for us. PHP will now know not to use the default files handler so save session files in /var/lib/php5 but uses memcache running at 127.0.0.1 instead.</p>

<p>Don't forget to restart your webserver to activate your changes to the php.ini</p>

<p>/etc/init.d/apache2 restart</p>

<p>Referance Site <b><a href="http://kevin.vanzonneveld.net/">http://kevin.vanzonneveld.net/</a></b></p>

<p>Thanks And Regards <img src="http://www.evarions.com/rsc/smilies/icon_smile.gif" alt="&#58;&#41;" class="middle" /></p><div class="item_footer"><p><small><a href="http://www.evarions.com/index.php/webnology/2009/11/17/enhance-php-session-management">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.evarions.com/index.php/webnology/2009/11/17/enhance-php-session-management#comments</comments>
		</item>
				<item>
			<title>Validate a Credit Card</title>
			<link>http://www.evarions.com/index.php/webnology/2009/11/17/validate-a-credit-card</link>
			<pubDate>Tue, 17 Nov 2009 13:18:06 +0000</pubDate>			<dc:creator>shardulk10</dc:creator>
			<category domain="main">PHP</category>			<guid isPermaLink="false">56@http://www.evarions.com/</guid>
						<description>&lt;p&gt;&lt;strong&gt;This little function helps validating a given credit card number is legit:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;function ValidateCreditCardNumber($cc_num)&lt;br /&gt;
{&lt;br /&gt;
  $pattern = &quot;/^3[47]\d{13}$/&quot;;//American Express&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  $pattern = &quot;/^([30|36|38]{2})([0-9]{12})$/&quot;;//Diner's Club&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  $pattern = &quot;/^6011\d{12}$/&quot;;//Discover Card&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  $pattern = &quot;/^5[12345]\d{14}$/&quot;;//Mastercard&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;br /&gt;
   &lt;br /&gt;
  $pattern = &quot;/^4\d{12}(\d\d\d){0,1}$/&quot;;//Visa&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;/p&gt;

&lt;p&gt;  $pattern = &quot;/^30[012345]\d{11}$/&quot;;//Diners&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;/p&gt;

&lt;p&gt;  $pattern = &quot;/^3[68]\d{12}$/&quot;;//Diners #2&lt;br /&gt;
  if (preg_match($pattern,$cc_num))&lt;br /&gt;
  {&lt;br /&gt;
    return true;&lt;br /&gt;
  }&lt;/p&gt;

&lt;p&gt;  // Not valid&lt;br /&gt;
  return false; &lt;br /&gt;
}&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.evarions.com/index.php/webnology/2009/11/17/validate-a-credit-card&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><strong>This little function helps validating a given credit card number is legit:</strong></p>

<p>function ValidateCreditCardNumber($cc_num)<br />
{<br />
  $pattern = "/^3[47]\d{13}$/";//American Express<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }<br />
 <br />
  $pattern = "/^([30|36|38]{2})([0-9]{12})$/";//Diner's Club<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }<br />
 <br />
  $pattern = "/^6011\d{12}$/";//Discover Card<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }<br />
 <br />
  $pattern = "/^5[12345]\d{14}$/";//Mastercard<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }<br />
   <br />
  $pattern = "/^4\d{12}(\d\d\d){0,1}$/";//Visa<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }</p>

<p>  $pattern = "/^30[012345]\d{11}$/";//Diners<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }</p>

<p>  $pattern = "/^3[68]\d{12}$/";//Diners #2<br />
  if (preg_match($pattern,$cc_num))<br />
  {<br />
    return true;<br />
  }</p>

<p>  // Not valid<br />
  return false; <br />
}</p><div class="item_footer"><p><small><a href="http://www.evarions.com/index.php/webnology/2009/11/17/validate-a-credit-card">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.evarions.com/index.php/webnology/2009/11/17/validate-a-credit-card#comments</comments>
		</item>
				<item>
			<title>cakePHP Frameworks</title>
			<link>http://www.evarions.com/index.php/webnology/2009/09/28/cakephp-frameworks</link>
			<pubDate>Mon, 28 Sep 2009 12:48:07 +0000</pubDate>			<dc:creator>shardulk10</dc:creator>
			<category domain="alt">PHP</category>
<category domain="alt">MySQL</category>
<category domain="alt">Applications</category>
<category domain="main">Opensource Framework</category>			<guid isPermaLink="false">55@http://www.evarions.com/</guid>
						<description>&lt;p&gt;&lt;b&gt;CakePHP &lt;/b&gt;is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Hot Features&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;-&gt; No Configuration - Set-up the database and let the magic begin&lt;br /&gt;
-&gt; Extremely Simple - Just look at the name...It's Cake&lt;br /&gt;
-&gt; Active, Friendly Community - Join us #cakephp on IRC. We'd love to help you get started&lt;br /&gt;
-&gt; Flexible License - Distributed under the MIT License&lt;br /&gt;
-&gt; Clean IP - Every line of code was written by the CakePHP development team&lt;br /&gt;
-&gt; Best Practices - covering security, authentication, and session handling, among the many other features&lt;br /&gt;
-&gt; OO - Whether you are a seasoned object-oriented programmer or a beginner, you'll feel comfortable.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Screenshots&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://cakephp.org/screencasts&quot;&gt;http://cakephp.org/screencasts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Download CakePHP&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://cakephp.org/downloads&quot;&gt;http://cakephp.org/downloads&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://hosting.India.to/clients/aff.php?aff=2116&quot;&gt;&lt;img src=http://hosting.india.to/banners/200x200.jpg width=&quot;200&quot; height=&quot;200&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.evarions.com/index.php/webnology/2009/09/28/cakephp-frameworks&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><b>CakePHP </b>is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.</p>

<p><b>Hot Features</b></p>

<p>-> No Configuration - Set-up the database and let the magic begin<br />
-> Extremely Simple - Just look at the name...It's Cake<br />
-> Active, Friendly Community - Join us #cakephp on IRC. We'd love to help you get started<br />
-> Flexible License - Distributed under the MIT License<br />
-> Clean IP - Every line of code was written by the CakePHP development team<br />
-> Best Practices - covering security, authentication, and session handling, among the many other features<br />
-> OO - Whether you are a seasoned object-oriented programmer or a beginner, you'll feel comfortable.</p>

<p><b>Screenshots</b><br />
<a href="http://cakephp.org/screencasts">http://cakephp.org/screencasts</a></p>

<p><b>Download CakePHP</b><br />
<a href="http://cakephp.org/downloads">http://cakephp.org/downloads</a></p>

<p><a href="http://hosting.India.to/clients/aff.php?aff=2116"><img src=http://hosting.india.to/banners/200x200.jpg width="200" height="200" border="0" /></a></p><div class="item_footer"><p><small><a href="http://www.evarions.com/index.php/webnology/2009/09/28/cakephp-frameworks">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.evarions.com/index.php/webnology/2009/09/28/cakephp-frameworks#comments</comments>
		</item>
				<item>
			<title>CodeIgniter Framework</title>
			<link>http://www.evarions.com/index.php/webnology/2009/09/25/codeigniter-framework</link>
			<pubDate>Sat, 26 Sep 2009 06:39:11 +0000</pubDate>			<dc:creator>shardulk10</dc:creator>
			<category domain="alt">PHP</category>
<category domain="alt">MySQL</category>
<category domain="alt">Introduction</category>
<category domain="main">Opensource Framework</category>			<guid isPermaLink="false">54@http://www.evarions.com/</guid>
						<description>&lt;p&gt;&lt;b&gt;Introduction :&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you're a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you're tired of ponderously large and thoroughly undocumented frameworks&lt;/p&gt;

&lt;p&gt;&lt;b&gt;CodeIgniter is right for you if...&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&gt; You want a framework with a small footprint.&lt;br /&gt;
&gt; You are not interested in large-scale monolithic libraries like PEAR.&lt;br /&gt;
&gt; You need exceptional performance.&lt;br /&gt;
&gt; You need broad compatibility with standard hosting accounts that run a variety of PHP versions and configurations.&lt;br /&gt;
&gt; You want a framework that requires nearly zero configuration.&lt;br /&gt;
&gt; You want a framework that does not require you to use the command line.&lt;br /&gt;
&gt; You want a framework that does not require you to adhere to restrictive coding rules.&lt;br /&gt;
&gt; You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).&lt;br /&gt;
&gt; You eschew complexity, favoring simple solutions.&lt;br /&gt;
&gt; You need clear, thorough documentation&lt;/p&gt;

&lt;p&gt;&lt;b&gt;You can download CodeIgniter From Here&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://codeigniter.com/downloads/&quot;&gt;http://codeigniter.com/downloads/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;If you want to learn CodeIgniter Thank take a referance of following sites for your further help&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://codeigniter.com/tutorials/&quot;&gt;http://codeigniter.com/tutorials/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;For CodeIgniter Documentation&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://codeigniter.com/user_guide/&quot;&gt;http://codeigniter.com/user_guide/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Projects Based on CodeIgniter&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://codeigniter.com/projects/&quot;&gt;http://codeigniter.com/projects/&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.evarions.com/index.php/webnology/2009/09/25/codeigniter-framework&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p><b>Introduction :</b></p>

<p>CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you're a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you're tired of ponderously large and thoroughly undocumented frameworks</p>

<p><b>CodeIgniter is right for you if...</b></p>

<p>> You want a framework with a small footprint.<br />
> You are not interested in large-scale monolithic libraries like PEAR.<br />
> You need exceptional performance.<br />
> You need broad compatibility with standard hosting accounts that run a variety of PHP versions and configurations.<br />
> You want a framework that requires nearly zero configuration.<br />
> You want a framework that does not require you to use the command line.<br />
> You want a framework that does not require you to adhere to restrictive coding rules.<br />
> You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).<br />
> You eschew complexity, favoring simple solutions.<br />
> You need clear, thorough documentation</p>

<p><b>You can download CodeIgniter From Here</b><br />
<a href="http://codeigniter.com/downloads/">http://codeigniter.com/downloads/</a></p>

<p><b>If you want to learn CodeIgniter Thank take a referance of following sites for your further help</b><br />
<a href="http://codeigniter.com/tutorials/">http://codeigniter.com/tutorials/</a></p>

<p><b>For CodeIgniter Documentation</b><br />
<a href="http://codeigniter.com/user_guide/">http://codeigniter.com/user_guide/</a></p>

<p><b>Projects Based on CodeIgniter</b><br />
<a href="http://codeigniter.com/projects/">http://codeigniter.com/projects/</a></p><div class="item_footer"><p><small><a href="http://www.evarions.com/index.php/webnology/2009/09/25/codeigniter-framework">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.evarions.com/index.php/webnology/2009/09/25/codeigniter-framework#comments</comments>
		</item>
				<item>
			<title>SaaS Startups: Knobs and Dials And Other Insights</title>
			<link>http://www.evarions.com/index.php/webnology/2009/09/11/saas-startups-knobs-and-dials-and-other</link>
			<pubDate>Fri, 11 Sep 2009 17:47:19 +0000</pubDate>			<dc:creator>shardulk10</dc:creator>
			<category domain="alt">Uncategorized</category>
<category domain="main">PHP</category>
<category domain="alt">MySQL</category>
<category domain="alt">Introduction</category>
<category domain="alt">Applications</category>			<guid isPermaLink="false">52@http://www.evarions.com/</guid>
						<description>&lt;p&gt;Article By: Dharmesh Shah Sir&lt;br /&gt;
Referance By: &lt;a href=&quot;http://onstartups.com/tabid/3339/bid/10459/SaaS-Startups-Knobs-and-Dials-And-Other-Insights.aspx&quot;&gt;http://onstartups.com/tabid/3339/bid/10459/SaaS-Startups-Knobs-and-Dials-And-Other-Insights.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're building a SaaS (Software as a Service) startup you're in great company.  Most software entrepreneurs today are taking this approach -- including me.  Below are some simple insights that I've learned in the process of being in the trenches with my own startup. &lt;/p&gt;

&lt;p&gt;&lt;b&gt;Insights On SaaS Startups &lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;1.  You are financing your customers.&lt;/b&gt;  Most SaaS businesses are subscription-based (there&amp;#8217;s usually no big upfront payment).  As a result, sales and marketing costs are front-loaded, but revenue comes in over time.  This can create cash-flow issues.  The higher your sales growth, the larger the gap in cash-flows.  This is why fast-growing SaaS companies often raise large amounts of capital.  My marketing software company is an example.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;2.  You&amp;#8217;ve got operating costs.&lt;/b&gt;  In the shrinkwrapped software business, you shipped disks/CDs/DVDs (or made the software available to download).  There were very few infrastructure costs.  To deliver software as a service, you need to invest in infrastructure &amp;#8212; including people to keep things running.  Services like Amazon&amp;#8217;s EC2 help a lot (in terms of having flexible scalability), but it still doesn&amp;#8217;t obviate the need to have people that will manage the infrastructure.  For a startup, the people cost to manage the IT stuff can be significant (since the team is very small).  So, even though hardware and infrastrucutre are cheap, managing it can take a significant percentage of the startup&amp;#8217;s time.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://hosting.India.to/clients/aff.php?aff=2116&quot;&gt;&lt;img src=http://hosting.india.to/banners/468nx60.jpg width=&quot;468&quot; height=&quot;60&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;3.  It Pays To Know Your Funnel:&lt;/b&gt;  One of the central drivers in the business will be understanding the shape of your marketing/sales funnel.  What channels are driving prospects into your funnel?  What&amp;#8217;s the conversion rate of random web visitors to trial?  Trial to purchase?  Purchase to delighted customer?  As a SaaS startup grows, a lot of leverage can be found by understanding the shape of the funnel and removing the &amp;#8220;leaks&amp;#8221; (i.e. where are you losing business)?  For example, if a lot of people are signing up for the trial, but very few convert to paying customers, you should dig into what the early usage pattern is.  Are people logging on at all?  If so, where are they getting stuck?  Remove the friction that is keeping customers from getting value and you&amp;#8217;ll unlock some revenue.  Do this at all stages of the funnel (focusing on the easy stuff first).&lt;/p&gt;

&lt;p&gt;&lt;b&gt;4.  Install Knobs and Dials In The Business:&lt;/b&gt;  One of the great things about the SaaS business is you have lots of aspects of the business you can tweak (examples include pricing, packaging/features and trial duration).  It&amp;#8217;s often tempting to tweak and optimize the business too early.  In the early days, the key is to install the knobs and dials and build gauges to measure as much as you can (without driving yourself crazy).  Get really good at efficient experimentation (i.e. I can turn this knob and see it have this effect).  As with most experiments, don&amp;#8217;t change too much at the same time (even though you think several different things will all have positive effects).  The reason is simple:  If you change more than one thing, you won&amp;#8217;t really know what really happened.  Unless you have lots of data points, simple tests are usually better.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;5.  Value the Visibility:&lt;/b&gt;  One of the big benefits of SaaS businesses is that they often operate on a shorter feedback cycle.  You&amp;#8217;re dealing in days/weeks/months not in quarters/years/lifetimes.  What this means is that when bad things start to happen (as many experienced during the start of the current economic downturn), you&amp;#8217;ll notice it sooner.  This is a very good thing.  It&amp;#8217;s like driving a fast car.  Good breaks allow you to go faster (because you know you can slow down if conditions require).  But, great visibility helps too &amp;#8212; you can better see what&amp;#8217;s happening around you, and what&amp;#8217;s coming.  The net result is that the risk of going faster is mitigated.&lt;/p&gt;

&lt;p&gt;Running a SaaS startup is a lot of fun.  There are so many more things under your control than the traditional shrink-wrapped business.  Use this to your advantage.  Keep your feedback cycles short, maniacally track the data and invest in continual (but cheap) experimentation.  In the long term, these things will give you a huge advantage.&lt;/p&gt;

&lt;p&gt;What have you learned while building your SaaS startup?&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.evarions.com/index.php/webnology/2009/09/11/saas-startups-knobs-and-dials-and-other&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Article By: Dharmesh Shah Sir<br />
Referance By: <a href="http://onstartups.com/tabid/3339/bid/10459/SaaS-Startups-Knobs-and-Dials-And-Other-Insights.aspx">http://onstartups.com/tabid/3339/bid/10459/SaaS-Startups-Knobs-and-Dials-And-Other-Insights.aspx</a></p>

<p>If you're building a SaaS (Software as a Service) startup you're in great company.  Most software entrepreneurs today are taking this approach -- including me.  Below are some simple insights that I've learned in the process of being in the trenches with my own startup. </p>

<p><b>Insights On SaaS Startups </b></p>

<p><b>1.  You are financing your customers.</b>  Most SaaS businesses are subscription-based (there&#8217;s usually no big upfront payment).  As a result, sales and marketing costs are front-loaded, but revenue comes in over time.  This can create cash-flow issues.  The higher your sales growth, the larger the gap in cash-flows.  This is why fast-growing SaaS companies often raise large amounts of capital.  My marketing software company is an example.</p>

<p><b>2.  You&#8217;ve got operating costs.</b>  In the shrinkwrapped software business, you shipped disks/CDs/DVDs (or made the software available to download).  There were very few infrastructure costs.  To deliver software as a service, you need to invest in infrastructure &#8212; including people to keep things running.  Services like Amazon&#8217;s EC2 help a lot (in terms of having flexible scalability), but it still doesn&#8217;t obviate the need to have people that will manage the infrastructure.  For a startup, the people cost to manage the IT stuff can be significant (since the team is very small).  So, even though hardware and infrastrucutre are cheap, managing it can take a significant percentage of the startup&#8217;s time.</p>


<p><a href="http://hosting.India.to/clients/aff.php?aff=2116"><img src=http://hosting.india.to/banners/468nx60.jpg width="468" height="60" border="0" /></a></p>

<p><b>3.  It Pays To Know Your Funnel:</b>  One of the central drivers in the business will be understanding the shape of your marketing/sales funnel.  What channels are driving prospects into your funnel?  What&#8217;s the conversion rate of random web visitors to trial?  Trial to purchase?  Purchase to delighted customer?  As a SaaS startup grows, a lot of leverage can be found by understanding the shape of the funnel and removing the &#8220;leaks&#8221; (i.e. where are you losing business)?  For example, if a lot of people are signing up for the trial, but very few convert to paying customers, you should dig into what the early usage pattern is.  Are people logging on at all?  If so, where are they getting stuck?  Remove the friction that is keeping customers from getting value and you&#8217;ll unlock some revenue.  Do this at all stages of the funnel (focusing on the easy stuff first).</p>

<p><b>4.  Install Knobs and Dials In The Business:</b>  One of the great things about the SaaS business is you have lots of aspects of the business you can tweak (examples include pricing, packaging/features and trial duration).  It&#8217;s often tempting to tweak and optimize the business too early.  In the early days, the key is to install the knobs and dials and build gauges to measure as much as you can (without driving yourself crazy).  Get really good at efficient experimentation (i.e. I can turn this knob and see it have this effect).  As with most experiments, don&#8217;t change too much at the same time (even though you think several different things will all have positive effects).  The reason is simple:  If you change more than one thing, you won&#8217;t really know what really happened.  Unless you have lots of data points, simple tests are usually better.</p>

<p><b>5.  Value the Visibility:</b>  One of the big benefits of SaaS businesses is that they often operate on a shorter feedback cycle.  You&#8217;re dealing in days/weeks/months not in quarters/years/lifetimes.  What this means is that when bad things start to happen (as many experienced during the start of the current economic downturn), you&#8217;ll notice it sooner.  This is a very good thing.  It&#8217;s like driving a fast car.  Good breaks allow you to go faster (because you know you can slow down if conditions require).  But, great visibility helps too &#8212; you can better see what&#8217;s happening around you, and what&#8217;s coming.  The net result is that the risk of going faster is mitigated.</p>

<p>Running a SaaS startup is a lot of fun.  There are so many more things under your control than the traditional shrink-wrapped business.  Use this to your advantage.  Keep your feedback cycles short, maniacally track the data and invest in continual (but cheap) experimentation.  In the long term, these things will give you a huge advantage.</p>

<p>What have you learned while building your SaaS startup?</p><div class="item_footer"><p><small><a href="http://www.evarions.com/index.php/webnology/2009/09/11/saas-startups-knobs-and-dials-and-other">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.evarions.com/index.php/webnology/2009/09/11/saas-startups-knobs-and-dials-and-other#comments</comments>
		</item>
			</channel>
</rss>
