GAMEON

Hands-on experiment building microservices and cloud native applications

We have a Scala Room!

What follows is the stream-of-conciousness and research that lead up to our newest sample room!

tl;dr

Day 0

So for me 2017/18 is going to include adventures in polyglot.

This will include but will not be only restricted to Kotlin,Prolog, Erlang, Racket, Haskell, Closure, Scala

Day 1

Decide on tooling.

Learn to stop hating and love regexes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
scala> sample
res69: String =
roomHello,<roomId>,{
    "username": "username",
    "userId": "<userId>",
    "version": 1|2
}

scala> pattern
res70: scala.util.matching.Regex = (?s)(\w+),([^,]*),(.*)

scala> val pattern(target,id,payload) = sample
target: String = roomHello
id: String = <roomId>
payload: String =
{
    "username": "username",
    "userId": "<userId>",
    "version": 1|2
}

Day 2

Day 3

Day 4

Day 5

Day 6

ooh, its getting addictive to play with the bootstrap

Day 7

stay up until 3am refactoring code unrelated to this, but in Scala. So all the ensime skillz gained were useful, and got to use partial functions and currying. w00t!

Day 8

oops… fix repo name from sample-scala-room to sample-room-scala

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sample-room-scala ilanpillemer$ sbt docker:publishLocal
...
[info] Successfully built 6738f15ebd2e
[info] Built image sample-room-scala:1.0-SNAPSHOT
...
sample-room-scala ilanpillemer$ docker images | grep sample
...
sample-room-scala               1.0-SNAPSHOT        6738f15ebd2e        4 seconds ago       817.7 MB
sample-scala-room               1.0-SNAPSHOT        f3ffa05f0f4e        58 minutes ago      817.7 MB
...
sample-room-scala ilanpillemer$ docker run -p 9000:9000 6738f15ebd2e
[info] play.api.Play - Application started (Prod)
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

Day 9