WikiWatershed / mmw-geoprocessing

A Spark Job Server job for Model My Watershed geoprocessing.
Apache License 2.0
6 stars 6 forks source link

Add Akka HTTP server project #55

Closed kellyi closed 6 years ago

kellyi commented 6 years ago

Overview

This PR adds an Akka HTTP server to the repo as a separate project. The server lives in api/src/main/scala/WebServer.scala and it's currently got two endpoints:

I also added two short scripts: build, which runs ./sbt assembly and debugserver which runs ./sbt ~re-start.

The latter watches the file system for changes & recompiles when it sees them and it should shorten the development loop, since we'll no longer have to create a jar file to test each change. However, it currently only works with the WebServer because it expects there to be some sort of Main class in each project -- and we don't currently have one in the summary dir.

One solution to this would be to just put the server in the same dir and the job files be siblings. Since there's only a single file for the server, it wouldn't clutter up the namespace too much.

Connects #48 Connects #50

Testing

kellyi commented 6 years ago

We'll need to update the README at some point, but I'm not sure what that point is. I'm happy to make some small changes here if we'd like.

rajadain commented 6 years ago

I made #56 for updating the README. I think we should do it after the dust has settled.

kellyi commented 6 years ago

Going to add a commit to incorporate some of the work on this branch:

https://github.com/WikiWatershed/mmw-geoprocessing/blob/tt%2Bec/collections-api/api/src/main/scala/Router.scala

kellyi commented 6 years ago

Pushed a few new commits which...

object WebServer extends HttpApp with App with LazyLogging

I made #55 to handle updating the build.scala file to build.sbt, as it seems like this will be involved enough to merit more investigation & review

kellyi commented 6 years ago

These changes now also add setup, update, and console scripts with minimal implementations.

rajadain commented 6 years ago

Taking another look.

kellyi commented 6 years ago

Thanks for all your help with this! I squashed everything down to a single commit. Going to double check that everything still works as expected then merge.