C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 2nd, 2002, 09:32 PM
Nox Nox is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 0 Nox User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Nox
Question C or C++ for high-traffic CGI ?

Hi all, I'm new here - just got referred here from an adult webmaster board.

I am interested in writing a CGI app for traffic trading on high-volume websites (300,000+ visitors daily). There already is a couple of good scripts like UCJ, which are either written in PHP, or C. I already have experience with C++ and will work more with it in the next couple of months. Other webmasters told me that C++ wasn't as suitable for that task just because it enabled the developer to write sloppy code and that it was slower overall (which is rather important)... the script will use mysql as its database and not files.

Any suggestions/comments welcome !

Thanks, Nox

Reply With Quote
  #2  
Old April 3rd, 2002, 01:55 PM
CodeBastard CodeBastard is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: Sweden
Posts: 0 CodeBastard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to CodeBastard
I would say that if you are more familiar with C++, then you should use C++.
The risk of writing sloppy code will be greatly reduced when you feel confident with the language you're using.

It is a common misconception that C++ is slower than C. I am sure that someone reading this will be more than happy to challenge my position on this subject, and I am sure they have a lot of fascinating facts about machinecode etc, but todays compilers are very good at optimizing and I really don't think there is that much difference.
Especially when coding CGI I don't think any differences will be noticable.

I'm afraid I don't know exactly what "traffic trading" entails, but these are my 2 cents anyway.

Reply With Quote
  #3  
Old March 7th, 2003, 03:30 AM
operator smooth operator smooth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 61 operator smooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
CGI programs are not better for high-traffic applications that PHP or ASP scripts.

CGI programs are faster for medium-traffic applications, where every script performs a lot of calculations in loops. That could be crypto-stuff like generating huge primes, image processing, parsing complex input data and so on.

Reply With Quote
  #4  
Old March 7th, 2003, 03:33 AM
operator smooth operator smooth is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 61 operator smooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Also, when you are using database servers and stuff like that, they become the bottleneck of you app's performence.

For really high-traffic app, I would use plain text files if possible - SQL based relational databases are kinda slow for that purpose.


By the way, I don't think that you get any difference in performance whether you use C or C++.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > C or C++ for high-traffic CGI ?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap