[haiku-development] app_server html5 interface

  • From: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Fri, 08 Aug 2014 12:30:23 -0500

At the moment, the html5 target for the app_server is in pretty dire shape. It uses XHR multipart which is obsolete and not implemented by modern web browsers. The html5 target used the GTK+ broadway.js as an example, even this moved to websockets.


To implement websockets, it would require a major rewrite of the http server code in the app_server. (there are a few special handshakes WebSocket connections need which means the simple hacked webserver would need a major overhaul) Given we want a BHttpServer someday in the network kit, i'd say the time would be better spent removing the web server components from the app_server and going with a small external websocket server library embedded in the app_server html5 target.

This would mean though instead of:

   * run  TARGET_SCREEN=html5:8000 StyledEdit
   * navigate to http://127.0.0.1:8000

You would:

   * run TARGET_SCREEN=html5:8000 StyledEdit
   * load up your html + js "Remote viewer"
   * point it to ws://127.0.0.1:8000

This would let us work on the HTML5 canvas renderer until we get some kind of BHttpServer API. I could see the viewer someday getting rolled back into the app_server for convience (and security), but it likely wouln't occur until after we get BHttpServer.

Keep in mind the app_server doesn't open ports until you set TARGET_SCREEN. (and only the applications spawned using TARGET_SCREEN get routed externally.

Thoughts? Keep in mind all of this would remain in a fork until it ran "well enough" to be merged.

-- Alexander von Gluck IV

Other related posts: