[GRASS-dev] GSoC 2014: GRAS GIS Web UI

Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

Regards,
Rashad

Rashad,

···

On Thu, Mar 6, 2014 at 10:28 AM, Rashad M <mohammedrashadkm@gmail.com> wrote:

Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

FWIW, I like this idea and would like to see it developed. Do you have a prototype already?

Thanks,

madi

Best regards,

Dr. Margherita DI LEO
Scientific / technical project officer

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

Hi Margherita,

I do have a proof of concept quite old now. No recent updates. But I hope GSoC will be able to change the current situation and move it upfront

https://www.youtube.com/watch?v=B71DQiCw86o

···

On Thu, Mar 6, 2014 at 3:17 PM, Margherita Di Leo <dileomargherita@gmail.com> wrote:

Rashad,

Regards,
Rashad

On Thu, Mar 6, 2014 at 10:28 AM, Rashad M <mohammedrashadkm@gmail.com> wrote:

Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

FWIW, I like this idea and would like to see it developed. Do you have a prototype already?

Thanks,

madi

Best regards,

Dr. Margherita DI LEO
Scientific / technical project officer

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

Hi Rashad,

web GRASS is certainly something we need and I’m very excited about that. But there are several things which should be considered to make this project successful.

First, there is already one (desktop) GUI. Do we want to have (an maintain) another GUI? Is there a possibility to share the code between the desktop and web GUI? What about limiting the functionality of the web GUI to minimum, so that there will not much code to maintain and (as defined) nothing to add?

Second, if we would decide to go the way of the full GUI (which resembles current wxGUI), wouldn’t be better to use something like GTK+ GDK Broadway (1) to just reuse the desktop GUI on web, or to reuse web GUI on desktop (some web view or browser with local web pages and processes)? Although GTK+ and some wxWidgets applications can run with Broadway backend, wxPython, and especially GRASS is still far from running that way. However, there are some (perhaps even more interesting) alternatives such as Ulteo and noVNC. And I’m wondering what rollapp.com is using.

Third, the GUI is not the only part. The GUI is supposed to be a part of some server/cloud infrastructure. You need to upload data, sign in users… And also we are not sure what are the security issues of using GRASS on server with unlimited access (i.e. you can run anything you want as opposed to predefined processes in WPS).

Fourth, the processing on server could be also invoked from a desktop GUI. This would require user to install the desktop GUI but the processing part would be placed on server. This is just another option.

Fifth, the choice of the GUI framework is important. We don’t want to tight this to some project which will not be here in few years. Wt has nice examples and your (Rashad’s) experience is big plus. But there is many others such as Dabo and some of them might be better for us since they are using Python, so we could share some code with wxGUI. Results on mobile platforms must be evaluated, too.

