Re:Gtk3 on a HTML5 backend
by kragen on Tuesday November 23, 2010 @06:58PM
(#1935889)
Does anyone else remember the X11 browser plugin? It was an X server that ran as a plugin in Netscape and IE, with a little bit of magic ("xrx") to handle authentication to the web server. So you could visit a web page and start running, say, FrameMaker in your browser.
This was in 1996, in the X11R6.3 release ("Broadway"), the same release they came out with LBX, the low-bandwidth extension to X, so that you could run your X11 apps over a modem with reasonable throughput.
It never got much adoption. I don't really know why. My guess, though, is that it didn't address the real reasons people were moving from X11 to browser apps: server load, security, ease of administration, latency-tolerance, and ease of development.
Today, server load and latency tolerance are a lot less important than they were in 1996, because computers are a hundred times faster and hundreds of millions of people have ping times under 20 milliseconds, ten times faster than you'd get on a modem.
But security, ease of administration, and ease of development are a lot more important now than they were in 1996.
So, I suspect this won't get widely adopted, but it could go either way. I hope it does!
Re:Gtk3 on a HTML5 backend
by loewenskind on Wednesday November 24, 2010 @03:16AM
(#1936833)
Why would someone implement such an awful protocol as X11 when they could just directly render. They could make application-level X11 clients for legacy X apps running on some server somewhere if they wish, there's no reason to cripple the whole experience with X11.
Re:Gtk3 on a HTML5 backend
by kragen on Wednesday November 24, 2010 @04:57AM
(#1936964)
It's hard to understand your question because the quality of its writing is as poor as its punctuation. Can you clarify? What do you mean by "directly render", "application-level X11 clients", "they", and "server"?
Perhaps you were suggesting that remotely displaying a window of, say, FrameMaker in your browser would be better done by rasterizing the application window on the same machine where FrameMaker was running, as with Xvnc, only as a browser plugin.
That is indeed a workable and fairly simple solution, but it usually uses a lot more bandwidth on the network and memory on the machine running FrameMaker than just running X11, particularly with LBX or ssh compressing the X11 protocol.
Re:Gtk3 on a HTML5 backend
by ramchip on Wednesday November 24, 2010 @12:26PM
(#1937939)
When asking a question, you should use a question mark. Your last comma should be a colon or semicolon, or even better, you could split the sentence in two.
I find it perfectly readable anyway, but I'm quite sure the comment is technically right.
Re:Gtk3 on a HTML5 backend
by loewenskind on Wednesday November 24, 2010 @01:05PM
(#1938055)
Using a period instead of a question mark is a writing technique to imply that the question isn't really a question (most commonly used to form polite but firm requests). Touchè on the [semi]colon.
Re:Gtk3 on a HTML5 backend
by crizCraig on Tuesday November 23, 2010 @11:12PM
(#1936475)
Minimizing latency is still very important in mobile, times of network congestion, and the many places around the world that still have slow connections.
HTML also has the benefits that it's indexable and semi-open-source.
So I hope this is not widely adopted, but it would be awesome for porting existing apps and maybe replacing Flash in some instances.
Re:Gtk3 on a HTML5 backend
by sedachv on Tuesday November 23, 2010 @06:22PM
(#1935804)
(re-posting my comment from the blog because I want to hear people's opinion)
This is extremely useful for getting apps written for the desktop to run on the browser for remote access and virtualization.
I don’t know if there are any companies with GTK3 desktop apps that need this right now, but for the past six months I’ve been working on doing exactly the same thing for JazzScheme (http://jazzscheme.org/). JazzScheme has its own widget set and UI library that runs on top of Cairo. Instead of sending bitmap data across I’m providing a thin indirection layer on top of Cairo surface and HTML 5 canvas (they’re almost identical in terms of drawing commands).
We’re using it for a pretty involved business app that needs a desktop version. Doing a web version any other way would have been a complete nightmare.
Re:Gtk3 on a HTML5 backend
by albertzeyer on Tuesday November 23, 2010 @09:02PM
(#1936210)
The technical description:
Each toplevel window is mapped to a canvas element, and the content in the windows is updated by streaming commands over a multipart/x-mixed-replace XMLHttpRequest that uses gzip Content-Encoding to compress the data. Window data is pushed as region copies (for scrolling) and image diffs. Images are sent as data: uris of uncompressed png data.
Input is gathered via dom events and sent to the server using websockets.
This doesn't really sound that impressive. It's kind of cool and you could also do the same and port some RDP or VNC client over which would be even cooler. But I don't really feel that this is the way to go. It would be much nicer if the native HTML widgets would be used.
Re:Gtk3 on a HTML5 backend
by tjpick on Tuesday November 23, 2010 @10:39PM
(#1936403)
I personally don't give much of a crap about native HTML. That's just a transport, and let's face it, for doing apps it's shit. What I would want it to have is deep linking, back button behaviour and the other nice bits of HTTP.
Re:Gtk3 on a HTML5 backend
by pornel on Wednesday November 24, 2010 @05:53AM
(#1937026)
HTML5 allows making any element focusable and supports ARIA that exposes custom elements to accessibility API, so you can make pretty good custom widgets using DHTML.
Re:Gtk3 on a HTML5 backend
by DanielRibeiro on Tuesday November 23, 2010 @05:16PM
(#1935606)
Now this is getting serious. I was considering porting xul for web apps (with the default and obvious coffeescript dsl, so that no xml verbosity would be needed), but gtk3 is even more outstanding. Any idea when it will be out?
Re:Gtk3 on a HTML5 backend
by olalonde on Tuesday November 23, 2010 @08:03PM
(#1936072)
How come is the UI so responsive (much more than what I'm used to with remote X sessions)? Is it because both the app and the HTTP server run on the same machine?
Re:Gtk3 on a HTML5 backend
by seanalltogether on Wednesday November 24, 2010 @03:11AM
(#1936831)
The biggest gotcha with these kinds of demos is, and always will be, keyboard input. Unless browser vendors are willing to relinquish all keyboard controls for a special kind of popup window, HTML5 VNC type solutions are dead in the water.
Re:Gtk3 on a HTML5 backend
by pixelbath on Tuesday November 23, 2010 @05:43PM
(#1935682)
It looks cool, but (and please forgive my ignorance in this subject)...
Isn't this the sort of thing X was built for? Client rendering, but the underlying app in a remote server? How is rendering this in the browser more useful/cool?
Re:Gtk3 on a HTML5 backend
by sedachv on Tuesday November 23, 2010 @06:20PM
(#1935797)
Getting X tunneled over HTTP is actually pretty complicated:
* The client/server thing is reversed
* X expects everything to be fully asynchronous (WebSockets get a lot of hype but they're pretty useless at this stage IMO)
* XRender is a big mismatch to canvas drawing API (the old X drawing protocol is in some ways better, in many ways (esp. color) much worse)
Re:Gtk3 on a HTML5 backend
by tjarratt on Wednesday November 24, 2010 @01:37AM
(#1936689)
I'm not an expert, but I believe this to be correct - the contents of the canvas elements are created/managed by javascript, so they would likely appear empty to most spiders.
Additionally, I don't believe there is any good way to crawl the contents of a canvas element - the best you can get from it is an image representation as a data uri, so no text or html elements with semantic meaning.
Re:Gtk3 on a HTML5 backend
by drivebyacct2 on Tuesday November 23, 2010 @07:22PM
(#1935965)
I was just lying on the couch thinking about this idea. Well, I have much larger, grander idea that is a mix of Palm/HP's new Mocha platform and some play at ubiquitous interfaces and data powering apps on many devices simultaneously. I was thinking though, that some of the frontends for rtorrent look neat, but still fail to look native.
What if the browser exposed the GTK resources and allowed web applications to render using the same visual components as native applications on the platform. That'd be sweeet.
There's a guide to getting it set up still alive at http://www.csn.ul.ie/~caolan/TechTexts/Broadway.html
This was in 1996, in the X11R6.3 release ("Broadway"), the same release they came out with LBX, the low-bandwidth extension to X, so that you could run your X11 apps over a modem with reasonable throughput.
It never got much adoption. I don't really know why. My guess, though, is that it didn't address the real reasons people were moving from X11 to browser apps: server load, security, ease of administration, latency-tolerance, and ease of development.
Today, server load and latency tolerance are a lot less important than they were in 1996, because computers are a hundred times faster and hundreds of millions of people have ping times under 20 milliseconds, ten times faster than you'd get on a modem.
But security, ease of administration, and ease of development are a lot more important now than they were in 1996.
So, I suspect this won't get widely adopted, but it could go either way. I hope it does!
Perhaps you were suggesting that remotely displaying a window of, say, FrameMaker in your browser would be better done by rasterizing the application window on the same machine where FrameMaker was running, as with Xvnc, only as a browser plugin.
That is indeed a workable and fairly simple solution, but it usually uses a lot more bandwidth on the network and memory on the machine running FrameMaker than just running X11, particularly with LBX or ssh compressing the X11 protocol.
I find it perfectly readable anyway, but I'm quite sure the comment is technically right.
This is extremely useful for getting apps written for the desktop to run on the browser for remote access and virtualization.
I don’t know if there are any companies with GTK3 desktop apps that need this right now, but for the past six months I’ve been working on doing exactly the same thing for JazzScheme (http://jazzscheme.org/). JazzScheme has its own widget set and UI library that runs on top of Cairo. Instead of sending bitmap data across I’m providing a thin indirection layer on top of Cairo surface and HTML 5 canvas (they’re almost identical in terms of drawing commands).
We’re using it for a pretty involved business app that needs a desktop version. Doing a web version any other way would have been a complete nightmare.
Each toplevel window is mapped to a canvas element, and the content in the windows is updated by streaming commands over a multipart/x-mixed-replace XMLHttpRequest that uses gzip Content-Encoding to compress the data. Window data is pushed as region copies (for scrolling) and image diffs. Images are sent as data: uris of uncompressed png data.
Input is gathered via dom events and sent to the server using websockets.
This doesn't really sound that impressive. It's kind of cool and you could also do the same and port some RDP or VNC client over which would be even cooler. But I don't really feel that this is the way to go. It would be much nicer if the native HTML widgets would be used.
http://labs.qt.nokia.com/2010/06/25/qt-for-google-native-cli...
There's also the QWebClient which does not need a plugin, but also does not look very beautiful or native.
http://labs.qt.nokia.com/2009/09/18/qt-in-the-cloud-with-qwe...
You can, in theory, use the higher-level hints given at the toolkit level to optimize the bits sent for each toolkit API invocation.
Isn't this the sort of thing X was built for? Client rendering, but the underlying app in a remote server? How is rendering this in the browser more useful/cool?
(edit: typo)
* The client/server thing is reversed * X expects everything to be fully asynchronous (WebSockets get a lot of hype but they're pretty useless at this stage IMO) * XRender is a big mismatch to canvas drawing API (the old X drawing protocol is in some ways better, in many ways (esp. color) much worse)
Check out http://280atlas.com/
Additionally, I don't believe there is any good way to crawl the contents of a canvas element - the best you can get from it is an image representation as a data uri, so no text or html elements with semantic meaning.
What if the browser exposed the GTK resources and allowed web applications to render using the same visual components as native applications on the platform. That'd be sweeet.