Link to home
Start Free TrialLog in
Avatar of chsalvia
chsalvia

asked on

Server Side C++

With Java servlets, PHP, JSP and such, I rarely here about server side C++.  But I'm in the process of learning C++ and I like it a lot, and I'm going to be doing a lot of server side programming in the future.  Basically, I'd like some comments from experienced programmers about C++ as a server side language.  Is it worth using C++ in this manner, and how difficult is it to implement server side C++?  (When I say difficult, I don't mean from the point of view of an expert!)  Also, can C++ give you better performance than the above mentioned popular languages when it comes to server side programming?

Thanks.

ASKER CERTIFIED SOLUTION
Avatar of trigger-happy
trigger-happy
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chsalvia
chsalvia

ASKER

Well, I'm interested in creating a searchable database.  I know this can easily be done with PHP - but I was thinking of using C++ to enhance what I can do with submitted queries.  For example, if I want to implement something like stemming, or have a translator, etc.  All this requires a lot of text parsing and I know C++ will always be faster.  However, dbkruger's above comments about memory problems are certainly unsettling.
A little suggestion, if you're going to do a lot of text parsing, then i would recommend that you use perl as it parses text very efficiently

--trigger-happy
dbkruger,

>A pointer in one thread can destroy data in another, and there is no way to stop that except by having code in separate tasks, and that loses you the advantages of code sharing, lightweight context switching, and all the rest.

So basically you're saying that, for example, if I use pointer variables, then if there are multiple queries by multiple users, the various threads could interfere with each other memory-wise?

What if I did something like passing a memory address to a function that takes a pointer variable, like if I type:

func1(&mystring)

and func1 accepts as a parameter:

func1(string *mystring)

You're saying that if there are two threads running, that mystring in one thread could be overwritten by mystring in the other thread?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial