Converting caffeine to code, shooting pics, and cruising the roads of life.

Archive for the ‘Programming’ Category

Dealing with Domain Name Parkers

Friday, July 7th, 2006

Well I guess I’ll finally go ahead and make the annoucement of what my new “Web 2.0″ site was suppose to be called, Theed. Over the past few days, I have been trying my darnedest to work with the guy who has it parked. He’s trying to sell it as theED.com (the erectile disfunction for those not familiar with spam). This guy is on his fourth year of trying to sell it.

I emailed him and offered $50 for the one domain name, which he just renewed and pointed out that he would still be making a profit on it. ($8 * 4 = $32). He then comes back with a personal attack on my “IQ” level. I’ll let the following emails speak for themselves:

To: ravi4321@aol.com
Are you interested in selling this domain name? I know it is going on it’s 4th
year for sale. What are you asking for it?

His reply:

From: ravi4321@aol.com
HI CODY

I BUY AND SELL DOMAINS GLOBALLY…AND I HAVE MORE THAN 9200 DOMAINS..
MOST OF MY DOMAINS ARE ON AUTO RENEW.

I HAVE…THE FOLLOWING DOMAINS..

*THEERECTILEDYSFUNCTION.COM*
*THEED.COM*

I CAN MAKE A SACRIFICE IF THE PRICE IS RIGHT.

I SHALL SETTLE FOR *$900*

THANKS.

RAVI

THE*ED * ALSO CAN BE USED FOR EDUCATION.

My response:

To: ravi4321@aol.com
I really only want theed.com, but I’m not paying $900 for it knowing what you just payed last week for it.
The most I would be willing to pay is $50. Would you be willing to sell it for that? It is still almost $30 profit.

His reply:

From: ravi4321@aol.com
HOW MUCH DID U PAY FOR

CODYMAYS.NET

AND WHAT IS YOUR
ASKING PRICE

RAVI4321@AOL.COM

My response:

To: ravi4321@aol.com
It is not for sale.
Do you or do you not agree to the price I offered in the last email?

His reply:

From: ravi4321@aol.com
WHILE
THEED.COM
IS NOT FOR SALE FOR $50…
WWW.CODYMAYS.COM
IS FOR SALE …

RAVI4321@AOL.COM

My response:

To: ravi4321@aol.com
Sir, I hate to break it to you, but it’s definitely not for sale. There is no way I am paying
$900 for one domain name that was purchased for about $8. Right now, you are the only
one at a loss here. I have nothing to lose, but you do because you have renewed the domain
for four years now.

If you accept the $50 payment for it, you will come out ahead, but if you don’t, you’ll stay in the
hole. No one else, obviously, wants this domain name because this is your 4th year of attempting
to sell it.

His response and the beginning personal attack. Notice the above email has no attack on him.

From: ravi4321@aol.com
HI

I BUY AND SELL DOMAINS GLOBALLY.
I DO NOT WANT TO WASTE MY TIME TRYING
TO GAUGE YOUR “IQ”. I LEAVE IT AT THAT.

RAVI

My final email before this post:

To: ravi4321@aol.com
Okay, you’re going to gauge my IQ as lower than your own because I pointed out basic
business logic to you?

Well if we’re judging IQ here, you better get reading a grammar book, because you are
flunking English 101 right now. You see the key marked Caps Lock? Press it so the light
turns off. That will get you started. Hope you have fun in the coming days.

Now, I become another person to ask the international blogosphere for some help here. I know the blogosphere has been pretty powerful with Comcast and AOL over the past few weeks, so I figured I would try it as a last resort. As of right now, my partners and I are very set on this name and really want the domain. Is there anyway we could still go about getting it? Any help would be appreciated.

Note:
We do not want to harm Mr. Ravi. All email addresses provided here are for reference only. Do not attempt to spam him by email or phone number from a whois lookup of theed.com

Managing the load

Sunday, May 21st, 2006

After yesterday’s little brainstorm about PHP memory caches and optimizations, you can guess what I did today. I had to drop memcached for now because I could not get it to compile at all. The config files for autogen had a bunch of binary crap in them so the resulting configure script would not run. That is not to say that good did not come from it though. I ended up downgrading to PHP5 and installing APC.

APC is very nice. The API is definitely the simplest out of all of the PHP memory caches I have looked at, but it lacks the ability to be distributed across different servers like memcached. I have run into some problems though. According to the documentation for APC, apc_load_constants() should return true on success and false on failure, but from everything I have tried tonight, that has not been the case. It has always been false, even when the constants loaded are working, which signifies to me that it actually worked.

I have also moved my new sites management system from Bugzilla to Basecamp. Basecamp is one of the many very idollized Web 2.0 sites from 37signals. The software is just amazing. The use of AJAX is very nice, it’s always were you want it and never where you don’t. Plus, the actual tools the software provides is great, even at the free level. You get very dynamic to-do lists, milestones (work kind of like deadlines), user management, asset stuff, and a whole slew of things I haven’t even played with yet.

My server rack page has also gotten some official recognition in my book. The man behind http://rack.modzone.dk found my project page today and linked to me from his site. Thanks, I really appreciate it!

If anyone has been wondering how to design a website efficiently, I would check out this article. That is pretty much the method I use, except I suck at coming up with such a pretty layout, but I’m definitely getting better with photoshop.

Current Ideas

Saturday, May 20th, 2006

So today I did some more research for my new site. I into memcached and XMPP. You have to admit, for as much as the LiveJournal site is put down in the technology area on the web, they have some really cool technologies that were developed behind the scenes, memcached being one of them. Many people don’t even realise this, but memcached alone is used by many really large sites, such as sourceforge.net and slashdot.org. I will be using it in my new site as well, if things go as planned. (I haven’t messed with it on BSD yet)

XMPP is the really nice XML based protocol that Jabber uses. Not only does it allow secure remote logins, but it can be used from all over the place. To top that off, the actual XMPP or Jabberd doesn’t have to be open to the public pool, how Gtalk was when it first came out.

I REALLY like this protocal and I’m trying to find a nice implementation to play with. If I don’t find one, I will probably strip the JayantHTTPD code base and start reading the RFC for the protocol. Hopefully, I can get a server up and mod it to do authentication from a local database.

Either way, I’ll be playing with it from the web. My new site needs global accounts that can be accessed from around the internet, similar to OpenID. If I can keep this method fast and simple to work with, I’ll be extremely happy.

Oh, and in other news, I have a work-in-progress mockup of the new design for this slum. See it here. Let me know what you think!

High Traffic Web Development

Sunday, April 16th, 2006

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

Jayant Serves!

Saturday, March 18th, 2006

I got the bug worked out of Jayant today. It can now serve 10,000 concurrent requests in a measly 3.7 seconds according to apachebench. :) The bug was that recv was returning 0 due to it receiving no data. I never checked for zero, but only negative one, so the thread would sit in an infinite loop.

A release should be coming soon, I started the subversion repository today and setup the cia.navi.cx hookscripts.

You may have noticed this site was down today for about two hours. I upgraded my server’s php installation and all the modules with it, so hopefully we get some performance benefits, but I doubt it. At least we know there are less bugs in the setup. :)

More tomorrow, for now bed.