Coder Social home page Coder Social logo

Support docker and rest API about gpsbabel HOT 5 CLOSED

gpsbabel avatar gpsbabel commented on May 27, 2024
Support docker and rest API

from gpsbabel.

Comments (5)

robertlipe avatar robertlipe commented on May 27, 2024

from gpsbabel.

HarelM avatar HarelM commented on May 27, 2024

I think Webassembly is not mature enough to dive into it right now (for me at least).
I'll try to explain the use-case which I think is currently missed out right now:
I have a site, the site runs cross platform code such as dotnet core, java etc.
The site uses the services of GPSBabel executable.
Now if I need to deploy the site on different OSs I need to make sure that GPSBabel is compiled for the relevant OS and deploy it prior to deploying my site or pack it with my site for deployment which will create a non cross-platform package.
In order to avoid this complexity people had started to adopt Docker, which handles most of this stuff out of the box.
In our particular case I can create a docker image which compiles the GPSBabel to a specific platform and group multiple images to support the concept of cross platform image.
This however brings a new "problem": in order to run this cross platform image I need to know that it runs from docker and use docker specific command line arguments - which is not ideal in terms of decoupling.
So, in order not to know which hosting framework is hosting GPSBabel, a web API can be used to remove the docker specific arguments (HTTP rest is a standard and not specific).

The concept of micro services and exposing GPSBabel capabilities through web API (locally) does not break, IMO, the concept of GPSBabel, but only enhance it.
The above example of gpsvisualizer is an non reusable example as I need a browser to interact with GPSBabel and I can't do it using a simple HTTPClient, and the concept of a micros service does not mean it is exposed to the web, just exposed locally on the server that is running the site.

I have written yesterday a small NodeJs web-api that exposed some of the functionalities of GPBBabel to a HTTPClient (which exists in any language). NodeJS in theory is already cross platform and If I'll be able to make a docker image that is cross platform to run this web-api all you'll need to do in order to use GPSBabel is install docker and run this image.
In terms of deployment I think it's a great advantage as you don't need to manually download assemblies that are specific to an OS but rather just install Docker.

I'd be happy to share my code if you'd like.
Maybe it shouldn't be a part of GPSBabel's "core" but a side project/repository in this Github organization.

from gpsbabel.

HarelM avatar HarelM commented on May 27, 2024

@tsteven4 I saw you are working on something with docker, I would be happy to compare notes.
I'm trying to create a cross platform docker image that will contain a HTTP server and gpsbabel executable.
I decided to update a NuGet package I'm using (IsraelHiking.GPSBabel) to contain both Linux (Debian) and Windows gpsbabel files necessary for runtime but I think I'll need a statically compiled gpsbabel version and I'm struggling to create one, any help would be appreciated (adding -static flag cause compilation error since, I think, Qt5 static libraris are not mapped).
Most of the code is already written here if anyone is interested in looking at it:
https://github.com/IsraelHikingMap/GPSBabelWebAPI

from gpsbabel.

GPSBabelDeveloper avatar GPSBabelDeveloper commented on May 27, 2024

Closing. User has providined their own solution and offered it for others, so we'll leave this here.

from gpsbabel.

HarelM avatar HarelM commented on May 27, 2024

For anyone finding this:
I have created a small docker image that wraps GPSBabel in a http server to facilitate micro-services architecture that is based on HTTP and can be distributed.
the image is here:
https://hub.docker.com/r/israelhikingmap/gpsbabelwebapi
It's not cross platform as I don't think someone is using docker windows images nowadays...

from gpsbabel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.