Re: [Libosmscout-development] osmscout-server
Library for OpenStreetMap offline rendering and routing
Status: Beta
Brought to you by:
tteuling
|
From: rinigus <rin...@gm...> - 2016-09-20 09:09:17
|
Lukáš, thank you for encouragement :). Since I am actually targeting Sailfish, I'd like to hear your opinion in more detail, if possible. To me, it looks that running 'offliner' as a separate service has two negative effects: memory overhead and inability to use openGL. As it seems to me from github, openGL rendering is not developed at great pace right now :) . The memory overhead is a bit tricky to measure. The used HTTP library author is claiming 2 MB RAM requirement. On a top of that, I'll get overhead with starting separate program and so on. Yesterday night I configured modRana to access the osmscout-server and, with about 5 concurrent connections between server and modRana, the total RAM use by osmscout-server was just above 300MB in RAM RSS. Having modRana and the server on the same phone (Nexus 4, 2GB RAM) was not a problem and it was all running fine (same using poor maps). So, in practice, using the current version serving tiles is not a problem on a mobile. I'll polish the server a bit further, write a small GUI for it and then it would be easier for all to test it as well. Lukáš, with this project, my idea was actually to help you by exposing libosmscout to wider audience. With simple HTTP-based access, we could get support from projects that focused on GUI and let them polish GUI to get the best out of the library. Since all projects are open-source, you would later have a choice on whether integrate it all into one application (OSM Scout) or develop frontend and backend separately. Since you were planning to work on the backend (map delivery, as far as I remember) its a win-win situation :) If it will all goes off well, I plan to extend the server to provide search and routing as well. Again, there are apps with developed GUI for it, but no offline support. Coming back to your opinion - have I missed anything with the shortcomings of this approach? Would be great to cover all the basis, as much as possible, before investing time into it. Cheers, rinigus On Tue, Sep 20, 2016 at 10:58 AM, Lukáš Karas <luk...@ce...> wrote: > Nice to see such project! It can help to integrate osm scout to tile based > applications like KDE Marble or GPX Viewer and make it usable offline... > Or it can be used for creating web map service based on osmscout renderer. > > But as developer of OSM Scout for Sailfish, I am little bit skeptic for > usage > on mobile device. You know, I am not impartial :-) > > I would like to see web based style editor for example. It may be used for > creating custom map styles withnout installing library locally. > And all deployed on Raspberry PI, it would be awesome... > > Of course, keep doing what is fun for you, > Lukas > > Dne pondělí 19. září 2016 17:13:49 CEST rinigus napsal(a): > > Dear libosmscout developers: > > > > I'd like to introduce a small libosmscout-based server that, in future, > can > > be used as a drop-in replacement for tile (and other relevant info) > server > > by programs that require such servers. > > > > Rationale: We are missing a native application for offline navigation and > > map viewing/exploring in Sailfish. At present, there are several > > applications (at least 4) that are in part working to implement the > > functionality. Out of them, some have focused on GUI and getting the best > > support from online provided maps, and some have worked on all aspects > > (backend and frontend, OSM Scout for Sailfish). The amount of developers > is > > very limited and through this server I would like to contribute by > exposing > > libosmscout backend to the frontends that have been focused on GUI. > > > > What can it do: At present, the server registers a port and waits for > HTTP > > requests on it. So far, it knows how to serve tiles using slippy map > > notation with small extensions. It can accept multiple requests > > simultaneously and process them in parallel. This is done by > > mutex-protecting calls to the database ( > > https://github.com/rinigus/osmscout-server/blob/master/ > src/dbmaster.cpp#L97) > > and > > drawing in parallel. On PC, it can load all CPUs without any problems > when > > accessed via modRana. Haven't tested multithreading in Sailfish yet due > to > > single-threaded access used in the app that I used for testing (Poor > Maps). > > > > Even when accessed via single thread, the server can feed the tile images > > in PNG fomat with reasonable speed on mobile device. Through the extended > > slippy map URL scheme, I can increase served tile sizes to optimize for > > best performance. By using tile-oriented GUIs, all caching of generated > > images has been taking care of and reducing the load on CPU further. > > > > At present, the memory footprint was about 220-260MB RSS on mobile > device. > > I presume that it would be higher when multiple pixmaps are generated in > > parallel. > > > > Implementation: Please consider current implementation as a proof of > > concept. > > > > As an HTTP server API, I used QtWebApp which, as suggested by the lib > > author, is incorporated into the code. This lib was selected since it is > > simple to perform multi-threaded processing and, as majority of Sailfish > > applications, it uses Qt. This choice can be altered if someone would > like > > to use some other API that has similar properties. > > > > To compile, you need libosmscout libraries installed in the system. For > > Sailfish, I made a simple packaging scripts to install libosmscout (qt > > variant) and its development headers. That prevents distribution via > > official store, but allows simpler development. There are other channels > > that can be used for distribution and I intend to use them instead of the > > store. > > > > Further development: I plan to develop 2 interfaces - CLI and QML. QML > > interface should allow to alter configuration settings (port, bound > > interface, font size, ...) via GUI and simplify starting/stopping the > > server on mobile device. CLI would read settings from configuration file > > and run in terminal. That would allow using it for testing libosmscout on > > PC. > > > > License: LGPL > > URL: https://github.com/rinigus/osmscout-server > > > > As usual, everyone are welcome to join. Would be interesting to know > > whether such project is of any interest to this community before I put a > > lot of effort into it. > > > > Best, > > > > rinigus > |