website with c++ backend on Windows server - c++

Background: I have developed a c++ program in Visual Studio which takes a image as input, do some computer vision analysis and then create some results in txt files. Right now I am developing a website as a GUI for the c++ program. So the website will allow user to upload the image to and retrieve the analysis result from the server. And I have already finished the web programming part with wamp in my desktop.
The only problem now is the communication between the frontend website and the c++ program in the backend. I have never worked with server-client system before, so here are my questions:
How do I set up the communication framework between my website and c++ program? How does the website sends a message to c++ when the image has been uploaded and tells c++ where to look for this image? How does c++ send a message to the website when it has finished running? I don't have much time left for this project, so is there any basic web-c++ communication framework that I can download and develop on it?
How does the website check if the c++ program is running without error? How to check the progress in the backend c++ program?
If the user of the websites decides to cancel the previous request, how does the website stop the c++ program when it's already running?
How does the c++ support multiple request from different users? How does the c++ start another instance of the program and run on a different request?
Sorry that I am new to this area. Would really appreciate if someone can answer my questions!

Look at Wt (pronounced "witty", short for web toolkit.) it might provide more than what you want (it also does the web programming for you, but you can link css into it.) but it seems to be around what you want.
I have no personal experience with Wt, but I have tested it and it seems to work very well.
As far as I know, it uses boost.asio as the backend port framework, which might be a place to start if you would like to write your own.

The common practice is C++/CLI wrapper for a native code. You need to design an API for your code and it will be available for using in .NET applications including ASP.NET.

Related

Creating a web app on django with phone calls functionality

So basically i'm developing a piece of software that will allow user to call any number he wants right from the website. So i need some help in choosing the correct platform or semi cheap service to use. I guess i need a solution with open API because i want to make a db entry (want to record duration and date) for every call made from website.
I've started research and stumbled upon couple of open source solutions: Asterisk and FreeSWITCH. Trying them out right now, but i still have poor understanding of how SIP works. If it will be a softphone will the user have need to install it on their pc or there are server solutions
One possible solution that works with any SIP server is to use PJSUA Python bindings and to implement in Python a basic softphone. Thus your web application will be seen by the SIP server just as a regular soft phone and the server configuration is much easier.

Supporting Web Services from a Win/MFC/C++ App

I am looking for the best way to add support for a REST based Web Service to an MFC C++ Application. This is legacy code that has been around a long time.
I need to have the Application provide the Web Service. I've researched this, and the articles are about consuming Web Services in a C++ App. I envision having to monitor a port and respond to the HTTP requests. It would probably make more sense to tie in with WCF and IIS, but I am not sure how to move forward.
I already have a tool of "making" this App into a Windows Service. I realize it would be better to have a "real" app, and this is what I have to work with. There is so much logic in this code and we are limited in development time, so we are taking the fastest approach possible. We also cannot use DCOM, as the Web Service will be called by a Linux based system.
Any suggested articles would be much appreciated.
For C++ you can test two libraries WSF/C and gSoap, another alternative is to develop it with C# and WCF , and communicate between C# and C++ using C++\CLI.
I use the Poco Net c++ library for this as it supports both HTTP client and server functionality. I considered various other libraries including Boost based stuff, but other than Poco I struggled to find everything I needed in one tidy package. It also has some easy to use mutex support which became essential for me as soon as I added a web server front-end to what had previously been a simple single threaded console app. Poco is cross platform but I mainly use it windows and it has served me well to date. I'm not very clued up on MFC so I don't know how it would get on in that department though.

Can you write a Facebook application in C?

What API is available to use Facebook from C or C++, and is there a library to do the grunt work for me? (So that you for instance can use Facebook from a desktop program written in C++.)
Thanks sehe.
Yes you are able to develop Facebook application using C/C++.
Here's a good API http://projects.seligstein.com/facebook/
You can develop a Facebook Application in whatever language you want, as long as you can ask for data over the network. The API does not care what language you are using to query it. The SDKs are only there as a starting point for languages that are commonly used to write applications, such as JavaScript and PHP.
EDIT:
I know the question has already been "answered", but since the asker changed their question, here is information about repositories on github which may serve as starting points for modern Open Graph API C++ applications. All of these are open source :)
https://github.com/search?type=Repositories&language=C%2B%2B&q=facebook&repo=&langOverride=&x=14&y=20&start_value=1
sure you can my facebook Graph mobile app is developed using Qt c++

Host a c++ desktop application on a webpage

I am having a desktop application which having a UI interface made in Qt linked with a library which is doing all the calculation stuff. Values from UI is taken and pass to the API's in the DLL to get the output which is shown on Screen.
Now i want to do the same thing by transferring my application UI to a web page so that people can access the tool from anywhere without any installation process.
I want to retain my c++ DLL code so i don't have to do a lot of work. I am thinking of just converting this DLL to a C++ server by any communication Process(Sockets). I want to host this application on my company's website. (We have to make the website also so we are open to any set of tools).
I want to know what will be the best set of tools to do this stuff. Also there will be lot of data exchange between the webpage and server so the wholething should be optimized also. I goggled a bit and find stuff like silverlight and ASP.NET, But i am still not very clear which option will be more suitable.
I am a c++ programmer with no web application development experience. I am open to learn any new technology.
Thanks
Why not use Qt on the web directly? There are several projects like this one: http://qtwui.sourceforge.net/
There is a netscape plugin that will host a QT application and an ActiveX control wrapper on the QT website. You could use one of those to wrap your application. Note that this approach would require the user (or their administrator) to download and install the plugin.
An alternative approach might be to run your application through a remote desktop such as XVNC, NX or an RDP based layer. IIRC browser based remote desktop clients are available for most such protocols.
A few options:
pick a messaging/queue implementation (like http://www.zeromq.org/) and provide a service
implement a Windows Web Service if you want to be more enterprise friendly: http://msdn.microsoft.com/en-us/magazine/ee335693.aspx
I would not expose the implementation on the internet. Enough to have a simple buffer overflow and the machine can be taken over quickly. Adding a layer between the app and the web provides an easy way to validate input, access, stats ...
You should be able to use your DLL from an wt or cppcms application. Then you do not have to learn something new and can just use C++.
The way I'm currently doing this is with Boost.Python + django

Web interface for c++ applications

Our company has a set of 3d modeling softwares written in c++ with qt based gui. We are planning to offer these applications to customers to try them from a web browser. I mean to say, we need to create web interfaces for native c++ codes. Please suggest me which technology, languages should be used. If possible please give some links to some white papers or case studies for this kind of projects. I am totally clue less :)
Ideally you would keep your c++ code on the server and use a mixture of HTML and Javascript on the browser. However since 3d modeling is so client centric you may have to run some c++ code directly in the browser.
There are a few options to look at:
Emscripten
Adobe Alchemy
Google Native Client
A Java Applet using NestedVM
Netscape plugin API
ActiveX
You could also run a few instances of your application on your server inside an XVnc session and let people use it through a VNC viewer applet. The simplest solution however is still to offer a downloadable demo of your application.
Have a look at Wt
Take a look at Native Client.
Soon you might be use WebGL to do 3D in the browser. But how long it will take for browsers to include it I do not know. But it might be good to look at it to not rule out using it in the future.
If creating everything again is too expensive, always you can create a distributed application:
One program running the main application in C++ and generating (for example) XML files.
A web application reading the XML files generated by the C++ application and translating them into the web application language (for example Adobe Flex).
Good luck!