ashwanthkumar / suuchi

सूचि - Toolkit to build Distributed Data Systems
https://ashwanthkumar.github.io/suuchi/
53 stars 12 forks source link

Refactor suuchi server #14

Closed ashwanthkumar closed 8 years ago

ashwanthkumar commented 8 years ago

Now an example app looks something like

object ExampleApp extends App {
  val store = new InMemoryStore

  val routingStrategy = ConsistentHashingRouting(MemberAddress("localhost", 5051), MemberAddress("localhost", 5052))

  val server1 = Server(NettyServerBuilder.forPort(5051), whoami(5051))
    .routeUsing(new SuuchiReadService(store), routingStrategy)
    .routeUsing(new SuuchiPutService(store), routingStrategy)
  server1.start()

  val server2 = Server(NettyServerBuilder.forPort(5051), whoami(5051))
    .routeUsing(new SuuchiReadService(store), routingStrategy)
    .routeUsing(new SuuchiPutService(store), routingStrategy)
  server2.start()

  server1.blockUntilShutdown()
  server2.blockUntilShutdown()
}
codecov-io commented 8 years ago

Current coverage is 59.81% (diff: 9.09%)

Merging #14 into master will increase coverage by 0.91%

@@             master        #14   diff @@
==========================================
  Files            14         15     +1   
  Lines           219        219          
  Methods           0          0          
  Messages          0          0          
  Branches         34         32     -2   
==========================================
+ Hits            129        131     +2   
+ Misses           81         79     -2   
  Partials          9          9          

Powered by Codecov. Last update 5e4f663...591d356