Using OF app for website

Hi: I like to use openFrameworks and has been using for 2 years. Is there any good advice on putting OF app on some linux server from commercial hosting services? What I want to do is to create a website so that people can run my openframework app from their browser. So the OF app has to be hosted in the server and communicate with data from the browser. Is there any commercial available hosting services out there that is good for doing this?

Thanks.
Eric

since version 0.9 openFrameworks has support for emscripten which will compile your application to javascript and run natively in the browser. if you really need communication from the application to some server then you could use websockets or even just http if the data rate is smaller.

take a look at the setup gude for emscripten in the downloads page

2 Likes

Thanks for your advice! Good to know.

My concern is if using webGL, and I am using some openGL calls and shaders etc, that might depends on the openGL versions and graphic card behaviours, will it be hard to control what users going to see, as I don’t know what graphic card they are using. That’s why I prefer more to have the OF app running on server, so that I can test it and have more control. But I am not that familiar with the server side, say I know how to send some data from browser to the OF app on server, but then how to show the graphic result of the OF app back on the browser. And you aware is there any web hosting provider good for doing hosting it.

Thanks very much!
Eric

you would need to send the video output of the application to the clients which seems pretty overkill. the only similar thing that comes to mind is http://www.twitch.tv/ but doesn’t allow to interact with the application. you could send the video out from the application itself using gstreamer or some other streaming library. also even if you managed to do so the latency between sending any input and receiving the corresponding video out owuld be really big so if you are thinking on any kind of interactive application it would have too much laterncy to be usable.

Hello, is it possible to use emscripten under windows?
I tryed with msys2 but i get something like

C:\WorkSpace\of_v0.9.0_msys2_release\examples\3d\3DPrimitivesExample>emmake make
run
process_begin: CreateProcess(NULL, uname -s, …) failed.
HOST_OS=
process_begin: CreateProcess(NULL, uname -m, …) failed.
HOST_ARCH=
process_begin: CreateProcess(NULL, uname -m, …) failed.
process_begin: CreateProcess(NULL, uname -m, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
process_begin: CreateProcess(NULL, uname -s, …) failed.
C:/WorkSpace/of_v0.9.0_msys2_release/libs/openFrameworksCompiled/project/makefil
eCommon/config.shared.mk:97: *** This makefile does not support your operating system. Stop.

Does anyone have experience with emscripten and windows? :smiley: