I've read that Quora and Facebook use C++ in the backend. Both of them process and fetch big amounts of data. What libraries do they use for that? Did they develop them?
Facebook is known to have been written in php but now the php code is used to generate C++ code. To do that, they developped a converter tool named HipHop that you can use yourself (Open source AFAIK).
I don't know about quora.
Amazon.com does use C++ but it's, AFAIK, their own code, not a library.
If you're interested in C++ web applications, you should try CPPCMS.
Related
I'm aware there is no official C++ library for Parse (https://parse.com). I've got a desktop variant of an app written using Qt C++ for OSX/Windows that needs to talk to Parse. I'm embarking on writing my own client for the Parse REST API based on the PHP library (https://github.com/apotropaic/parse.com-php-library) and the Qt network classes. Would you recommend a different approach?
The data I am saving is pretty basic, some objects and some geo data, but it would be nice to have a general solution to share with others. I will happily release whatever I come up with via GitHub, and all the better if this can lead to a group of us sharing the load.
Cheers!
I do computational research with a C++/CUDA library that does intensive number crunching. Recently I was thinking to set up a little showcase of my library on my webpage where people could work interactively with the library and see the results (plots, animations, etc.) in real time.
I have very limited html and website creating expertise. Are there libraries out there to link the html front-end to the C++/CUDA back-end? I'm developing in Linux environment but obviously I'd like my webpage to be accessed by anyone independent of their OS and/or browser.
So after a little bit of research I found the Wt library which is written in C++ and used for webpage development. Based on the information on their homepage, it seems to be exactly what I'm looking for:
Typical use scenarios:
High performance, complex web applications which are fully personalized (and thus cannot benefit from caching), fully Ajax enabled and at the same time entirely accessible and Search Engine Optimized.
Web-based GUIs for embedded systems benefit from the low footprint of a C++ web application server.
Web-based GUIs that require integration with (existing) C++ libraries, for example for scientific or engineering applications, or existing C++ desktop applications
I did something like this. To do this, I used a simple library I wrote called jrb_node at https://github.com/kennethho/jrb_node
There are other libraries like cppnetlib http://cpp-netlib.org/
Basically you make a small http server that based on the request will perform some computation and return the results as an http response. You can then combine that with javascript and Ajax if you want to make it more interactive.
An alternative to consider is to use WebCL. CUDA is pretty similar to OpenCL and it should be pretty easy to convert your code to the latter. If you have other C++ code, that might be a bit of problem though.
Do you want to run CUDA on server (e.g. the users will input the parameters, push a button and your server will do number crunching) or on client (e.g. it will be user GPU that does computations)?
For server-side you should be able to use pretty much any server technology - PHP, JSP, etc. They all provide a way to integrate to "native code".
For client-side you will not be able to do with just HTML - you need to use some "fat client" technology - e.g. ActiveX, Java applet. I do not know if Silverlight or Flash have access to native code. IMHO, you might as well just write a Qt application and put a download link on your site.
I have a some web services that my app needs to communicate with by sending json with REST over HTTP POST/GET. The only way I can see to do this is with the iXMLHTTPRequest2 framework but geeze oh man is it uglier than I want to deal with.
Is this the only option I have to look at with c++?
Would this be easier with c#? I know most of the things are the same across the languages, but if c# has a better way to do this, I'd be willing to make the jump.
You should also look into Project Casablanca - it's a fully native C++ library that also is adapted for use with Metro apps (I believe it wraps IXHR2). I've been using it to perform http REST calls and to parse JSON very successfully.
That's the interface you have to use in C++. It is more difficult than in C#. Given that, there is a good sample that will make using that interface a bit more bearable.
I am planning to use yui or jquery ui as front end for native c++ applications. I found no bindings present for this purpose. Will it be feasible/possible to do this ? If it is so, then how shall i proceed? please suggest advice.thanks
#rwik - I can see your point and desire to do what you intend and I would presume it to be a wise move to be making at this point in time considering the vast facilities browsers bring to the table as well as other aspects... I know we are in September now and I have come across this pretty late, but this is also for others who have a similar problem...
As far as I know, descending from JavaScript in to C++ is pretty murky, mostly due to the heterogenous nature of Javascript engines [Rhino, Tracemonkey, Spidermonkey, V8, Caracan,Charka, etc] employed by different browsers. But there are indeed ways to do this - depending on how dirty you want to get your hands and, indeed, on your abilities...
If you were to go with Google as a browser, you should take a look at projects such as cproxyv8 - http://code.google.com/p/cproxyv8/ or v8-juice - http://code.google.com/p/v8-juice/ which both offer interesting facilities...
My preference however is with Mozilla - simply because of XML User-Interface Language (XUL) which, if you do not know, allows you to speedily create your own user interfaces by giving direct access to its layout engine. I.e., you can even do away with the browser look and have your own independent layout while still having all browser facilities at your disposal.
With respect to C++/Javascript interaction - projects should exist for all alternatives - it pays to check.
I wish you good luck if you haven't already solved this problem.
I'd recommend QT instead.
However since native C++ has nothing to do with GUI I'm going to assume you are making a library in C++. However Yui is basically just JavaScript as is jQuery. So if you're asking can a web page or script be a C++ application the answer is not really.
What you could do is create a web service which uses your C++ library and exposes an interface for your web based application to call it indirectly.
One way to accomplish this is to embed WebKit into your application and provide your custom C++ functionality via a plugin. Both the WebKit framework on OSX and the Chromium Embedded Framework on Windows allow this style of application development. This allows you to write a UI using local Javascript/HTML files without the need for a webserver.
There are no direct bindings in JQuery and YUI because these libraries run in a web browser. Thus unless you’re planning to write your own browser plugins, the integration with the C++ will happen at the webserver that serves the data to the browser.
You could feed the data from your C++ code directly into JQuery/YUI by building web services directly in C++. But you might want to build a web application that will be serving your JQuery/YUI pages and that act as user interface controller (like in the MVC pattern). Web application languages like Java, PHP, etc. all have ways to call native code. Java has JNDI and in PHP you build extensions that link to C++ code.
I'm a computer science student with experience in C/C++ and I want to have a go at developing
a simple facebook app. Can anyone recommend a good website and/or editor?
Is it doable with C++ or do I need to learn another language?
Thanks
I assume that you are talking about an internet application.
For the front end (client side), you will need something to enhance your web pages (in Javascript, for example). For the back end (server side), you will need to make database queries so you will need to know SQL as well.
No, I don't think C/C++ is enough.
I would suggest that you investigate some other languages such as PHP or ASP.Net.
It sure is doable in C++. I recommend though that you first write a small Facebook client API in a scripting language so you can do some quick and dirty testing while getting familiar with how the API works. This will save you a lot of frustration when trying to write the C++ version.
As editor I recommend Visual C++ Express Edition if you are using Windows, XCode if you are using Mac, and on Linux I'd use Vim (if that is your cup of tea).
A good website? The Facebook API docs pages of course!
i Released c++ facebook graph api client as open source
check it out here :
facebook-cpp-graph-api
Python might be worth considering.
The Wiki might not be a bad place to start on it.
(There are a couple of link to Tutorials in there)
Facebook Developers Wiki
check this c++ graph api as open source you can download it and use it
its handling login/authentication sequence with the Qwebkit:
http://code.google.com/p/facebook-cpp-graph-api/