Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move server and scheduler start code. #71

Merged
merged 10 commits into from
Apr 14, 2017

Conversation

buchanae
Copy link
Contributor

  • Shuffles some server and scheduler code around to clean things up.
  • Tries to simplify the cmd/server.go code needed to start a funnel server. Partially succeeds.
  • Renames Scheduler to Backend, then creates Scheduler to represent high-level Scheduler server/controller
  • Server/Scheduler create code is more easily reused by tests which create a mock server.
  • Better use of context by scheduler
  • Adds "Cache-Control: no-store" HTTP response header to prevent responses from being cached. This is configurable with config.DisableHTTPCaching (default true)
  • Adds "make go-test" command for running the go tests only. The need for this command is another reason I'd like to move the code out of src/funnel.

@buchanae
Copy link
Contributor Author

This also takes one small step towards being able to create a pluggable database backend by relying on a separate Database interface for both Scheduler and Server, and requiring that database be passed in to NewServer and NewScheduler.

@buchanae
Copy link
Contributor Author

This also prunes the gorilla dependency, since all path mapping is now handled by core Go http library.

Alex Buchanan added 3 commits April 13, 2017 22:17
* Drop global registry in favor of much simpler Scheduler.AddBackend
* Clean up duplicate mock server code
* Simplify Scheduler.Start
@buchanae
Copy link
Contributor Author

The latest commits:

  • update the travis build to go 1.8
  • Rename Factory to Plugin and add plugins directly to Scheduler instance via Scheduler.AddBackend instead of having a global plugin registry
  • Clean up mock server tests. There were two mock servers, not there is one and the helper functions simplified some of the test code.

@adamstruck
Copy link
Contributor

👍

@adamstruck adamstruck merged commit 9f04b1a into ohsu-comp-bio:master Apr 14, 2017
@buchanae buchanae deleted the http-server-refactor branch November 12, 2017 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants