Over the past few weeks, I have been in the process of developing my newest site. I can not tell you the name, at least until I buy the domain, or what services it will provide. One thing I can tell you though, is that the thing will revolutionize communities on the web for a while to come.
After reading many articles on “Web 2.0″ designs and browsing the sites, I have my own take on the style. Luckily, I’ve had the ability to please almost everybody I’ve shown the design to. :)
This new project also gives me a huge opportunity that a lot of my other haven’t. I am getting to play and learn new technologies that I have never used before. I have grown attached to the whole Script.aculo.us Javascript effect library and the web 2.0 developers best friend, Prototype. These JS libraries are just amazing! They simplify many effects and actions that would take many many lines of javascript to do. Some of the simple features in Prototype include the $() and $F() functions. $() is a simpler way to use document.getElementById, while $F() allows you to grab the value of a form object, painlessly.
Script.aculo.us is in a whole different ball park. The effects it provides are amazing and simple to use. I am going to make a prediction right now. I believe that over the next year, we will be seeing a lot more sites using this library. Back on topic, Script.aculo.us is built on top of the Prototype library, but is directed at the effects area. You can do fade in/fade out, open/close, shrink/grow, and many more effects with it. Is it is? Heck yes! Performing an effect on an element is as easy as a new Effect.Appear($(’element id’));.
One thing I have noticed that runs common through out all Web 2.0 sites is the ease of use. Forms are stripped down to the bear minimum in most cases and the use can go back to add filler information later, like profiles. This allows a user to quickly perform a task and see results. Add AJAX on top of this and you have an amazing ability to please users to your site, since you can do these tasks quickly. So I have definately taking this into consideration on my new site.
The latest problem I have had with working on my new project is figuring out how to stay COPPA compliant. This is not proving to be an easy task because there is no way I am going to be taking snail mail letters and faxes just to allow people to register on the site. I just do not have the time to go through and read each letter, then go activate the kid’s account.
Read the rest of this entry »
As many of you know, my site got dugg about a week ago and all I’m able to say is holy digg effect batman. I’ve had over 8,289 hits since then and I’ve moved to a new server. I hope all works out. I have a little insider info for you guys today that I thought would fit the recent events pretty well. I emailed digg.com for some general information and here is what they have to save:
- How was the idea for digg developed and how did the name come about?
Digg was started in September 2004 as a personal project of Kevin Rose’s. At that time, Kevin was working at TechTV. In addition to his job as a journalist, he was also a technophile and had interesting technology side projects that he was running out of his house. He was a big fan of MacRumors.com and was interested in how some of their “Page 2” stories that didn’t quite make the home page, were still really interesting. That got him thinking about all the great content available that no one could see and how it would be interesting to give more control back to the community.
In this sense, digg started out as a social experiment in how masses of users could control and promote content without the external editorial control. After a very short time, Kevin realized that he was on to something, as digg was becoming a great resource for breaking news stories, sometimes even before traditional media.
- Today, how many developers do you have working on the website?
digg has 15 employees today, and of those 3 are PHP developers, and there are a bunch of other people that support that development effort.
- (If this is alright to answer) What version of php do you guys use and what database system?
PHP v5
MySQL
All on Debian Linux
- What does the html comment in the page header mean?
I have no idea. It is something that the developers put in there for debugging.
- Do you guys use a version control system when developing the website? If so, which one?
Subversion
- How long has digg been in development, even since before it went public?
1.5 months before we launched the public beta.
- (Once again, if this can be answered) What is the average bandwidth usage of the site, since it is now in the top 500 websites?
I prefer not to answer this.
- What are some planned additions for the future?
Soon, we’ll be expanding outside of the tech news category into areas like science news, political news, etc. In this sense, we’ll be developing new areas for digg that will be similar to sections of a newspaper. We’ll also be adding more tools and functionality to the site. Our goal is to give users even more control and to provide real-time visibility into what’s happening on digg
- (If this can be answered as well) How many servers does digg.com run to keep it responding quickly?
With development servers, staging servers, live active digg servers and database servers – we have about 50 now…growing with great speed
- How do you, a fellow employee, enjoy working with digg.com?
digg.com are my friends, and we came together to realize my vision, so for that, I’m extremely grateful. So, not only is digg.com a great place to be, but the work that we do serves my community, so it’s quite an amazing opportunity that we’ve created for ourselves. digg’ success is a real testament to what can happen if you believe in yourself and follow your dreams.
Well, my DNS cache has just updated and I’m on the new server. I’m sorry that took longer than I intended it to. I’ll be updating the site more now and hopefully with a new theme. I hope you enjoy the new speed. :)
Posted by Cody Mays on 20 Apr 2006 5:10 pm. Filed under
Site News.
Well that was a first. I had my first digging a few days ago. My PHP post below made front page. The traffic Digg.com can generate is just amazing. I got over 4000 visits the first day, and my blog was down for about 3 hours. The actual article got almost 8,500 visits on one of the mirror servers alone and I have now moved it back to this server.
Over the next few hours, I will be moving this site to a new server kindly provided my Allan Jude of ThunderIT.com. You should see an insane speed increase and hopefully more traffic. That’s all for now, I’ll update once it’s moved.
Over the past week and a half, I have been in the process of reading up on developing for high traffic sites. It is very interesting that it only requires small optimizations here and there.
One thing I’ve found in common with all large sites and that should be pretty obvious, is a PHP compiler cache and some type of caching system. Some of the more popular ones are APC, Bware Afterburner, Turck MMCache, and the Zend Accelerator. PHP caching systems are easy to write and can speed up template calls a ton.
You can speed up your site by using output buffering. What this does is use writev() instead of write(). The write() calls were sent to apache as 4kb buffers, where as the writev() calls aren’t.
Another speed up can be accomplished by setting Apache’s SendBufferSize to PageSize. This allows the page to be handed over to the kernel, to be sent, without blocking.
To reduce bandwidth, you may want to look into gzipping the contents of your page. I have seen this shrink 80gb backups down by almost a third the size, except for when most of the contents were images. So you should gain a lot for this if you can afford the overhead of the operations to compress your data.
There are also some simple thinks you can do to speed up your code. To speed up database calls, only query for that data you need. No need to SELECT * when you only need to SELECT id. You should also only query a table once. Get the data you need from it and store it, don’t query it again.
If you are using PHP5 or higher, you may also want to use MySQLi. This new MySQL API is much faster than the old API and includes both a functional and OOP interface. Most applications can be easily converted to use it. Plus, you get support for prepared statements and bind statements.
Optimization can also be made during the design of your database. Make sure you realize the differences between MyISAM and the InnoDB storage engines. MyISAM is very efficient for either very high volume writes or reads, but has table level locking. InnoDB has non-locking reads and row level updates, plus high concurrency.
You may also want to cache query results if they are not expected to update as often. An example I often use for this is CMS systems. Why query all of the blocks you want on one page, when you can cache the results of the original query for 6 hours and have them quickly accessible? Plus, if the owner of the site changes them, just clear the cache…
Now, back to what I’ve been up to. Besides reading up on the above, I have also been messing with my new project for the last two weeks straight. It is amazing how many hacks IE5-IE6 requires. I know I’ve used at least four to get my new site to display correctly. While the thing worked in Firefox, Safari, Epiphany, Konqeror, Opera, and IE7 the _whole_ time.
I hope most people will like the design though. I have shown it to around 20 people on IRC, and only one person hasn’t liked it a lot. So I would say I’ve done pretty good considering this was the first site I had designed entirely in Photoshop and then converted it to CSS/XHTML by hand. The core work for this new project starts this week and will probably continue for the next few months to a year.
Reference for high volume PHP: http://www.oreillynet.com/onlamp/blog/2006/04/digg_phps_scalability_and_perf.html