Web services

T

tony.johansson

Hello!

Is it possible to create and use web services in the C++ language?
I know it's quite easy in Java and .NET.

//Tony
 
G

Guest

Hello!

Is it possible to create and use web services in the C++ language?
I know it's quite easy in Java and .NET.

Of course it is, the easiest way to do that would probably be to use a
library for that specific purpose (just like you would in Java or .Net)
but if you are really hardcore you can probably do if using just low
level APIs provided by your platform. Unfortunately none of those things
are on-topic in this group and I do not know of any good resources about
it either, but some googling should give you something.
 
N

Neelesh Bodas

Hello!

Is it possible to create and use web services in the C++ language?
I know it's quite easy in Java and .NET.

Typically when I read such questions on this forum, I always wonder -
what would be the reason for somebody to insist on C++ for doing
things like web-services / web-application, where (IMHO) there are
plenty of easy-to-use langauges and tools available? Are there any
technical reasons for doing so? Would somebody (in the real world)
really use C++ for writing, say a web application?

-Neelesh
 
T

Torsten Mueller

Neelesh Bodas said:
Typically when I read such questions on this forum, I always wonder
- what would be the reason for somebody to insist on C++ for doing
things like web-services / web-application, where (IMHO) there are
plenty of easy-to-use langauges and tools available? Are there any
technical reasons for doing so? Would somebody (in the real world)
really use C++ for writing, say a web application?

A web service must not be a web application. It can be a component in
a larger software system, perhaps an interface between operating
systems and machines. Sometimes you cannot run a virtual machine on a
given machine because of several reasons. A web service can also be a
part of a larger developement project with own guidelines and
technology policies. And it can happen that you just have no people
familiar with such newer technologies. It can make sense to write a
web service in C++ as well.

T.M.
 
L

Lance Diduck

Typically when I read such questions on this forum, I always wonder -
what would be the reason for somebody to insist on C++ for doing
things like web-services / web-application, where (IMHO) there are
plenty of easy-to-use langauges and tools available? Are there any
technical reasons for doing so? Would somebody (in the real world)
really use C++ for writing, say a web application?

-Neelesh
C++ is used for writing Web applications. In fact the Google Web based
newgroup reader I am using is likely written in C++, or some C++/
Python combination.

However there are few hosting companies that will allow you to deploy
a C++ web application onto their servers, mostly because of security
reasons and because novice app writers can easily crash the process
hosting your service. Imagine what would happen if any of the beans
deployed to JBoss could crash a JBoss instance, or one of those beans
leaked memory, or had a bounds overwrite.

That is why about the only companies writing standard C++ web apps are
doing their own hosting as well. (I'm not sure about the C++/CLI
language, but it is pretty hard to write idiomatic C++ and use
the .NET feature simultaneously)

There no open source C++ Web Service platforms I know of, but here is
a proprietary one http://www.roguewave.com/hydra/hydraexpress.cfm

Lance
 
E

Eric.Malenfant

J

James Kanze

On 2007-10-11 13:05, (e-mail address removed) wrote:
Typically when I read such questions on this forum, I always wonder -
what would be the reason for somebody to insist on C++ for doing
things like web-services / web-application, where (IMHO) there are
plenty of easy-to-use langauges and tools available? Are there any
technical reasons for doing so? Would somebody (in the real world)
really use C++ for writing, say a web application?

At the lowest level, the question would really be the reverse:
would somebody really use any other language for writing
something like Apache, or Firefox? Or any of the other tools
which offer the higher levels of abstraction.

For a web site based on such tools, I imagine C++ still finds
use as a calculation engine, although I don't quite see it being
used to interface directly with the engine; the necessary
infrastructure is missing.
 
J

James Kanze