And finally, a sustainability of the new web GUI must be considered. What will happen after the GSoC? There already were several GRASS web interfaces starting with GRASSLinks in 1995 and also we have some web sites using GRASS in background but they are not general GRASS GUI (e.g. http://www.gapserve.ncsu.edu/segap/segap/). Minimizing duplication with the desktop GUI seems crucial and merging this to GRASS and developing other infrastructure, too.

I don’t want you to feel overwhelmed by all of these considerations but I was thinking about this topic for some time, so I collected some ideas and now is the time to share them.

Vaclav

PS: I just saw your video, congratulations, it looks good and responsive. Is the code somewhere online?

···

On Thu, Mar 6, 2014 at 4:28 AM, Rashad M <mohammedrashadkm@gmail.com> wrote:

Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

Regards,
Rashad


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi Vaclav,

···

On Thu, Mar 6, 2014 at 5:08 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Hi Rashad,

web GRASS is certainly something we need and I’m very excited about that. But there are several things which should be considered to make this project successful.

First, there is already one (desktop) GUI. Do we want to have (an maintain) another GUI? Is there a possibility to share the code between the desktop and web GUI? What about limiting the functionality of the web GUI to minimum, so that there will not much code to maintain and (as defined) nothing to add?

This is the rather important part and we do want to reuse the code from core classes.

Second, if we would decide to go the way of the full GUI (which resembles current wxGUI), wouldn’t be better to use something like GTK+ GDK Broadway (1) to just reuse the desktop GUI on web, or to reuse web GUI on desktop (some web view or browser with local web pages and processes)? Although GTK+ and some wxWidgets applications can run with Broadway backend, wxPython, and especially GRASS is still far from running that way. However, there are some (perhaps even more interesting) alternatives such as Ulteo and noVNC. And I’m wondering what rollapp.com is using.

I am interested to use Wt, not because of C++ and its recent Python love, because the idea of Widget centric, security of Wt apps (very much safe than any other web framework), embedded platform support. and so on. The main idea behind the birth of Wt is they want a web application to run on Web browser and embedded platforms (Android and others). The code is written in python or C++, webserver (Wthttp) renders a bunch of AJAX code and compatible with any recent browsers and it takes care of the some browser related stuff like special css prop for webkit and mozilla. And of course there is no code conversion or generation from a c++ to html/js script. Indeed I am allowed to use as much as javascript code. In the demo you can see openlayers widget!

When you write:

WButton *button = new WButton();

Wt makes the css for Wbutton which it has and provide a very decent and easy access to render it on browsers. I would rather stop here talking about Wt before it turn into a name drop of the toolkit which I dont want to do.

Third, the GUI is not the only part. The GUI is supposed to be a part of some server/cloud infrastructure. You need to upload data, sign in users… And also we are not sure what are the security issues of using GRASS on server with unlimited access (i.e. you can run anything you want as opposed to predefined processes in WPS).

IIUC, you mean security of the data right?. WebGRASS project is not about providing server infrastructure to preserve the data. Of course it wont allow to get other users data and in my plan users will have access to their own location rather than anyone can use everyone’s data. And sensitivity of data uploaded is a question and you never publish such kind of data under NDA or so in public server right? And you cant access a data on server even when you render it on browser screen. That is what mapserver, Openlayers and other web map viewer are doing.

Fourth, the processing on server could be also invoked from a desktop GUI. This would require user to install the desktop GUI but the processing part would be placed on server. This is just another option.

I am not clear with this. Why do you need to invoke a desktop interface for running a webapp. I did had a the demo version running on server with no X server.

Fifth, the choice of the GUI framework is important. We don’t want to tight this to some project which will not be here in few years. Wt has nice examples and your (Rashad’s) experience is big plus. But there is many others such as Dabo and some of them might be better for us since they are using Python, so we could share some code with wxGUI. Results on mobile platforms must be evaluated, too.

There has been a python binding for Wt and myself and massmio had tried these successfully. The support for bindings are not much, I would say but I had a pretty much idea about how its generated which BTW is not using swig and SIP. Regarding mobile platforms I do had a working apk of another Wt application for which I got a recording on youtube[1] (offline android). [2] is the web version. The patch required for me was very minimal as Wt compiles clean on Android. [1] also used libgdal (Android). This one just renders a shapefile and style it without OpenLayers or its friends

And finally, a sustainability of the new web GUI must be considered. What will happen after the GSoC? There already were several GRASS web interfaces starting with GRASSLinks in 1995 and also we have some web sites using GRASS in background but they are not general GRASS GUI (e.g. http://www.gapserve.ncsu.edu/segap/segap/). Minimizing duplication with the desktop GUI seems crucial and merging this to GRASS and developing other infrastructure, too.

Of course sustainability is considered and I was hoping it would last forever and becoming a good addition to GRASS GIS as previous year’s GSoC projects.

I don’t want you to feel overwhelmed by all of these considerations but I was thinking about this topic for some time, so I collected some ideas and now is the time to share them.

[1] https://www.youtube.com/watch?v=7giSheeVgnM (on emulator)
[2] https://www.youtube.com/watch?v=v7jtsJXPhXU

Vaclav

PS: I just saw your video, congratulations, it looks good and responsive. Is the code somewhere online?

Regards,
Rashad

On Thu, Mar 6, 2014 at 4:28 AM, Rashad M <mohammedrashadkm@gmail.com> wrote:

Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

Regards,
Rashad


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi Rashad and Vaclav,

If you allow me a user comment: The video looks very, very promoising.

In our institution we are running GRASS on an Ubuntu Server which users access graphically either through either TightVNC or CYGWin-X. What I like about the Server solution is the “work where your data is” concept (even if server ressources may be smaller when shared by several users, compared to modern single user desktop PCs). I also perceive GRASS`s mapset concept as very useful for multi-user environment and data sharing (maybe except for the ownership check which hampers usage of mapsets by groups of people (I know there are workarounds (e.g. goup users as owners or overriding the ownership check in GRASS 7)).

On the same Server we also have an RStudio-Server running which would be comparable to your webGRASS-solution.

Our experience with RStudio Server is very positive, so I would appreciate such a solution for GRASS (though TightVNC and CYGWin-X are fine too)…

The main advantage is (from my point of view) that users do not have to install additional software…

Cheers

Stefan

···

Hi Vaclav,

On Thu, Mar 6, 2014 at 5:08 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Hi Rashad,

web GRASS is certainly something we need and I’m very excited about that. But there are several things which should be considered to make this project successful.

First, there is already one (desktop) GUI. Do we want to have (an maintain) another GUI? Is there a possibility to share the code between the desktop and web GUI? What about limiting the functionality of the web GUI to minimum, so that there will not much code to maintain and (as defined) nothing to add?

This is the rather important part and we do want to reuse the code from core classes.

Second, if we would decide to go the way of the full GUI (which resembles current wxGUI), wouldn’t be better to use something like GTK+ GDK Broadway (1) to just reuse the desktop GUI on web, or to reuse web GUI on desktop (some web view or browser with local web pages and processes)? Although GTK+ and some wxWidgets applications can run with Broadway backend, wxPython, and especially GRASS is still far from running that way. However, there are some (perhaps even more interesting) alternatives such as Ulteo and noVNC. And I’m wondering what rollapp.com is using.

I am interested to use Wt, not because of C++ and its recent Python love, because the idea of Widget centric, security of Wt apps (very much safe than any other web framework), embedded platform support. and so on. The main idea behind the birth of Wt is they want a web application to run on Web browser and embedded platforms (Android and others). The code is written in python or C++, webserver (Wthttp) renders a bunch of AJAX code and compatible with any recent browsers and it takes care of the some browser related stuff like special css prop for webkit and mozilla. And of course there is no code conversion or generation from a c++ to html/js script. Indeed I am allowed to use as much as javascript code. In the demo you can see openlayers widget!

When you write:

WButton *button = new WButton();

Wt makes the css for Wbutton which it has and provide a very decent and easy access to render it on browsers. I would rather stop here talking about Wt before it turn into a name drop of the toolkit which I dont want to do.

Third, the GUI is not the only part. The GUI is supposed to be a part of some server/cloud infrastructure. You need to upload data, sign in users… And also we are not sure what are the security issues of using GRASS on server with unlimited access (i.e. you can run anything you want as opposed to predefined processes in WPS).

IIUC, you mean security of the data right?. WebGRASS project is not about providing server infrastructure to preserve the data. Of course it wont allow to get other users data and in my plan users will have access to their own location rather than anyone can use everyone’s data. And sensitivity of data uploaded is a question and you never publish such kind of data under NDA or so in public server right? And you cant access a data on server even when you render it on browser screen. That is what mapserver, Openlayers and other web map viewer are doing.

Fourth, the processing on server could be also invoked from a desktop GUI. This would require user to install the desktop GUI but the processing part would be placed on server. This is just another option.

I am not clear with this. Why do you need to invoke a desktop interface for running a webapp. I did had a the demo version running on server with no X server.

Fifth, the choice of the GUI framework is important. We don’t want to tight this to some project which will not be here in few years. Wt has nice examples and your (Rashad’s) experience is big plus. But there is many others such as Dabo and some of them might be better for us since they are using Python, so we could share some code with wxGUI. Results on mobile platforms must be evaluated, too.

There has been a python binding for Wt and myself and massmio had tried these successfully. The support for bindings are not much, I would say but I had a pretty much idea about how its generated which BTW is not using swig and SIP. Regarding mobile platforms I do had a working apk of another Wt application for which I got a recording on youtube[1] (offline android). [2] is the web version. The patch required for me was very minimal as Wt compiles clean on Android. [1] also used libgdal (Android). This one just renders a shapefile and style it without OpenLayers or its friends

And finally, a sustainability of the new web GUI must be considered. What will happen after the GSoC? There already were several GRASS web interfaces starting with GRASSLinks in 1995 and also we have some web sites using GRASS in background but they are not general GRASS GUI (e.g. http://www.gapserve.ncsu.edu/segap/segap/). Minimizing duplication with the desktop GUI seems crucial and merging this to GRASS and developing other infrastructure, too.

Of course sustainability is considered and I was hoping it would last forever and becoming a good addition to GRASS GIS as previous year’s GSoC projects.

I don’t want you to feel overwhelmed by all of these considerations but I was thinking about this topic for some time, so I collected some ideas and now is the time to share them.

[1] https://www.youtube.com/watch?v=7giSheeVgnM (on emulator)

[2] https://www.youtube.com/watch?v=v7jtsJXPhXU

Vaclav

PS: I just saw your video, congratulations, it looks good and responsive. Is the code somewhere online?

On Thu, Mar 6, 2014 at 4:28 AM, Rashad M <mohammedrashadkm@gmail.com> wrote:

Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

Regards,
Rashad


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Regards,
Rashad

Hi Rashad, Vaclav, all

that’s a great idea for a GSOC! and I’m willing to apply as student for it :slight_smile:

I’m familiar with the Web GRASS prototype as i was a beta-testing during its early development.
and i have experience with grass and python development and and with WT and its python bindings.

At the moment i’m having so much fun with IPython Notebook
that is my actually my grass interface ... in this idea i can see a little room for it too :slight_smile:

Cheers,

Massimo.

On Mar 6, 2014, at 12:45 PM, Blumentrath, Stefan <Stefan.Blumentrath@nina.no> wrote:

Hi Rashad and Vaclav,

If you allow me a user comment: The video looks very, very promoising.
In our institution we are running GRASS on an Ubuntu Server which users access graphically either through either TightVNC or CYGWin-X. What I like about the Server solution is the “work where your data is” concept (even if server ressources may be smaller when shared by several users, compared to modern single user desktop PCs). I also perceive GRASS`s mapset concept as very useful for multi-user environment and data sharing (maybe except for the ownership check which hampers usage of mapsets by groups of people (I know there are workarounds (e.g. goup users as owners or overriding the ownership check in GRASS 7)).

On the same Server we also have an RStudio-Server running which would be comparable to your webGRASS-solution.
Our experience with RStudio Server is very positive, so I would appreciate such a solution for GRASS (though TightVNC and CYGWin-X are fine too)…
The main advantage is (from my point of view) that users do not have to install additional software…

Cheers
Stefan

From: grass-dev-bounces@lists.osgeo.org [mailto:grass-dev-bounces@lists.osgeo.org] On Behalf Of Rashad M
Sent: 6. mars 2014 18:12
To: Vaclav Petras
Cc: grass-dev@lists.osgeo.org
Subject: Re: [GRASS-dev] GSoC 2014: GRAS GIS Web UI

Hi Vaclav,

On Thu, Mar 6, 2014 at 5:08 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:
Hi Rashad,

web GRASS is certainly something we need and I'm very excited about that. But there are several things which should be considered to make this project successful.

First, there is already one (desktop) GUI. Do we want to have (an maintain) another GUI? Is there a possibility to share the code between the desktop and web GUI? What about limiting the functionality of the web GUI to minimum, so that there will not much code to maintain and (as defined) nothing to add?

This is the rather important part and we do want to reuse the code from core classes.

Second, if we would decide to go the way of the full GUI (which resembles current wxGUI), wouldn't be better to use something like GTK+ GDK Broadway (1) to just reuse the desktop GUI on web, or to reuse web GUI on desktop (some web view or browser with local web pages and processes)? Although GTK+ and some wxWidgets applications can run with Broadway backend, wxPython, and especially GRASS is still far from running that way. However, there are some (perhaps even more interesting) alternatives such as Ulteo and noVNC. And I'm wondering what rollapp.com is using.

I am interested to use Wt, not because of C++ and its recent Python love, because the idea of Widget centric, security of Wt apps (very much safe than any other web framework), embedded platform support. and so on. The main idea behind the birth of Wt is they want a web application to run on Web browser and embedded platforms (Android and others). The code is written in python or C++, webserver (Wthttp) renders a bunch of AJAX code and compatible with any recent browsers and it takes care of the some browser related stuff like special css prop for webkit and mozilla. And of course there is no code conversion or generation from a c++ to html/js script. Indeed I am allowed to use as much as javascript code. In the demo you can see openlayers widget!

When you write:

WButton *button = new WButton();

Wt makes the css for Wbutton which it has and provide a very decent and easy access to render it on browsers. I would rather stop here talking about Wt before it turn into a name drop of the toolkit which I dont want to do.

Third, the GUI is not the only part. The GUI is supposed to be a part of some server/cloud infrastructure. You need to upload data, sign in users... And also we are not sure what are the security issues of using GRASS on server with unlimited access (i.e. you can run anything you want as opposed to predefined processes in WPS).

IIUC, you mean security of the data right?. WebGRASS project is not about providing server infrastructure to preserve the data. Of course it wont allow to get other users data and in my plan users will have access to their own location rather than anyone can use everyone's data. And sensitivity of data uploaded is a question and you never publish such kind of data under NDA or so in public server right? And you cant access a data on server even when you render it on browser screen. That is what mapserver, Openlayers and other web map viewer are doing.

Fourth, the processing on server could be also invoked from a desktop GUI. This would require user to install the desktop GUI but the processing part would be placed on server. This is just another option.

I am not clear with this. Why do you need to invoke a desktop interface for running a webapp. I did had a the demo version running on server with no X server.

Fifth, the choice of the GUI framework is important. We don't want to tight this to some project which will not be here in few years. Wt has nice examples and your (Rashad's) experience is big plus. But there is many others such as Dabo and some of them might be better for us since they are using Python, so we could share some code with wxGUI. Results on mobile platforms must be evaluated, too.

There has been a python binding for Wt and myself and massmio had tried these successfully. The support for bindings are not much, I would say but I had a pretty much idea about how its generated which BTW is not using swig and SIP. Regarding mobile platforms I do had a working apk of another Wt application for which I got a recording on youtube[1] (offline android). [2] is the web version. The patch required for me was very minimal as Wt compiles clean on Android. [1] also used libgdal (Android). This one just renders a shapefile and style it without OpenLayers or its friends

And finally, a sustainability of the new web GUI must be considered. What will happen after the GSoC? There already were several GRASS web interfaces starting with GRASSLinks in 1995 and also we have some web sites using GRASS in background but they are not general GRASS GUI (e.g.http://www.gapserve.ncsu.edu/segap/segap/). Minimizing duplication with the desktop GUI seems crucial and merging this to GRASS and developing other infrastructure, too.

Of course sustainability is considered and I was hoping it would last forever and becoming a good addition to GRASS GIS as previous year's GSoC projects.

I don't want you to feel overwhelmed by all of these considerations but I was thinking about this topic for some time, so I collected some ideas and now is the time to share them.

[1] https://www.youtube.com/watch?v=7giSheeVgnM (on emulator)
[2] https://www.youtube.com/watch?v=v7jtsJXPhXU

Vaclav

PS: I just saw your video, congratulations, it looks good and responsive. Is the code somewhere online?

On Thu, Mar 6, 2014 at 4:28 AM, Rashad M <mohammedrashadkm@gmail.com> wrote:
Hello All,

I would like to check with grass-devs about the possibility of having a web version of GRASS GIS as a part of SoC 2014. I had done some behind the scenes work for web version using C++ web toolkit Wt[1]. This involves running a grass modules online just like you do on Desktop with a UI that resembles that of wxGUI. I had been in touch with one of my juniors in my lab and he is interested to work on it. I could mentor this project as I had experience with Wt, GRASS and GSoC. I hope this web version will be very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

--
Regards,
   Rashad

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Regards,
   Rashad
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Thu, Mar 6, 2014 at 12:12 PM, Rashad M <mohammedrashadkm@gmail.com>
wrote:

Hi Vaclav,

On Thu, Mar 6, 2014 at 5:08 PM, Vaclav Petras <wenzeslaus@gmail.com>
wrote:

Hi Rashad,

...

First, there is already one (desktop) GUI. Do we want to have (an

maintain) another GUI? Is there a possibility to share the code between the
desktop and web GUI? What about limiting the functionality of the web GUI
to minimum, so that there will not much code to maintain and (as defined)
nothing to add?

This is the rather important part and we do want to reuse the code from
core classes.

You need to use Python to really reuse the classes. And do also a large
refactoring of wxGUI code to make them reusable (although some improvements
were already made). How much you can reuse? How much you want to reuse?
This is probably hard to answer, easier might be which functionality do we
want in web GUI? Only modules and map visualization? Or also digitizers,
animations, map swipe, ...?

The code is written in python or C++, webserver (Wthttp) renders a bunch of

AJAX code and compatible with any recent browsers and it takes care of the
some browser related stuff like special css prop for webkit and mozilla.
And of course there is no code conversion or generation from a c++ to
html/js script.

This is what previously mentioned GTK+ Broadway is doing. I'm not sure how
does this compare to Ulteo and to whatever rollapp.com is using. noVNC is
VNC where client runs in web browser. The advantage of these is that you
don't write any new GUI code.

https://developer.gnome.org/gtk3/stable/gtk-broadway.html
http://blogs.gnome.org/alexl/2012/12/27/broadway-multi-process-suppor/
http://kolyakosenko.wordpress.com/2013/07/18/wxwidgets-2-9-5/
https://www.youtube.com/watch?v=P6lzZpS5M4g

http://en.wikipedia.org/wiki/Ulteo_Open_Virtual_Desktop
http://www.ulteo.com/
http://kanaka.github.io/noVNC/
https://www.youtube.com/watch?v=ZiIxtoHa9bU (rollapp.com)

Third, the GUI is not the only part. The GUI is supposed to be a part of
some server/cloud infrastructure. You need to upload data, sign in users...
And also we are not sure what are the security issues of using GRASS on
server with unlimited access (i.e. you can run anything you want as opposed
to predefined processes in WPS).

IIUC, you mean security of the data right?. WebGRASS project is not about
providing server infrastructure to preserve the data. Of course it wont
allow to get other users data and in my plan users will have access to
their own location rather than anyone can use everyone's data. And
sensitivity of data uploaded is a question and you never publish such kind
of data under NDA or so in public server right? And you cant access a data
on server even when you render it on browser screen. That is what
mapserver, Openlayers and other web map viewer are doing.

I though that the goal is to have something like Google Docs but for GIS.
Which could be provided by GRASS community but more importantly, everyone
would be able to setup his or her own server. I'm not concern about license
of data, in terms of security, I'm concern about users accidentally
deleting each other data or somebody running some evil processes on my
server. And in terms of usability, some data upload/download functions are
needed, management, ideally also sharing and perhaps publishing through web
services by forwarding then to some map server.

On Thu, Mar 6, 2014 at 12:12 PM, Rashad M <mohammedrashadkm@gmail.com>
wrote:

Fifth, the choice of the GUI framework is important. We don't want to

tight this to some project which will not be here in few years. Wt has nice
examples and your (Rashad's) experience is big plus. But there is many
others such as Dabo and some of them might be better for us since they are
using Python, so we could share some code with wxGUI. Results on mobile
platforms must be evaluated, too.

There has been a python binding for Wt and myself and massmio had tried
these successfully. The support for bindings are not much, I would say but
I had a pretty much idea about how its generated which BTW is not using
swig and SIP. Regarding mobile platforms I do had a working apk of another
Wt application for which I got a recording on youtube[1] (offline android).
[2] is the web version. The patch required for me was very minimal as Wt
compiles clean on Android. [1] also used libgdal (Android). This one just
renders a shapefile and style it without OpenLayers or its friends

How much code are these applications? I somewhere accessible? How much
development was in Wt since than? Some improvements, e.g. for Android?

And finally, a sustainability of the new web GUI must be considered. What
will happen after the GSoC? There already were several GRASS web interfaces
starting with GRASSLinks in 1995 and also we have some web sites using
GRASS in background but they are not general GRASS GUI (e.g.
http://www.gapserve.ncsu.edu/segap/segap/). Minimizing duplication with
the desktop GUI seems crucial and merging this to GRASS and developing
other infrastructure, too.

Of course sustainability is considered and I was hoping it would last
forever and becoming a good addition to GRASS GIS as previous year's GSoC
projects.

I hope too but my point is that we should do it the right way this time
because now it is really needed. For some things like improvements of
modules, I'm not concerned. It will prevail once it is in the source code,
module is needed, improvement is needed, this is clear. But we can create a
web GUI and it will be forgotten or superseded by something better in few
years. For example, Gimp was not writing a web based GUI but now I can use
Gimp on web using rollapp.com.

Hi Stefan.

On Thu, Mar 6, 2014 at 12:45 PM, Blumentrath, Stefan <
Stefan.Blumentrath@nina.no> wrote:

Hi Rashad and Vaclav,

If you allow me a user comment:

User comments are not only allowed but they are needed.

The video looks very, very promoising.

In our institution we are running GRASS on an Ubuntu Server which users
access graphically either through either TightVNC or CYGWin-X.

ssh -X, VNC etc. are of course always here, so the question is home much
more we will get from other solutions.

What I like about the Server solution is the “work where your data is”
concept (even if server ressources may be smaller when shared by several
users, compared to modern single user desktop PCs).

So, it seems that you want the full fully-featured GUI, not just some basic
one.

I also perceive GRASS`s mapset concept as very useful for multi-user
environment and data sharing (maybe except for the ownership check which
hampers usage of mapsets by groups of people (I know there are workarounds
(e.g. goup users as owners or overriding the ownership check in GRASS 7)).

This is what I was mentioning in other email. There could be different
requirements on data management, especially sharing, in the online
environment.

On the same Server we also have an RStudio-Server running which would be
comparable to your webGRASS-solution.

Our experience with RStudio Server is very positive, so I would appreciate
such a solution for GRASS (though TightVNC and CYGWin-X are fine too)…

From quick check RSStudio is written in Java. E.g. the new Java GUI

framework JavaFX allows to create desktop and web (probably client-server)
application at once. Unfortunately, nor wxPython/wxWidgets or Qt (or its
Python friends) does not allow this by themselves. JavaFX is not really an
option for use, however the concept is what I would like to have. The GUI
with the same look and (I believe) the same implementation on all desktops
and also on web.

https://www.rstudio.com/ide/screenshots/ (first four screenshots)

The main advantage is (from my point of view) that users do not have to

install additional software…

So, web-based solution is necessary for that. Which e.g. kills my
suggestion of wxGUI executing commands on server.

Thanks for your input, if you have more, please do.

Vaclav

Cheers

Stefan

*From:* grass-dev-bounces@lists.osgeo.org [mailto:
grass-dev-bounces@lists.osgeo.org] *On Behalf Of *Rashad M
*Sent:* 6. mars 2014 18:12
*To:* Vaclav Petras
*Cc:* grass-dev@lists.osgeo.org
*Subject:* Re: [GRASS-dev] GSoC 2014: GRAS GIS Web UI

Hi Vaclav,

On Thu, Mar 6, 2014 at 5:08 PM, Vaclav Petras <wenzeslaus@gmail.com>
wrote:

Hi Rashad,

web GRASS is certainly something we need and I'm very excited about that.
But there are several things which should be considered to make this
project successful.

First, there is already one (desktop) GUI. Do we want to have (an
maintain) another GUI? Is there a possibility to share the code between the
desktop and web GUI? What about limiting the functionality of the web GUI
to minimum, so that there will not much code to maintain and (as defined)
nothing to add?

This is the rather important part and we do want to reuse the code from
core classes.

Second, if we would decide to go the way of the full GUI (which resembles
current wxGUI), wouldn't be better to use something like GTK+ GDK Broadway
(1) to just reuse the desktop GUI on web, or to reuse web GUI on desktop
(some web view or browser with local web pages and processes)? Although
GTK+ and some wxWidgets applications can run with Broadway backend,
wxPython, and especially GRASS is still far from running that way. However,
there are some (perhaps even more interesting) alternatives such as Ulteo
and noVNC. And I'm wondering what rollapp.com is using.

I am interested to use Wt, not because of C++ and its recent Python love,
because the idea of Widget centric, security of Wt apps (very much safe
than any other web framework), embedded platform support. and so on. The
main idea behind the birth of Wt is they want a web application to run on
Web browser and embedded platforms (Android and others). The code is
written in python or C++, webserver (Wthttp) renders a bunch of AJAX code
and compatible with any recent browsers and it takes care of the some
browser related stuff like special css prop for webkit and mozilla. And of
course there is no code conversion or generation from a c++ to html/js
script. Indeed I am allowed to use as much as javascript code. In the demo
you can see openlayers widget!

When you write:

WButton *button = new WButton();

Wt makes the css for Wbutton which it has and provide a very decent and
easy access to render it on browsers. I would rather stop here talking
about Wt before it turn into a name drop of the toolkit which I dont want
to do.

Third, the GUI is not the only part. The GUI is supposed to be a part of
some server/cloud infrastructure. You need to upload data, sign in users...
And also we are not sure what are the security issues of using GRASS on
server with unlimited access (i.e. you can run anything you want as opposed
to predefined processes in WPS).

IIUC, you mean security of the data right?. WebGRASS project is not about
providing server infrastructure to preserve the data. Of course it wont
allow to get other users data and in my plan users will have access to
their own location rather than anyone can use everyone's data. And
sensitivity of data uploaded is a question and you never publish such kind
of data under NDA or so in public server right? And you cant access a data
on server even when you render it on browser screen. That is what
mapserver, Openlayers and other web map viewer are doing.

Fourth, the processing on server could be also invoked from a desktop
GUI. This would require user to install the desktop GUI but the processing
part would be placed on server. This is just another option.

I am not clear with this. Why do you need to invoke a desktop interface
for running a webapp. I did had a the demo version running on server with
no X server.

Fifth, the choice of the GUI framework is important. We don't want to
tight this to some project which will not be here in few years. Wt has nice
examples and your (Rashad's) experience is big plus. But there is many
others such as Dabo and some of them might be better for us since they are
using Python, so we could share some code with wxGUI. Results on mobile
platforms must be evaluated, too.

There has been a python binding for Wt and myself and massmio had tried
these successfully. The support for bindings are not much, I would say but
I had a pretty much idea about how its generated which BTW is not using
swig and SIP. Regarding mobile platforms I do had a working apk of another
Wt application for which I got a recording on youtube[1] (offline android).
[2] is the web version. The patch required for me was very minimal as Wt
compiles clean on Android. [1] also used libgdal (Android). This one just
renders a shapefile and style it without OpenLayers or its friends

And finally, a sustainability of the new web GUI must be considered.
What will happen after the GSoC? There already were several GRASS web
interfaces starting with GRASSLinks in 1995 and also we have some web sites
using GRASS in background but they are not general GRASS GUI (e.g.
http://www.gapserve.ncsu.edu/segap/segap/). Minimizing duplication with
the desktop GUI seems crucial and merging this to GRASS and developing
other infrastructure, too.

Of course sustainability is considered and I was hoping it would last
forever and becoming a good addition to GRASS GIS as previous year's GSoC
projects.

I don't want you to feel overwhelmed by all of these considerations but I
was thinking about this topic for some time, so I collected some ideas and
now is the time to share them.

[1] https://www.youtube.com/watch?v=7giSheeVgnM (on emulator)

[2] https://www.youtube.com/watch?v=v7jtsJXPhXU

Vaclav

PS: I just saw your video, congratulations, it looks good and responsive.
Is the code somewhere online?

On Thu, Mar 6, 2014 at 4:28 AM, Rashad M <mohammedrashadkm@gmail.com>
wrote:

  Hello All,

I would like to check with grass-devs about the possibility of having a
web version of GRASS GIS as a part of SoC 2014. I had done some behind the
scenes work for web version using C++ web toolkit Wt[1]. This involves
running a grass modules online just like you do on Desktop with a UI that
resembles that of wxGUI. I had been in touch with one of my juniors in my
lab and he is interested to work on it. I could mentor this project as I
had experience with Wt, GRASS and GSoC. I hope this web version will be
very useful in both users and developers.

Comments and suggestions are most welcomed.

[1] http://www.webtoolkit.eu/wt

--

Regards,
   Rashad

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--

Regards,
   Rashad

On Thu, Mar 6, 2014 at 1:38 PM, epi <massimodisasha@gmail.com> wrote:

At the moment i’m having so much fun with IPython Notebook
that is my actually my grass interface ... in this idea i can see a little
room for it too :slight_smile:

IPython Notebook would be the clear choice of Python command console for a
web GUI written from scratch. Similarly, OpenLayers or Leaflet could become
a web GRASS GUI map display. The downside of things such as GTK+ Broadway
is that these solutions are simply not available. Although they can be
always used inside some web view. With this we are getting to the other
option I was mentioning: web-based GUI used in a web view(s) on desktop.
This would allow us to use all highly interactive Java Script visualization
libraries on desktop.

http://wxpython.org/Phoenix/docs/html/html2.WebView.html

Hi Vaclav,

I think that the web UI has to be based on the GRASS library and has to not depend on WxWidgets or any other Desktop gui toolkit like JavaFX. g.parser is enough to describe the modules interface and can be used to automatize the build of the module form for any modules. I got your idea of running the same on desktop, web, embedded platforms which is theoretically possible but the run into deadend from time to timeas they are started for desktop application.

Qt has webkit interface, like you said for JavaFX ( i dont know much about the java). The philosophy of a desktop gui toolkit is entirely different from a web application ui. For example message passing or Qt signals/slots can’t be used directly. Infact these people have a different implementation and interpretation of signal and slot when used in web.
It is because people had written QtWebkit, Broadway with the same idea in mind as you, now it possible to run these. But they can’t used in a many of application sucessfully. For example, rendering a map on Qt and web browser cant be same. We have WMS, WMTS etc… for rendering imagery and WFS for vector data for this reason. We can’t use the everywhere used GDAL for web easily. Boradway or JavaFX and other friends is very much feasible for some projects but not all.

For this idea i envision the web gui app based on :

  • mapset-location wizard
  • map canvas
  • toolbar with:
    pan, query

zoom in/out/bbox to-layer to-region

  • menu bar with same layout of grass desktop
···

Here you can use GDAL, you are not obliged to use WPS, WMS, WFS to deal with your data. of course you can. None will fix the data used by web application and you could just give a try without evening compiling etc… (these are some view on webgrass we both saying).

Regarding the reuse of code. I am planning to use python bindings for wt and core classes will be reused. for parsing description file and the instead of sending boradway or JavaFX etc… I will use directly a jquery dialog, html button, text and will have direct access to js code such that if i need to render a grass vector i could do it in openlayers or using wt itself to read the grass vector directly using gdal and draw polygons on a HTML5Canvas, SVG, etc… I could use render module of grass ui to render a ppm or use pygrass numpy to read grass and render as before.

For Sharing data is one thing i need to think about and having a “shared location” like share folders could be explored.

For GRASS 3D. its not possible to use opengl on web. you must use webgl. and I dont think the previous GTK broadway could use opengl.

Also GRASS is famous for large data processing and i was exploring that too. So the webUI must be behave differently when dealing with large data and should allow you to queue any process. Just thinking for now.

And the whole idea of having webgrass will help users and developers as stefan was mentioning to run them on university or a company network without caring of operating system and Wt support Windows, Linux, OS X among other embedded platforms.

The demo video of android was from 2012 and since then Wt improved Android support. In 2012 there was not automated apk. But when I checked in 2013 wt build system if configured for android will generate an apk for your application.

I would ask you to think webUI as a wrapper like python, java etc… You can have two gui for GRASS GIS. Remember about grass6.3 and earlier version which uses tcl/tk and was not used now because lack of support and or functionality and I am never saying Wxwidgets is not lacking a functionality for a desktop platform but on web perspective i think it is. Am I right?

On Thu, Mar 6, 2014 at 8:42 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Regards,
Rashad

On Thu, Mar 6, 2014 at 1:38 PM, epi <massimodisasha@gmail.com> wrote:

At the moment i’m having so much fun with IPython Notebook
that is my actually my grass interface … in this idea i can see a little room for it too :slight_smile:

IPython Notebook would be the clear choice of Python command console for a web GUI written from scratch. Similarly, OpenLayers or Leaflet could become a web GRASS GUI map display. The downside of things such as GTK+ Broadway is that these solutions are simply not available. Although they can be always used inside some web view. With this we are getting to the other option I was mentioning: web-based GUI used in a web view(s) on desktop. This would allow us to use all highly interactive Java Script visualization libraries on desktop.

http://wxpython.org/Phoenix/docs/html/html2.WebView.html

Rashad, please basic description of your idea to

https://trac.osgeo.org/grass/wiki/GSoC/2014#Web-basedGUIforGRASSGIS

···

I also created a page to have ideas mentioned here stored in systematic way:

https://trac.osgeo.org/grass/wiki/GSoC/2014/WebGRASS

I will have limited possibilities to work on it in next days, so feel edit or put some facts directly there. I hope that others will also join this discussion which goes far behind the GSoC.

Vaclav

On Thu, Mar 6, 2014 at 3:32 PM, Rashad M <mohammedrashadkm@gmail.com> wrote:

Hi Vaclav,

I think that the web UI has to be based on the GRASS library and has to not depend on WxWidgets or any other Desktop gui toolkit like JavaFX. g.parser is enough to describe the modules interface and can be used to automatize the build of the module form for any modules. I got your idea of running the same on desktop, web, embedded platforms which is theoretically possible but the run into deadend from time to timeas they are started for desktop application.

Qt has webkit interface, like you said for JavaFX ( i dont know much about the java). The philosophy of a desktop gui toolkit is entirely different from a web application ui. For example message passing or Qt signals/slots can’t be used directly. Infact these people have a different implementation and interpretation of signal and slot when used in web.
It is because people had written QtWebkit, Broadway with the same idea in mind as you, now it possible to run these. But they can’t used in a many of application sucessfully. For example, rendering a map on Qt and web browser cant be same. We have WMS, WMTS etc… for rendering imagery and WFS for vector data for this reason. We can’t use the everywhere used GDAL for web easily. Boradway or JavaFX and other friends is very much feasible for some projects but not all.

For this idea i envision the web gui app based on :

  • mapset-location wizard
  • map canvas
  • toolbar with:
    pan, query

zoom in/out/bbox to-layer to-region

  • menu bar with same layout of grass desktop

Here you can use GDAL, you are not obliged to use WPS, WMS, WFS to deal with your data. of course you can. None will fix the data used by web application and you could just give a try without evening compiling etc… (these are some view on webgrass we both saying).

Regarding the reuse of code. I am planning to use python bindings for wt and core classes will be reused. for parsing description file and the instead of sending boradway or JavaFX etc… I will use directly a jquery dialog, html button, text and will have direct access to js code such that if i need to render a grass vector i could do it in openlayers or using wt itself to read the grass vector directly using gdal and draw polygons on a HTML5Canvas, SVG, etc… I could use render module of grass ui to render a ppm or use pygrass numpy to read grass and render as before.

For Sharing data is one thing i need to think about and having a “shared location” like share folders could be explored.

For GRASS 3D. its not possible to use opengl on web. you must use webgl. and I dont think the previous GTK broadway could use opengl.

Also GRASS is famous for large data processing and i was exploring that too. So the webUI must be behave differently when dealing with large data and should allow you to queue any process. Just thinking for now.

And the whole idea of having webgrass will help users and developers as stefan was mentioning to run them on university or a company network without caring of operating system and Wt support Windows, Linux, OS X among other embedded platforms.

The demo video of android was from 2012 and since then Wt improved Android support. In 2012 there was not automated apk. But when I checked in 2013 wt build system if configured for android will generate an apk for your application.

I would ask you to think webUI as a wrapper like python, java etc… You can have two gui for GRASS GIS. Remember about grass6.3 and earlier version which uses tcl/tk and was not used now because lack of support and or functionality and I am never saying Wxwidgets is not lacking a functionality for a desktop platform but on web perspective i think it is. Am I right?

On Thu, Mar 6, 2014 at 8:42 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

Regards,
Rashad

On Thu, Mar 6, 2014 at 1:38 PM, epi <massimodisasha@gmail.com> wrote:

At the moment i’m having so much fun with IPython Notebook
that is my actually my grass interface … in this idea i can see a little room for it too :slight_smile:

IPython Notebook would be the clear choice of Python command console for a web GUI written from scratch. Similarly, OpenLayers or Leaflet could become a web GRASS GUI map display. The downside of things such as GTK+ Broadway is that these solutions are simply not available. Although they can be always used inside some web view. With this we are getting to the other option I was mentioning: web-based GUI used in a web view(s) on desktop. This would allow us to use all highly interactive Java Script visualization libraries on desktop.

http://wxpython.org/Phoenix/docs/html/html2.WebView.html

Hi Rashad and Vaclav,

As mentioned, I really like the idea of a web-gui. Yet, at the end it will compete with VNC / Cygwin-X (at least in our setting). And I am afraid if it does not offer the same (or at least comparable functionality) most of my colleagues will stick to the former solutions.

Things which would be high on my personal priority list would be:

  • A commandline interface (and possibly also a python console) in order to be able to paste code

  • Handling of user logins for accessing other ressources e.g in the home directory

Another interesting question would be probably how users can get results to their local machines, both regarding map data (e.g. r.out.gdal) and text output (e.g. from r.stats)… Is there a chance for fetching output through the web-gui or would users have to connect to the server e.g. using FTP or fileshares e.g. in a company network?

But of course, a research company network is only one use-case for a web-gui for GRASS…

Maybe you ask on the user-list how other users would like to use a web-gui? That could help identifying priorities in the development process (e.g. regarding the possible data-license or security problems).

Best regards,

Stefan

···

Hi Vaclav,

I think that the web UI has to be based on the GRASS library and has to not depend on WxWidgets or any other Desktop gui toolkit like JavaFX. g.parser is enough to describe the modules interface and can be used to automatize the build of the module form for any modules. I got your idea of running the same on desktop, web, embedded platforms which is theoretically possible but the run into deadend from time to timeas they are started for desktop application.

Qt has webkit interface, like you said for JavaFX ( i dont know much about the java). The philosophy of a desktop gui toolkit is entirely different from a web application ui. For example message passing or Qt signals/slots can’t be used directly. Infact these people have a different implementation and interpretation of signal and slot when used in web.

It is because people had written QtWebkit, Broadway with the same idea in mind as you, now it possible to run these. But they can’t used in a many of application sucessfully. For example, rendering a map on Qt and web browser cant be same. We have WMS, WMTS etc… for rendering imagery and WFS for vector data for this reason. We can’t use the everywhere used GDAL for web easily. Boradway or JavaFX and other friends is very much feasible for some projects but not all.

For this idea i envision the web gui app based on :

  • mapset-location wizard

  • map canvas

  • toolbar with:

pan, query

zoom in/out/bbox to-layer to-region

  • menu bar with same layout of grass desktop

Here you can use GDAL, you are not obliged to use WPS, WMS, WFS to deal with your data. of course you can. None will fix the data used by web application and you could just give a try without evening compiling etc… (these are some view on webgrass we both saying).

Regarding the reuse of code. I am planning to use python bindings for wt and core classes will be reused. for parsing description file and the instead of sending boradway or JavaFX etc… I will use directly a jquery dialog, html button, text and will have direct access to js code such that if i need to render a grass vector i could do it in openlayers or using wt itself to read the grass vector directly using gdal and draw polygons on a HTML5Canvas, SVG, etc… I could use render module of grass ui to render a ppm or use pygrass numpy to read grass and render as before.

For Sharing data is one thing i need to think about and having a “shared location” like share folders could be explored.

For GRASS 3D. its not possible to use opengl on web. you must use webgl. and I dont think the previous GTK broadway could use opengl.

Also GRASS is famous for large data processing and i was exploring that too. So the webUI must be behave differently when dealing with large data and should allow you to queue any process. Just thinking for now.

And the whole idea of having webgrass will help users and developers as stefan was mentioning to run them on university or a company network without caring of operating system and Wt support Windows, Linux, OS X among other embedded platforms.

The demo video of android was from 2012 and since then Wt improved Android support. In 2012 there was not automated apk. But when I checked in 2013 wt build system if configured for android will generate an apk for your application.

I would ask you to think webUI as a wrapper like python, java etc… You can have two gui for GRASS GIS. Remember about grass6.3 and earlier version which uses tcl/tk and was not used now because lack of support and or functionality and I am never saying Wxwidgets is not lacking a functionality for a desktop platform but on web perspective i think it is. Am I right?

On Thu, Mar 6, 2014 at 8:42 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Mar 6, 2014 at 1:38 PM, epi <massimodisasha@gmail.com> wrote:

At the moment i’m having so much fun with IPython Notebook

that is my actually my grass interface … in this idea i can see a little room for it too :slight_smile:

IPython Notebook would be the clear choice of Python command console for a web GUI written from scratch. Similarly, OpenLayers or Leaflet could become a web GRASS GUI map display. The downside of things such as GTK+ Broadway is that these solutions are simply not available. Although they can be always used inside some web view. With this we are getting to the other option I was mentioning: web-based GUI used in a web view(s) on desktop. This would allow us to use all highly interactive Java Script visualization libraries on desktop.

http://wxpython.org/Phoenix/docs/html/html2.WebView.html

Regards,
Rashad

Rashad M wrote:

I would like to check with grass-devs about the possibility of having a web
version of GRASS GIS as a part of SoC 2014. I had done some behind the
scenes work for web version using C++ web toolkit Wt[1]. This involves
running a grass modules online just like you do on Desktop with a UI that
resembles that of wxGUI. I had been in touch with one of my juniors in my
lab and he is interested to work on it. I could mentor this project as I
had experience with Wt, GRASS and GSoC. I hope this web version will be
very useful in both users and developers.

Comments and suggestions are most welcomed.

My main concern would be security.

You will need to thoroughly sanitise all inputs. You cannot rely upon
GRASS modules to do this, as e.g. most string handling uses fixed-size
buffers, so you need to explicitly limit the length of any arguments
to avoid the possibility of buffer overruns.

None of this is an issue for normal use, as "exploiting" GRASS modules
doesn't gain a user any access which they don't already have. But for
a web application, allowing a user to run GRASS modules with arbitrary
inputs amounts to giving them shell access.

You might even want to create an actual Unix account for each user, so
that any failures regarding input sanitisation are contained. However,
this would require something like suExec or servlets.

--
Glynn Clements <glynn@gclements.plus.com>

Vaclav Petras wrote:

Second, if we would decide to go the way of the full GUI (which resembles
current wxGUI), wouldn't be better to use something like GTK+ GDK Broadway
(1) to just reuse the desktop GUI on web,

Broadway is probably far too heavyweight. It's basically a "remote
desktop" approach (the X server runs on the client, but you still have
a persistent GUI application for each user running on the server).

Also, it behaves like a desktop application which is exported to a web
browser, not like a web application. The end result is almost
identical to using a desktop application via ssh with X forwarding; if
there's any advantage to Broadway, it's that it simplifies the
connection setup.

Basically, it's a question of "thin client" (Broadway, ssh -X, VNC,
etc) versus "thick client" (web browser). Both have their pros and
cons, but a thin-client solution isn't really worthy of a GSoC project
IMHO (thin client approaches typically target an entire desktop
environment rather than specific applications).

--
Glynn Clements <glynn@gclements.plus.com>

Hi Glynn.

···

On Fri, Mar 7, 2014 at 5:14 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Rashad M wrote:

I would like to check with grass-devs about the possibility of having a web
version of GRASS GIS as a part of SoC 2014. I had done some behind the
scenes work for web version using C++ web toolkit Wt[1]. This involves
running a grass modules online just like you do on Desktop with a UI that
resembles that of wxGUI. I had been in touch with one of my juniors in my
lab and he is interested to work on it. I could mentor this project as I
had experience with Wt, GRASS and GSoC. I hope this web version will be
very useful in both users and developers.

Comments and suggestions are most welcomed.

My main concern would be security.

You will need to thoroughly sanitise all inputs. You cannot rely upon
GRASS modules to do this, as e.g. most string handling uses fixed-size
buffers, so you need to explicitly limit the length of any arguments
to avoid the possibility of buffer overruns.

I am not clear with this. maybe security and web apps are creating me a confusion.

None of this is an issue for normal use, as “exploiting” GRASS modules
doesn’t gain a user any access which they don’t already have. But for
a web application, allowing a user to run GRASS modules with arbitrary
inputs amounts to giving them shell access.

Regarding shell accees we are thinking IPython. and massimo had experience in using with GRASS. We are exploring its integration with Wt

You might even want to create an actual Unix account for each user, so
that any failures regarding input sanitisation are contained. However,
this would require something like suExec or servlets.

I thought of having a user account setup and the “shell” on web ui won’t allow to navigate around any folder


Glynn Clements <glynn@gclements.plus.com>

Regards,
Rashad

Stefan, I can try to answer here,

On Mar 7, 2014, at 2:25 AM, Blumentrath, Stefan <Stefan.Blumentrath@nina.no> wrote:

Hi Rashad and Vaclav,

As mentioned, I really like the idea of a web-gui. Yet, at the end it will compete with VNC / Cygwin-X (at least in our setting). And I am afraid if it does not offer the same (or at least comparable functionality) most of my colleagues will stick to the former solutions.

Things which would be high on my personal priority list would be:
- A commandline interface (and possibly also a python console) in order to be able to paste code

This part is satisfied by the IPython Notebook interface.

the ipython notebook App (is highly customizable) and offer what you are asking,
see here for very basic example [1] usage with grass.
the user can have access to both ‘python grass interface’ as well as ‘standard grass command line’ and any other tool is available on the user $PATH
(just add the “!” prefix at each command, or "%%bash” on top of each cell )

Note that the IPython notebook is in active development and tons of new feature are coming out soon with the 2.0 release that implement api for complex widget (python<—>Js) to interact with the IPython kernel using JS widgets.
.. read below about security.

- Handling of user logins for accessing other ressources e.g in the home directory

WT has it’s auth framework for a basic login, so sure this is possible to implement and the web framework is here to support us, but keep in mind that this is a GSOC project with limited resources so i don’t think we are going to implement an full “user workspace” with filesystem navigation and feature like save/load workspace etc
(it is possible of course but it will require some work, means you’ll have to wait)

Another interesting question would be probably how users can get results to their local machines, both regarding map data (e.g. r.out.gdal) and text output (e.g. from r.stats)… Is there a chance for fetching output through the web-gui or would users have to connect to the server e.g. using FTP or fileshares e.g. in a company network?

the adoption of an IPython notebook as shell will provide a server app with “limited” file system navigation
and ability to download file.

# note: This could also be done irrespective of IPython

I personally use the apache web directory to download my products.

r.out.gdal … … output=/var/www/username/output

where “/var/www/username/output” is reader from a configurable option for each user

But of course, a research company network is only one use-case for a web-gui for GRASS…
Maybe you ask on the user-list how other users would like to use a web-gui? That could help identifying priorities in the development process (e.g. regarding the possible data-license or security problems).

The main security risk as highlighted by Glynn is in enabling the shell access trough the web, and that’s my concern too.
  
A resonable option can be to enabled/disabled shell avaibility based on a configurable option
and IMHO such feature should be enabled only to a sub-set of trusted users.

In Rstudio the multiuser interface is based on PAM auth method and each user has his own ‘home’ server side
Means that each user is a unix user on that machine. (also here the user as full access on its home, so this kind of approach is dedicated to trusted users only .. is not intended to be a web app available for anyone on the web .. will not be a forum or wikipedia but of course is intended to be an app for working group of trusted people) (there are exceptions**)

In IPython the dev team will work on this direction in the next release 3.0. (work will strut in july after release the 2.0)

An other extra layer of security can be to have the “shell feature” (that means IPython notebook) from inside a chroot jail on the a host machine.

My thought is that enabling the shell will be a cool addition but it is an hard/hot topic and deserve some discussion here.

For a GSOC idea already have most of all the gui feature available in a web app (without shell access) will end in a great and useful app.

Of course the design of the app will take into the account the possibility to add shell access, but we can think about its implementation in a late stage of the project.
The answer to that will come along the line following the future development of the IPython notebook multiuser interface.

**There is people (see here [2] [3] [4] ) that has already working example on how to “jail” in a sandbox the ipython environment perhaps they can be useful source for ideas on how to implement this in a safe way.

[1] http://nbviewer.ipython.org/gist/epifanio/9409749

[2] http://www.python.org/ (there is an interactive shell based on ipython)

[3] https://cloud.sagemath.com/

[4] https://github.com/liyanage/ipython-notebook/wiki

as Vaclav suggestion (thanks to start the wiki page about that!), should we put all the info on the wiki and extend the discussion to the user list as well ?

Massimo.

Best regards,
Stefan

From: Rashad M [mailto:mohammedrashadkm@gmail.com]
Sent: 6. mars 2014 21:32
To: Vaclav Petras
Cc: epi; Blumentrath, Stefan; grass-dev@lists.osgeo.org
Subject: Re: [GRASS-dev] GSoC 2014: GRAS GIS Web UI

Hi Vaclav,

I think that the web UI has to be based on the GRASS library and has to not depend on WxWidgets or any other Desktop gui toolkit like JavaFX. g.parser is enough to describe the modules interface and can be used to automatize the build of the module form for any modules. I got your idea of running the same on desktop, web, embedded platforms which is theoretically possible but the run into deadend from time to timeas they are started for desktop application.

Qt has webkit interface, like you said for JavaFX ( i dont know much about the java). The philosophy of a desktop gui toolkit is entirely different from a web application ui. For example message passing or Qt signals/slots can't be used directly. Infact these people have a different implementation and interpretation of signal and slot when used in web.
It is because people had written QtWebkit, Broadway with the same idea in mind as you, now it possible to run these. But they can't used in a many of application sucessfully. For example, rendering a map on Qt and web browser cant be same. We have WMS, WMTS etc.. for rendering imagery and WFS for vector data for this reason. We can't use the everywhere used GDAL for web easily. Boradway or JavaFX and other friends is very much feasible for some projects but not all.

For this idea i envision the web gui app based on :
- mapset-location wizard
- map canvas
- toolbar with:
  pan, query
  zoom in/out/bbox to-layer to-region
- menu bar with same layout of grass desktop

Here you can use GDAL, you are not obliged to use WPS, WMS, WFS to deal with your data. of course you can. None will fix the data used by web application and you could just give a try without evening compiling etc.. (these are some view on webgrass we both saying).

Regarding the reuse of code. I am planning to use python bindings for wt and core classes will be reused. for parsing description file and the instead of sending boradway or JavaFX etc.. I will use directly a jquery dialog, html button, text and will have direct access to js code such that if i need to render a grass vector i could do it in openlayers or using wt itself to read the grass vector directly using gdal and draw polygons on a HTML5Canvas, SVG, etc.. I could use render module of grass ui to render a ppm or use pygrass numpy to read grass and render as before.

For Sharing data is one thing i need to think about and having a "shared location" like share folders could be explored.

For GRASS 3D. its not possible to use opengl on web. you must use webgl. and I dont think the previous GTK broadway could use opengl.

Also GRASS is famous for large data processing and i was exploring that too. So the webUI must be behave differently when dealing with large data and should allow you to queue any process. Just thinking for now.

And the whole idea of having webgrass will help users and developers as stefan was mentioning to run them on university or a company network without caring of operating system and Wt support Windows, Linux, OS X among other embedded platforms.

The demo video of android was from 2012 and since then Wt improved Android support. In 2012 there was not automated apk. But when I checked in 2013 wt build system if configured for android will generate an apk for your application.

I would ask you to think webUI as a wrapper like python, java etc.. You can have two gui for GRASS GIS. Remember about grass6.3 and earlier version which uses tcl/tk and was not used now because lack of support and or functionality and I am never saying Wxwidgets is not lacking a functionality for a desktop platform but on web perspective i think it is. Am I right?

On Thu, Mar 6, 2014 at 8:42 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Thu, Mar 6, 2014 at 1:38 PM, epi <massimodisasha@gmail.com> wrote:
At the moment i’m having so much fun with IPython Notebook
that is my actually my grass interface ... in this idea i can see a little room for it too :slight_smile:

IPython Notebook would be the clear choice of Python command console for a web GUI written from scratch. Similarly, OpenLayers or Leaflet could become a web GRASS GUI map display. The downside of things such as GTK+ Broadway is that these solutions are simply not available. Although they can be always used inside some web view. With this we are getting to the other option I was mentioning: web-based GUI used in a web view(s) on desktop. This would allow us to use all highly interactive Java Script visualization libraries on desktop.

http://wxpython.org/Phoenix/docs/html/html2.WebView.html

--
Regards,
   Rashad

On Fri, Mar 7, 2014 at 12:23 PM, epi <massimodisasha@gmail.com> wrote:

as Vaclav suggestion (thanks to start the wiki page about that!), should
we put all the info on the wiki and extend the discussion to the user list
as well ?

My idea is that mailing list is for discussion while wiki is better for
preserving results of the discussion and as a overview for the people not
involved in the dicussion from the beginning. Speaking about

https://trac.osgeo.org/grass/wiki/GSoC/2014/WebGRASS

For the GSoC idea itself, it should be in the same form as other ideas here:

https://trac.osgeo.org/grass/wiki/GSoC/2014#Web-basedGUIforGRASSGIS

grass-user would be best for getting requirements, such as "I want what
ArcGIS Online is doing" and finding out what does this actually means.

And about the other things, I really cannot elaborate on this (no
knowledge, no time) but when we are speaking about jails, virtual session
or whatever for Wt-based and IPython-Notebook-based web GUI, wouldn't that
be the same for Broadway-based GUI? I would guess that rollapp.com is doing
something similar.

Rashad M wrote:

> My main concern would be security.
>
> You will need to thoroughly sanitise all inputs. You cannot rely upon
> GRASS modules to do this, as e.g. most string handling uses fixed-size
> buffers, so you need to explicitly limit the length of any arguments
> to avoid the possibility of buffer overruns.

I am not clear with this. maybe security and web apps are creating me a
confusion.

If you do not understand the principles of secure programming, you
shouldn't attempt to write a web interface to GRASS.

GRASS modules typically do not attempt to be secure against invalid
input. If you're providing access to "untrusted" users (users who
aren't supposed to have the full privileges of the account under which
the modules are executed), you will need to prevent invalid input from
reaching the modules.

--
Glynn Clements <glynn@gclements.plus.com>

Glynn,

I’aware that the “security risk handling” in a web app is a hard and hot topic, hopefully a lot of project are working on this direction
Of course a web-ui for grass will be designed for registered users and not for the anonymous www (password, registration and https can be implemented)

The “web-shell” feature is obviously reserved to only “trusted users”.
without this assumption application like Rstudio or IPython notebook should not exist.

A multi user approach needs to be based IMHO on unix each user has to have its own home and access to filesystem. If this is not enough the application can be restricted to a chroot jail but this is not part of the UI development (is more a sys admin choice)

For the authorization protocol it can be implemented using PAM. (i guess is what Rstudio is using)
WT has a mature authentication module

http://www.webtoolkit.eu/wt/blog/2011/11/29/wt___jwt_3_2_0
http://www.webtoolkit.eu/wt/blog/2013/08/07/security__wt_and_the_new_breach_vulnerability/

The potential user of a web ui for grass, need to be a trusted user in any case and need to go trough a registration process where an admin as to approve it. not anonymous users allowed.

I guess the code behind the web-ui has to sanitize each text entry, will be this enough ?
A “sanitize inspection” on all the “input” coming from the web-ui can be performed and this will be part of the UI itself, not of the grass modules. with the aim to avoid people doing something like … http://xkcd.com/327/ :wink:

Massimo.

On Mar 8, 2014, at 11:42 AM, Glynn Clements <glynn@gclements.plus.com> wrote:

Rashad M wrote:

My main concern would be security.

You will need to thoroughly sanitise all inputs. You cannot rely upon
GRASS modules to do this, as e.g. most string handling uses fixed-size
buffers, so you need to explicitly limit the length of any arguments
to avoid the possibility of buffer overruns.

I am not clear with this. maybe security and web apps are creating me a
confusion.

If you do not understand the principles of secure programming, you
shouldn’t attempt to write a web interface to GRASS.

GRASS modules typically do not attempt to be secure against invalid
input. If you’re providing access to “untrusted” users (users who
aren’t supposed to have the full privileges of the account under which
the modules are executed), you will need to prevent invalid input from
reaching the modules.


Glynn Clements <glynn@gclements.plus.com>


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev