Skip to content

Commit

Permalink
Refactoring code to new name spaces and removing the scaling shim code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kellrott committed Oct 14, 2016
1 parent 9ea6f1b commit ca64525
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 108 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ export PATH
PROTO_INC= -I ./ -I $(GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/

server:
go install ga4gh-taskserver
go install ga4gh-worker
go install tes-server
go install tes-worker

proto_build:
cd task-execution-schemas/proto && protoc $(PROTO_INC) \
--go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:../../src/ga4gh-tasks/ \
--grpc-gateway_out=logtostderr=true:../../src/ga4gh-tasks/ \
--go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:../../src/tes/ga4gh/ \
--grpc-gateway_out=logtostderr=true:../../src/tes/ga4gh/ \
task_execution.proto
cd proto && protoc \
$(PROTO_INC) \
-I ../task-execution-schemas/proto/ \
--go_out=Mtask_execution.proto=ga4gh-tasks,plugins=grpc:../src/ga4gh-server/proto \
--go_out=Mtask_execution.proto=tes/ga4gh,plugins=grpc:../src/tes/server/proto \
task_worker.proto

grpc:
Expand All @@ -27,6 +27,6 @@ grpc:
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway

depends: grpc
go get -d ga4gh-taskserver/
go get -d ga4gh-worker/
go get -d tes-server/
go get -d tes-worker/

34 changes: 0 additions & 34 deletions src/ga4gh-engine/scaling/mapping.go

This file was deleted.

40 changes: 0 additions & 40 deletions src/ga4gh-engine/scheduler.go

This file was deleted.

19 changes: 4 additions & 15 deletions src/ga4gh-taskserver/server.go → src/tes-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package main
import (
"flag"
"fmt"
"ga4gh-engine"
"ga4gh-engine/scaling"
"ga4gh-server"
"ga4gh-tasks"
"tes/server"
"tes/ga4gh"
"github.com/gorilla/mux"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"golang.org/x/net/context"
Expand All @@ -24,18 +22,12 @@ func main() {
storage_dir_arg := flag.String("storage", "storage", "Storage Dir")
swift_arg := flag.Bool("swift", false, "Use SWIFT object store")
task_db := flag.String("db", "ga4gh_tasks.db", "Task DB File")
scaler_name := flag.String("scaler", "local", "Scaler")

flag.Parse()

dir, _ := filepath.Abs(os.Args[0])
content_dir := filepath.Join(dir, "..", "..", "share")

config := map[string]string{}

//get scaler
scaler := ga4gh_engine_scaling.ScalingMethods[*scaler_name](config)

//server meta-data
storage_dir, _ := filepath.Abs(*storage_dir_arg)
var meta_data = make(map[string]string)
Expand All @@ -48,13 +40,10 @@ func main() {

//setup GRPC listener
taski := ga4gh_task.NewTaskBolt(*task_db, meta_data)

//setup scheduler
scheduler := ga4gh_taskengine.Scheduler(taski, scaler)


server := ga4gh_task.NewGA4GHServer()
server.RegisterTaskServer(taski)
server.RegisterScheduleServer(scheduler)
server.RegisterScheduleServer(taski)
server.Start(*rpc_port)

//setup RESTful proxy
Expand Down
4 changes: 2 additions & 2 deletions src/ga4gh-worker/worker.go → src/tes-worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"flag"
"ga4gh-engine/worker"
"ga4gh-server/proto"
"tes/worker"
"tes/server/proto"
uuid "github.com/nu7hatch/gouuid"
"google.golang.org/grpc"
"log"
Expand Down
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ga4gh_task

import (
"fmt"
"ga4gh-server/proto"
"ga4gh-tasks"
"tes/server/proto"
"tes/ga4gh"
"github.com/boltdb/bolt"
proto "github.com/golang/protobuf/proto"
uuid "github.com/nu7hatch/gouuid"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ga4gh_task

import (
"ga4gh-server/proto"
"ga4gh-tasks"
"tes/server/proto"
"tes/ga4gh"
"google.golang.org/grpc"
"log"
"net"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ga4gh_taskengine_worker

import (
"fmt"
"ga4gh-tasks"
"tes/ga4gh"
"os"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package ga4gh_taskengine_worker

import (
"fmt"
"ga4gh-server/proto"
"ga4gh-tasks"
"tes/server/proto"
"tes/ga4gh"
"golang.org/x/net/context"
"io/ioutil"
"os"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ga4gh_taskengine_worker

import (
"ga4gh-server/proto"
"ga4gh-tasks"
"tes/server/proto"
"tes/ga4gh"
context "golang.org/x/net/context"
"log"
"os"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ca64525

Please sign in to comment.