C++ is used for writing Web applications. In fact the Google Web based
newgroup reader I am using is likely written in C++, or some C++/
Python combination.
However there are few hosting companies that will allow you to
deploy a C++ web application onto their servers, mostly
because of security reasons and because novice app writers can
easily crash the process hosting your service. Imagine what
would happen if any of the beans deployed to JBoss could crash
a JBoss instance, or one of those beans leaked memory, or had
a bounds overwrite.

I'm not sure that's the reason; they'd obviously require your
C++ to run in a separate process. In fact, I think the real
problem is that the executable wouldn't be portable, and they
don't want to guarantee the specific hardware. Upgrade from a
Windows PC with an Intel processor to a Sparc under Solaris, and
all of your Python, Perl, Java, etc. still works (in theory, at
least, and a lot of the time in practice). Where as the .exe
that you generated from C++...
That is why about the only companies writing standard C++ web
apps are doing their own hosting as well. (I'm not sure about
the C++/CLI language, but it is pretty hard to write idiomatic
C++ and use the .NET feature simultaneously)

I'm not sure what qualifies as a "Web" application, and what
doesn't, but we use C++ for all of our back-end transaction
processing. Some of the information is available on the Web,
but we do a lot more than just present information on the Web.
From what little I've seen, most of the so-called Web
applications are mostly really just glue, attaching different
components together. And those components are often written in
C++.
 
C

coal

I'm not sure that's the reason; they'd obviously require your
C++ to run in a separate process. In fact, I think the real
problem is that the executable wouldn't be portable, and they
don't want to guarantee the specific hardware. Upgrade from a
Windows PC with an Intel processor to a Sparc under Solaris, and
all of your Python, Perl, Java, etc. still works (in theory, at
least, and a lot of the time in practice). Where as the .exe
that you generated from C++...

I think that is right, but if a hosting company has multiple exes
running they will be interested in maintaining those customers
through a switch to new hardware or OS. If they already have some
exes running it isn't usually a problem to keep one old machine
around and switch the rest of their machines. That at least buys
you time to find a different hosting company if their new
direction is not of interest to you. This is birds of a
feather winding up together and some hosting companies "deciding"
to support a specific market.
I'm not sure what qualifies as a "Web" application, and what
doesn't, but we use C++ for all of our back-end transaction
processing. Some of the information is available on the Web,
but we do a lot more than just present information on the Web.>From what little I've seen, most of the so-called Web

applications are mostly really just glue, attaching different
components together. And those components are often written in
C++.

I wouldn't say, "just glue." It is super glue.

Brian Wood
Ebenezer Enterprises
 
J

James Kanze

I think that is right, but if a hosting company has multiple exes
running they will be interested in maintaining those customers
through a switch to new hardware or OS.

And the reason they don't allow .exe files is to avoid ending up
in this situation.
 
C

coal

And the reason they don't allow .exe files is to avoid ending up
in this situation.

Most don't, but some do:

http://www.wergittep.com/hosting/features.html
http://www.lfchosting.com/scripts/frameset.cgi?/hosting_packages.shtml

I've seen a few others in the past. A lot of companies seem
to go along with the restrictions and wind up using PERL, PHP,
etc. This is a mistake, in my opinion if they hope to grow
via good customer service. They will eventually either not
make it or wind up switching to another language. It is better
to get started on the right track. It may mean paying a little more
for hosting, and development may take longer as well
(especially when the size of the project is small), but in the long
term they will at least give themselves a shot at having a stable and
efficient website.

I think the situation is similar to supporting multiple client
versions in distributed systems. It isn't ideal, but reality
imposes itself. It is reasonable to expect a certain amount
of continuity from a web host. I don't know of any that have totally
dropped one vendor and started using a new one. And
if they just move to new systems from the same vendor, your company is
probably heading in the same direction. If your
host isn't flexible about maintaining an older system, you
might have to buy a newer system a little sooner than you
thought.

Brian Wood
Ebenezer Enterprises
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,200
Messages
2,571,046
Members
47,646
Latest member
xayaci5906

Latest Threads

Top