Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Flavio W. Brasil
    @fwbrasil
    William Boxhall
    @williamboxhall
    did you get a chance to take a look @fwbrasil ?
    William Boxhall
    @williamboxhall
    @fwbrasil i created a PR to help debug the problem: fwbrasil/zoot#3
    but I managed to fix the problem, i just didnt name my method param the same as I had named it in the route
    Flavio W. Brasil
    @fwbrasil
    sorry, I didn’t have time to look
    cool, PR merged
    William Boxhall
    @williamboxhall
    no worries, it was very quick to fix in the end, just inspected all my APIs and noticed the error
    i am just polishing some stuff now but actually its fully working already
    I need a tidy way to start up and tear down all my services with make file though
    currently i have to ps -ef and kill them all :P
    Flavio W. Brasil
    @fwbrasil
    not great
    maybe create a shutdown endpoint?
    William Boxhall
    @williamboxhall
    yeah that could work
    I just want whatever is easiest for demoing
    Flavio W. Brasil
    @fwbrasil
    i see
    William Boxhall
    @williamboxhall
    at the moment when you run make run-all
    it starts them all then doesn't exit
    i would like to be able to CTRL-C there and kill them all
    like somehow join the processes or something :P
    also @fwbrasil I could use some help on generics kung-fu
    I am trying to write a utility class to hide the client/server creation blahblah
    This message was deleted
      def serverFor[T <: Api](name: String, port: Int, controller: T) = {
        val serverBuilder = ServerBuilder().codec(RichHttp[Request](Http())).bindTo(new InetSocketAddress(3333)).name("Tracks")
        val server = new FinagleServer(Server[T](controller), serverBuilder.build)
        println(s"Started $name service.")
        server
      }
    but I get the exception
    Flavio W. Brasil
    @fwbrasil
    what’s the error?
    William Boxhall
    @williamboxhall
    [error] /Users/william/dev/clump-zoot-sample/api/src/main/scala/org/example/clumpzootsample/Build.scala:32: No Manifest available for T. [error] val server = new FinagleServer(Server[T](controller), serverBuilder.build)
    I thought maybe I can use class tag magic?
    but i dont really understand how that works
    Flavio W. Brasil
    @fwbrasil
    def serverFor[T <: Api: Manifest]
    William Boxhall
    @williamboxhall
    oh.
    Flavio W. Brasil
    @fwbrasil
    it generates an implicit value with the manifest for the Api type
    William Boxhall
    @williamboxhall
    wow
    scala can do anything!
    that fixed it, thanks!
    William Boxhall
    @williamboxhall
    Got everything working including tearing down the 3 running services, and added a little README doco
    things I still wanna do
    a) make Zoot compatible with the twitter Future so we dont' have to do that ugliness we discussed before
    b) add some filter-chain stuff, authentication in the frontend then passing user session headers around
    c) add some more fun endpoints
    d) maybe tweak the Builder class I created. Maybe we should add it to Zoot, or allow Zoot to build client/server with nice defaults, just supplying host/port
    Flavio W. Brasil
    @fwbrasil
    Cool stuff man! I'll check it out tomorrow
    William Boxhall
    @williamboxhall
    @fwbrasil it seems that Zoot does not support having multiple "controllers" per service. I supply only one controller to new FinagleServer(Server[MyController](myController))
    it would be nice to be able to go new FinagleServer(firstController, secondController, third...). For example my service has multiple REST resources that I wish to express as different Api traits
    Flavio W. Brasil
    @fwbrasil
    Yeah, that's a bad limitation
    The idea was mix all.traits together in only one api class
    But I don't like this approach anymore
    William Boxhall
    @williamboxhall
    I'm trying to wedge support for com.twitter.util.Future in to Zoot
    think im in a bit over my head, but what the hey
    William Boxhall
    @williamboxhall
    @fwbrasil is there an easy way for me to run the Zoot-Sample?