Skip to content

Remove LGPL code from core #562

Closed
Closed

Description

@karussell

A few places use LGPL, it is not an issue for most users and companies but for some due to restrictiv license obligations. We need to

  • move IntDoubleBinHeap out of the core
  • replace trove4j with hppc or similar, see Compare trove4j with hppc #34
  • can we replace OSM-binary? (this is no longer in the core)

Activity

  1. devemux86 commented on Nov 16, 2015

    @devemux86
    Contributor

    How about modularize more clearly core and tools?
    i.e. core for read graphs and routing and tools (or else) for read osm and create graphs.
    Right now graph creation is integrated in core, so the osm read dependencies.

  2. karussell commented on Nov 16, 2015

    @karussell
    MemberAuthor

    👍
    that is the next step :) which will - at the end - move all OSM stuff into tools or even better into a new osm-import module? Otherwise e.g. web needs a dependency on tools which also contains unnecessary swing stuff. BTW: creating graphs will be always in the core just the OSM stuff should go out of it.

    But e.g. the heap can't be moved up-stream as core depends on the new tools-lgpl module. Maybe we'll replace the class(es) there at some point, but for me this is not critical now. Just wanted them separated.

  3. karussell commented on Nov 16, 2015

    @karussell
    MemberAuthor

    The question is also a bit what we do with the GraphHopper class which belongs to the core but needs the osm import and we don't want reflection.

    So the result will be something like:

    GraphHopper hopper = new GraphHopper() {
         protected DataReader createReader( GraphHopperStorage ghStorage )    {
            return initOSMReader(new OSMReader(ghStorage));
        }
    }
    ...
    hopper.importOrLoad();

    or more explicitely:

    GraphHopper hopper = new GraphHopper().setDataReader(new OSMReader(osmFile));
    ...
    hopper.importOrLoad();

    Both would keep in mind e.g. cases like #277

    Or is this too complex for the normal developer? And we should implement additionally a special GraphHopper subclass?

    GraphHopper hopper = new GraphHopperOSM().setOSMFile(file);
    ...
    hopper.importOrLoad();

    Or even avoid renaming and name the subclass GraphHopper and the super class e.g. GraphHopperCore?

  4. devemux86 commented on Nov 16, 2015

    @devemux86
    Contributor

    (I agree that reflection should be avoided)

    Your 3rd suggestion with separate classes seems more feasible for normal developers, which separates better the osm import.

  5. karussell commented on Nov 16, 2015

    @karussell
    MemberAuthor

    Have to think about this - just to be sure - you meant the GraphHopperOSM style? Let us move to the new #563

  6. K-Leon commented on Jun 13, 2016

    @K-Leon

    I just had a look at IOS and Android Ports of Graphhopper:

    Right now there are dependencies on LGPL Code for both - Android and iOS?

    This results in an incompatibility with usual linking and distribution ( Only static linking possible on IOS and so on ) or am i missing something?

    Would love to give this lib a shot, but the dependence on LGPL modules makes this more or less impossible...

  7. karussell commented on Jun 13, 2016

    @karussell
    MemberAuthor

    Right now there are dependencies on LGPL Code for both - Android and iOS?

    The tools-lgpl is indeed not required for both. And the trove4J lib is necessary only for Android but could be replaced (#34)

    So nothing very problematic IMO

    Would love to give this lib a shot, but the dependence on LGPL modules makes this more or less impossible...

    Why?

  8. K-Leon commented on Jun 13, 2016

    @K-Leon

    This sounds great! I'll have a look into it

    Why?

    Just googelt a bit and a key requirement of LGPL License is to dynamically link the library. On IOS this isn't possible and on Android there are a few approaches that are more or less questionable. This is mostly because of app store distribution.

  9. karussell commented on Nov 19, 2016

    @karussell
    MemberAuthor

    I got rid of the separate lgpl module via adapting the binary heap from apache collections to our required interface (just min heap, store keys and elements separately, including update method)

    It is a rather risky change but all tests are passing. Will investigate the performance changes now.

  10. changed the title [-]Make project less dependent on LGPL code[/-] [+]Remove LGPL code from core[/+] on Dec 2, 2016
  11. karussell commented on Dec 2, 2016

    @karussell
    MemberAuthor

    @K-Leon the core is now free from LGPL dependencies - thanks to #878. Maybe you have time to update the iOS port :) ?

  12. K-Leon commented on Dec 2, 2016

    @K-Leon

    Wow! Thank you so much for your hard work! I'll give it a spin next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions