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

tercera #6

Open
fntz opened this issue Jul 19, 2016 · 0 comments
Open

tercera #6

fntz opened this issue Jul 19, 2016 · 0 comments

Comments

@fntz
Copy link

fntz commented Jul 19, 2016

  1. default host must be 0.0.0.0 instead of localhost see
  2. do something with timeout, i think the most common way, create object with set of default timeouts (like 10 seconds, 30, 1 minute and so on)
  3. add scalac options in project build
"-language:higherKinds",
"-language:implicitConversions",
"-language:postfixOps",
  1. remove access modifiers from Boot.scala, it's unnecessarily
  2. println(s"REST interface bound to $address") => system.log.debug
  3. shutdown ~> terminate
  4. i think, that this method must be refactored
def runBot(): Unit = {
    val future: Future[Any] = placesActor ? GetPlaces()
    val eventualCities: Future[List[City]] = future
      .mapTo[List[City]]
    eventualCities
      .map(list => {
        val fullMap: Map[String, City] = list.map(c => c.id -> c).toMap
        system.actorOf(Props(classOf[PoehaliBot], Cities(fullMap)), "bot")
      })
  }

i think this nice place for Await :) (but i might be wrong)

  1. pass trip with GetRoutees message
  2. resolveOne(100 second) remove plz
  3. try to move logic from Logic or CalcService in different object. (all calculation in separate object with custom execution context (fork-join))
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

No branches or pull requests

1 participant