Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to create a web application and ship it to the clients as a package which would contain an embedded webserver, an embedded db and the compiled code. I want the s/w to be very fast and use less resources as it is going to serve huge load.

I don't want to use Java. Because the clients would need to install JVM, etc.

PHP, I know that it does not compile. (However, I found this : https://github.com/facebook/hiphop-php#readme .....but it doesn't work on windows). Yes it is possible to obfuscate the code but that I don't want.

Python seems to be the best option but I don't know if it is good with ORM and web app development. Also, if the performance is good enough as it is interpreted language.

I just don't have any idea about "Ruby on rails". Does it compile.

Is there a way to develop web-applications in C++. (Again, this would be my last option as it is going to take a lot of time to develop in this lang.)

share|improve this question
Any "compile a binary" language will not be cross platform. For that matter, bundling mysql isn't going to be cross platform either. – MichaelT Feb 5 at 1:01
@MichaelT Java??????? – Mathew Foscarini Feb 5 at 1:05
Thanks michael, I don't want the package to be cross-platform. I want't the language to be cross-platform(so that it compiles for both Linux and Windows.) – Anish Singh Feb 5 at 1:43
1  
I'm not sure that you'll get better results serving a "huge load" with an embedded webserver and an embedded db than you would with a "real" webserver and db. – Carson63000 Feb 5 at 2:28
1  
As it stands, this question is a "what technology should I use" which is a poor form for the Q&A format (there are many technologies that can be used in any situation). This sort of question is off topic as mentioned in the FAQ. – MichaelT Feb 5 at 2:33
show 1 more comment

closed as not constructive by MichaelT, Jim G., Walter, ElYusubov, FrustratedWithFormsDesigner Feb 5 at 4:09

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

3 Answers

Sounds like what you actually should make is a virtual appliance. A virtual appliance is a single file, which is a virtualized server OS that has whatever you need contained within it: DB, webserver, your app, etc.

Sounds like you need an appliance of a LAMP (Linux, Apache, MySql, PHP) stack with your app all set up on it. Your client gets your virtual appliance and drops it on any virtual host they have, or into the cloud, and they're up and running on the spot. They can even run it on any desktop or server by downloading the (free) VirtualBox, a software virtualization host that runs on windows, mac, linux, and solaris.

This isn't exactly the method you're asking for, but it does meet the requirements you're stating. You'll also find it's more robust, and it's what business is all talking about lately (cloud, virtualization, etc.).

share|improve this answer

I like how you define your problem and then immediately reject the most common solution Java. This is what Java was designed for.

You can use Zend Gaurd to encode PHP, and if you use Zend Server it will cache the decoded byte code so there is no overhead in encoding it.

share|improve this answer
Thanks Mathew, but if I use PHP then how will I ship it as a one single package which would contain a webserver, an embeded db and of course the code. – Anish Singh Feb 5 at 1:36
3  
Honestly, I would ship a virtual machine. Maybe a VMWare image of a pre-configured appliance, but don't give the client root access. You can run VM machines on just about all platforms. – Mathew Foscarini Feb 5 at 1:41
@MathewFoscarini a virtual machine is a good idea. – MichaelT Feb 5 at 2:26

To answer your answerable question first: yes, you can develop web apps in C++. No, you don't want to. It doesn't tie in well to web servers and you likely don't have the skill set necessary to write a high performance web server yourself.

See


I don't want to use Java. Because the clients would need to install JVM, etc.

Every solution involves some installation of something. Php runs within a web server (like apache - that would need to be installed). Python interpreter needs to be installed. Ruby would even more likely need to be installed than python on a linux system. Neither Ruby north Python themselves are able to serve web requests (unless you build a web server in there, but thats poor performance... I'll get to that) which means installing, again, a web server of some sort.

PHP, I know that it does not compile. ... Yes it is possible to obfuscate the code but that I don't want.

Php, python, and ruby are all interpreted languages. Obfuscating the code is a hinderance, but not something that would seriously stop a person who wants to look at how things run under the covers. It isn't really a problem either for someone to disassemble a compiler binary.

I want to create a web application and ship it to the clients as a package which would contain an embedded webserver, an embedded db and the compiled code. I want the s/w to be very fast and use less resources as it is going to serve huge load.

You really need to determine what load you are going to have (that should be part of the client's specs in terms of pages per second). What sounds like a huge load may be laughably small when one actually benchmarks the server. On the other hand, if you are building your own web server, even a small load may be too much.

Trying to come up with some abstract "I want a single deployable that does everything" is a poor requirement that you really need to rethink.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.