SlideShare a Scribd company logo
Scala in a wild enterprise
Scala in a wild enterprise
th e?


Scala in a wild
  enterprise
  Rafael Bagmanov
  ( Grid Dynamics )
In what use cases (types of applications)
    does Scala make the least sense?
"Database front end, CRUD apps.

Most of the boring apps that are built with
Struts and Spring"
                                 David Pollak
                     "Barriers to scala adoption" Infoq.com
Scala in a wild enterprise
OpenGenesis
github.com/griddynamics/OpenGenesis
OpenGenesis
Deployment orchestration tool
● open source - open-genesis.org
● 2 years of development
● > 50 KLOC of scala code
● successfully deployed to production in one
  large american financial institution
● Buzzwords: continuous deployment, cloud,
  chef, devops, aws, openstack
Enterprise characteristics
● Integration with legacy apps and data (lots of
  SOAP and xml)
● sophisticated security policies
● IT department separated from development
  team
● J2EE Containers everywhere
● Risk averse
Typical "lightweight" j2ee stack


      Web layer        Spring MVC


     Service layer     Spring


   Data access layer
                       JPA


         DB
j2ee stack. Scala edition


       Web layer        Spring MVC + scala magic


      Service layer     Spring + scala implicits


    Data access layer
                        JPA Squeryl


          DB
j2ee stack. Scala edition

 WAR

                  Spring MVC
          Web layer



                     Spring
         Service layer



                      Squeryl
       Data access layer




             DB
j2ee stack. Scala edition + scala
                            goodness
 WAR

                  Spring MVC
          Web layer


                                                Akka
                     Spring
                                Workflow distributed
         Service layer                 engine


                      Squeryl
       Data access layer




             DB
Service layer: Spring
Spring with scala
● DI fits almost nicely with scala
Spring with scala
● DI fits almost nicely with scala
  class GenesisRestController {
      @Autowired var genesisService: GenesisService = _
  }


  class GenesisRestController {
      @BeanProperty var genesisService: GenesisService = _
  }


  class GenesisRestController (genesisService: GenesisService) {}
Spring with scala
● DI fits almost nicely with scala
   ○ "Everything is a trait" approach can't be done
Spring with scala
● DI fits almost nicely with scala
   ○ "Everything is a trait" approach can't be done
   ○ Be aware of type inference in @Configuration bean
      trait Service


      class ServiceImpl extends Service


      @Configuration
      class ServiceContext {
          @Bean def service = new ServiceImpl
      }
Spring with scala
● DI fits almost nicely with scala
   ○ "Everything is a trait" approach can't be done
   ○ Be aware of type inference in @Configuration bean
      trait Service


      class ServiceImpl extends Service


      @Configuration
      class ServiceContext {
          @Bean def service: Service = new ServiceImpl
      }
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.

  springLdapTemplate.authenticate("user", "*", "password", new
  AuthenticationErrorCallback {
       def execute(e: Exception) {log.error(e)}
  })
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.

  springLdapTemplate.authenticate("user", "*", "password", new
  AuthenticationErrorCallback {
       def execute(e: Exception) {log.error(e)}
  })
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.

  springLdapTemplate.authenticate("user", "*", "password", new
  AuthenticationErrorCallback {
       def execute(e: Exception) {log.error(e)}
  })


  springLdapTemplate.authenticate("user", "*", "password", log.error(_))
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.

  springLdapTemplate.authenticate("user", "*", "password", log.error(_))


  implicit def authErrorCallbackWrapper(func:(Exception) => Any) = {
      new AuthenticationErrorCallback {
        def execute(exception: Exception): Unit = func(exception)
      }
  }
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.
● AOP for free (almost)
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.
● AOP for free (almost)
   ○ Be aware of naming in debug info
    def findUsers(projectId: Int) {
        dao.findUsers(projectId)
    }


    def findUsers2(projectId: Int) {
        dao.allUsers().filter(_.projectId == projectId)
    }
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.
● AOP for free (almost)
   ○ Be aware of naming in debug info
    def findUsers(projectId: Int) {     // debugIfo: name "projectId"
        dao.findUsers(projectId)
    }


    def findUsers2(projectId: Int) { // debugInfo: name "projectId$"
        dao.allUsers().filter(_.projectId == projectId)
    }
Spring with scala
● DI fits almost nicely with scala
● Rich spring templates libraries.
● AOP for free (almost)
● Spring security just works
Persistence layer: Squeryl
Squeryl
● Lightweight ORM written in scala
Squeryl
● Lightweight ORM written in scala

   class Workflow(override val id: Int) extends KeyedEntity[Int]
Squeryl
● Lightweight ORM written in scala

   class Workflow(override val id: Int) extends KeyedEntity[Int]


   object GS extends Schema {
       val workflows = table[Workflow]
   }
Squeryl
● Lightweight ORM written in scala
   class Workflow(override val id: Int) extends KeyedEntity[Int]


   object GS extends Schema {
       val workflows = table[Workflow]
   }


   def find(workflowId: Int) = from(GS.workflows)(w =>
       where(w.id === workflowId)
        select (w)
        orderBy(w.id desc)
   )
Squeryl
● Lightweight ORM written in scala
  ○ First class support for scala collections, options, etc
Squeryl
● Lightweight ORM written in scala
  ○ First class support for scala collections, options, etc
  ○ Integrates with spring transaction management
     (not out of the box)
Squeryl
● Lightweight ORM written in scala
  ○ First class support for scala collections, options, etc
  ○ Integrates with spring transaction management
     (not out of the box)
     @Transactional(propagation = REQUIRES_NEW)
     def find(workflowId: Int) = from(GS.workflows)(w =>
         where(w.id === workflowId)
          select (w)
          orderBy(w.id desc)
     )
Squeryl
● Lightweight ORM written in scala
   ○   Likes heap in the same proportion as
       Hibernate does
hibernate                                     squeryl
Squeryl
● Lightweight ORM written in scala
  ○   Likes heap in the same proportion as
      Hibernate does
  ○ Lot's of "black magic" in source code
Squeryl
● Lightweight ORM written in scala
● Internal scala DSL for writing queries
   ○ Type safe queries - compile time syntax check
Squeryl
● Lightweight ORM written in scala
● Internal scala DSL for writing queries
   ○ Lot's of "black magic" in source code
Squeryl
● Lightweight ORM written in scala
● Internal scala DSL for writing queries
   ○ Lot's of "black magic" in source code
   ○ Fallback on native sql is not easy
Squeryl
● Lightweight ORM written in scala
● Internal scala DSL for writing queries
   ○ Lot's of "black magic" in source code
   ○ Fallback on native sql is not easy
   ○   Lots of implicits drives IDE crazy and
       increases compilation time
Squeryl
● Lightweight ORM written in scala
● Internal scala DSL for writing queries
   ○ Lot's of "black magic" in source code
   ○ Fallback on native sql is not easy
   ○   Lots of implicits drives IDE crazy and
       increase compilation time
   ○ The approach is somewhat flawed (opinion)
Web layer: Spring MVC
               lift-json
           scala magic
Web layer
● RESTfull web services
  case class User (
       @NotBlank username: String,
       @Email @Size(min = 1, max = 256) email: String,
       password: Option[String]
  )
  @Controller
  @RequestMapping(Array("/rest/users"))
  class UsersController {
      @RequestMapping(method = Array(RequestMethod.POST))
      @ResponseBody
      def create(@RequestBody @Valid request: User): User = userService.create(request)
  }
Web layer
● RESTfull web services
● Easy to make Hypermedia REST with
  implicits
  @Controller
  @RequestMapping(Array("/rest/users"))
  class UsersController {
      import com.griddynamics.genesis.rest.links.Hypermedia._


      @RequestMapping(method = Array(RequestMethod.POST))
      @ResponseBody
      def create(@RequestBody @Valid request: User): Hypermedia[User] = {
       userService.create(request).withLink("/rest/users", LinkType.SELF)
  }
Couple of words about
        AKKA
Ехал Акка через Акка
Смотрит Акка в Акка Акка
 Сунул Акка Акка в Акка
  Акка Акка Акка Акка *



                          * Ode to Akka in russian
Greatest challenge:
Greatest challenge:
      People
Challenges
● Hiring is hard
Challenges
● Hiring is hard
  ○ Scala is a talent attraction
Challenges
● Hiring is hard
  ○ Scala is a talent attraction
  ○ In avg: 0.5 interview per month
Challenges
● Hiring is hard
● Settling team standards and code
  convention
Challenges
● Hiring is hard
● Settling team standards and code
  convention
  ○ Tools are not there yet
Challenges
● Hiring is hard
● Settling team standards and code
  convention
  ○ Tools are not there yet
  ○ Between "OCaml" and "Java" fires
Challenges
● Hiring is hard
● Settling team standards and code
  convention
  ○ Tools are not there yet
  ○ Between "OCaml" and "Java" fires
  ○ "Effective scala" by Twitter and "Scala style guide"
     might help (a bit)
The greatest code-review mystery of
all times
How to deal with scala.Option

 if (option.isDefined) {           option match {
                                     case Some(x) => ..
     ..                              case None => ..



                           ?
 }                                 }




                     option.foreach { .. }
The greatest code-review mystery of
all times
How to deal with scala.Option

 if (option.isDefined) {           option match {
                                     case Some(x) => ..
     ..                              case None => ..



                           ?
 }                                 }




                     option.foreach { .. }
Recruiting java
 developers
aka
5 stages of grief
5 stages of grief
1. Denial
2. Anger
3. Bargaining
4. Depression
5. Acceptance
5 stages of grief
1. Denial
2. Anger
3. Bargaining
4. Depression
5. Acceptance
5 stages of grief
1. Denial
2. Anger
3. Bargaining
4. Depression
5. Acceptance
5 stages of grief
1. Denial
2. Anger
3. Bargaining
4. Depression
5. Acceptance
5 stages of grief
1. Denial
2. Anger
3. Bargaining
4. Depression
5. Acceptance
5 stages of grief
1. Denial
2. Anger
3. Bargaining
4. Depression

5.   Acceptance
Scala in a wild enterprise

More Related Content

PDF
Scala, Akka, and Play: An Introduction on Heroku
PPTX
Alberto Paro - Hands on Scala.js
PDF
Scala Days NYC 2016
ODP
Introduction to Scala JS
PDF
Solid And Sustainable Development in Scala
PPTX
Akka Actor presentation
PDF
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
PDF
Full Stack Scala
Scala, Akka, and Play: An Introduction on Heroku
Alberto Paro - Hands on Scala.js
Scala Days NYC 2016
Introduction to Scala JS
Solid And Sustainable Development in Scala
Akka Actor presentation
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Full Stack Scala

What's hot (20)

PDF
Build Cloud Applications with Akka and Heroku
PDF
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
PDF
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
PPTX
Building an aws sdk for Perl - Granada Perl Workshop 2014
PDF
Building Concurrent WebObjects applications with Scala
PDF
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
PDF
Type-safe front-end development with Scala
PDF
How You Convince Your Manager To Adopt Scala.js in Production
PDF
Lightbend Lagom: Microservices Just Right
PPT
Scala Days San Francisco
PPTX
Containerless in the Cloud with AWS Lambda
ODP
Scal`a`ngular - Scala and Angular
PDF
Introduction to Scala
PPTX
Paws - Perl AWS SDK Update - November 2015
PPTX
Paws - A Perl AWS SDK
PPTX
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
PDF
The Evolution of Scala / Scala進化論
PPTX
Кирилл Безпалый, .NET Developer, Ciklum
PPTX
Paws: A Perl AWS SDK - YAPC Europe 2015
PPTX
Concurrency in Scala - the Akka way
Build Cloud Applications with Akka and Heroku
CocoaHeads PDX 2014 01 23 : CoreData and iCloud Improvements iOS7 / OSX Maver...
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
Building an aws sdk for Perl - Granada Perl Workshop 2014
Building Concurrent WebObjects applications with Scala
Introduction to Spark SQL and Catalyst / Spark SQLおよびCalalystの紹介
Type-safe front-end development with Scala
How You Convince Your Manager To Adopt Scala.js in Production
Lightbend Lagom: Microservices Just Right
Scala Days San Francisco
Containerless in the Cloud with AWS Lambda
Scal`a`ngular - Scala and Angular
Introduction to Scala
Paws - Perl AWS SDK Update - November 2015
Paws - A Perl AWS SDK
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
The Evolution of Scala / Scala進化論
Кирилл Безпалый, .NET Developer, Ciklum
Paws: A Perl AWS SDK - YAPC Europe 2015
Concurrency in Scala - the Akka way
Ad

Viewers also liked (20)

PDF
JSON-LD: Linked Data for Web Apps
PDF
Springone2gx 2014 Reactive Streams and Reactor
PPT
Building scalable and language independent java services using apache thrift
PPT
Website to get more pinterest followers
PDF
Op4 outline : review
PPTX
Premios día de andalucía 2013
DOCX
PDF
Living culture of bread
PPTX
Самосознание
PPTX
Kommunikation - trends & tendenser 2013
PDF
Oven tools
PPT
Meisser genealogy
PDF
Community booklet
PDF
Orientation integrative ecosocial design
PDF
I.S. permaculture handout
PDF
CLICKON Nedir?
PDF
Simha’s curriculum for i.s. leadership training
PDF
Teachers manual to facilitating an earth oven course 1
PPTX
Google analytics training bmit 8 09-2016
PDF
Generation now communication
JSON-LD: Linked Data for Web Apps
Springone2gx 2014 Reactive Streams and Reactor
Building scalable and language independent java services using apache thrift
Website to get more pinterest followers
Op4 outline : review
Premios día de andalucía 2013
Living culture of bread
Самосознание
Kommunikation - trends & tendenser 2013
Oven tools
Meisser genealogy
Community booklet
Orientation integrative ecosocial design
I.S. permaculture handout
CLICKON Nedir?
Simha’s curriculum for i.s. leadership training
Teachers manual to facilitating an earth oven course 1
Google analytics training bmit 8 09-2016
Generation now communication
Ad

Similar to Scala in a wild enterprise (20)

PDF
Rafael Bagmanov «Scala in a wild enterprise»
PDF
Scala Frustrations
PDF
Scala and Spring
PPTX
Scala Italy 2015 - Hands On ScalaJS
PPTX
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
PDF
Spring Day | Spring and Scala | Eberhard Wolff
PDF
Martin Odersky: What's next for Scala
PDF
Solid and Sustainable Development in Scala
PDF
Scala Frameworks for Web Application 2016
PDF
Scala and jvm_languages_praveen_technologist
PPT
PDF
Scala active record
PDF
Kabukiza.tech 1 LT - ScalikeJDBC-Async & Skinny Framework #kbkz_tech
PPTX
Scala final ppt vinay
PPTX
Spark - The Ultimate Scala Collections by Martin Odersky
PPTX
Spark Sql for Training
PDF
Java 23 and Beyond - A Roadmap Of Innovations
PDF
Play framework
PDF
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
PPTX
NoSQL Endgame DevoxxUA Conference 2020
Rafael Bagmanov «Scala in a wild enterprise»
Scala Frustrations
Scala and Spring
Scala Italy 2015 - Hands On ScalaJS
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Spring Day | Spring and Scala | Eberhard Wolff
Martin Odersky: What's next for Scala
Solid and Sustainable Development in Scala
Scala Frameworks for Web Application 2016
Scala and jvm_languages_praveen_technologist
Scala active record
Kabukiza.tech 1 LT - ScalikeJDBC-Async & Skinny Framework #kbkz_tech
Scala final ppt vinay
Spark - The Ultimate Scala Collections by Martin Odersky
Spark Sql for Training
Java 23 and Beyond - A Roadmap Of Innovations
Play framework
MongoDB.local Berlin: Building a GraphQL API with MongoDB, Prisma and Typescript
NoSQL Endgame DevoxxUA Conference 2020

Scala in a wild enterprise

  • 3. th e? Scala in a wild enterprise Rafael Bagmanov ( Grid Dynamics )
  • 4. In what use cases (types of applications) does Scala make the least sense?
  • 5. "Database front end, CRUD apps. Most of the boring apps that are built with Struts and Spring" David Pollak "Barriers to scala adoption" Infoq.com
  • 8. OpenGenesis Deployment orchestration tool ● open source - open-genesis.org ● 2 years of development ● > 50 KLOC of scala code ● successfully deployed to production in one large american financial institution ● Buzzwords: continuous deployment, cloud, chef, devops, aws, openstack
  • 9. Enterprise characteristics ● Integration with legacy apps and data (lots of SOAP and xml) ● sophisticated security policies ● IT department separated from development team ● J2EE Containers everywhere ● Risk averse
  • 10. Typical "lightweight" j2ee stack Web layer Spring MVC Service layer Spring Data access layer JPA DB
  • 11. j2ee stack. Scala edition Web layer Spring MVC + scala magic Service layer Spring + scala implicits Data access layer JPA Squeryl DB
  • 12. j2ee stack. Scala edition WAR Spring MVC Web layer Spring Service layer Squeryl Data access layer DB
  • 13. j2ee stack. Scala edition + scala goodness WAR Spring MVC Web layer Akka Spring Workflow distributed Service layer engine Squeryl Data access layer DB
  • 15. Spring with scala ● DI fits almost nicely with scala
  • 16. Spring with scala ● DI fits almost nicely with scala class GenesisRestController { @Autowired var genesisService: GenesisService = _ } class GenesisRestController { @BeanProperty var genesisService: GenesisService = _ } class GenesisRestController (genesisService: GenesisService) {}
  • 17. Spring with scala ● DI fits almost nicely with scala ○ "Everything is a trait" approach can't be done
  • 18. Spring with scala ● DI fits almost nicely with scala ○ "Everything is a trait" approach can't be done ○ Be aware of type inference in @Configuration bean trait Service class ServiceImpl extends Service @Configuration class ServiceContext { @Bean def service = new ServiceImpl }
  • 19. Spring with scala ● DI fits almost nicely with scala ○ "Everything is a trait" approach can't be done ○ Be aware of type inference in @Configuration bean trait Service class ServiceImpl extends Service @Configuration class ServiceContext { @Bean def service: Service = new ServiceImpl }
  • 20. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries.
  • 21. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. springLdapTemplate.authenticate("user", "*", "password", new AuthenticationErrorCallback { def execute(e: Exception) {log.error(e)} })
  • 22. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. springLdapTemplate.authenticate("user", "*", "password", new AuthenticationErrorCallback { def execute(e: Exception) {log.error(e)} })
  • 23. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. springLdapTemplate.authenticate("user", "*", "password", new AuthenticationErrorCallback { def execute(e: Exception) {log.error(e)} }) springLdapTemplate.authenticate("user", "*", "password", log.error(_))
  • 24. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. springLdapTemplate.authenticate("user", "*", "password", log.error(_)) implicit def authErrorCallbackWrapper(func:(Exception) => Any) = { new AuthenticationErrorCallback { def execute(exception: Exception): Unit = func(exception) } }
  • 25. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. ● AOP for free (almost)
  • 26. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. ● AOP for free (almost) ○ Be aware of naming in debug info def findUsers(projectId: Int) { dao.findUsers(projectId) } def findUsers2(projectId: Int) { dao.allUsers().filter(_.projectId == projectId) }
  • 27. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. ● AOP for free (almost) ○ Be aware of naming in debug info def findUsers(projectId: Int) { // debugIfo: name "projectId" dao.findUsers(projectId) } def findUsers2(projectId: Int) { // debugInfo: name "projectId$" dao.allUsers().filter(_.projectId == projectId) }
  • 28. Spring with scala ● DI fits almost nicely with scala ● Rich spring templates libraries. ● AOP for free (almost) ● Spring security just works
  • 30. Squeryl ● Lightweight ORM written in scala
  • 31. Squeryl ● Lightweight ORM written in scala class Workflow(override val id: Int) extends KeyedEntity[Int]
  • 32. Squeryl ● Lightweight ORM written in scala class Workflow(override val id: Int) extends KeyedEntity[Int] object GS extends Schema { val workflows = table[Workflow] }
  • 33. Squeryl ● Lightweight ORM written in scala class Workflow(override val id: Int) extends KeyedEntity[Int] object GS extends Schema { val workflows = table[Workflow] } def find(workflowId: Int) = from(GS.workflows)(w => where(w.id === workflowId) select (w) orderBy(w.id desc) )
  • 34. Squeryl ● Lightweight ORM written in scala ○ First class support for scala collections, options, etc
  • 35. Squeryl ● Lightweight ORM written in scala ○ First class support for scala collections, options, etc ○ Integrates with spring transaction management (not out of the box)
  • 36. Squeryl ● Lightweight ORM written in scala ○ First class support for scala collections, options, etc ○ Integrates with spring transaction management (not out of the box) @Transactional(propagation = REQUIRES_NEW) def find(workflowId: Int) = from(GS.workflows)(w => where(w.id === workflowId) select (w) orderBy(w.id desc) )
  • 37. Squeryl ● Lightweight ORM written in scala ○ Likes heap in the same proportion as Hibernate does hibernate squeryl
  • 38. Squeryl ● Lightweight ORM written in scala ○ Likes heap in the same proportion as Hibernate does ○ Lot's of "black magic" in source code
  • 39. Squeryl ● Lightweight ORM written in scala ● Internal scala DSL for writing queries ○ Type safe queries - compile time syntax check
  • 40. Squeryl ● Lightweight ORM written in scala ● Internal scala DSL for writing queries ○ Lot's of "black magic" in source code
  • 41. Squeryl ● Lightweight ORM written in scala ● Internal scala DSL for writing queries ○ Lot's of "black magic" in source code ○ Fallback on native sql is not easy
  • 42. Squeryl ● Lightweight ORM written in scala ● Internal scala DSL for writing queries ○ Lot's of "black magic" in source code ○ Fallback on native sql is not easy ○ Lots of implicits drives IDE crazy and increases compilation time
  • 43. Squeryl ● Lightweight ORM written in scala ● Internal scala DSL for writing queries ○ Lot's of "black magic" in source code ○ Fallback on native sql is not easy ○ Lots of implicits drives IDE crazy and increase compilation time ○ The approach is somewhat flawed (opinion)
  • 44. Web layer: Spring MVC lift-json scala magic
  • 45. Web layer ● RESTfull web services case class User ( @NotBlank username: String, @Email @Size(min = 1, max = 256) email: String, password: Option[String] ) @Controller @RequestMapping(Array("/rest/users")) class UsersController { @RequestMapping(method = Array(RequestMethod.POST)) @ResponseBody def create(@RequestBody @Valid request: User): User = userService.create(request) }
  • 46. Web layer ● RESTfull web services ● Easy to make Hypermedia REST with implicits @Controller @RequestMapping(Array("/rest/users")) class UsersController { import com.griddynamics.genesis.rest.links.Hypermedia._ @RequestMapping(method = Array(RequestMethod.POST)) @ResponseBody def create(@RequestBody @Valid request: User): Hypermedia[User] = { userService.create(request).withLink("/rest/users", LinkType.SELF) }
  • 47. Couple of words about AKKA
  • 48. Ехал Акка через Акка Смотрит Акка в Акка Акка Сунул Акка Акка в Акка Акка Акка Акка Акка * * Ode to Akka in russian
  • 52. Challenges ● Hiring is hard ○ Scala is a talent attraction
  • 53. Challenges ● Hiring is hard ○ Scala is a talent attraction ○ In avg: 0.5 interview per month
  • 54. Challenges ● Hiring is hard ● Settling team standards and code convention
  • 55. Challenges ● Hiring is hard ● Settling team standards and code convention ○ Tools are not there yet
  • 56. Challenges ● Hiring is hard ● Settling team standards and code convention ○ Tools are not there yet ○ Between "OCaml" and "Java" fires
  • 57. Challenges ● Hiring is hard ● Settling team standards and code convention ○ Tools are not there yet ○ Between "OCaml" and "Java" fires ○ "Effective scala" by Twitter and "Scala style guide" might help (a bit)
  • 58. The greatest code-review mystery of all times How to deal with scala.Option if (option.isDefined) { option match { case Some(x) => .. .. case None => .. ? } } option.foreach { .. }
  • 59. The greatest code-review mystery of all times How to deal with scala.Option if (option.isDefined) { option match { case Some(x) => .. .. case None => .. ? } } option.foreach { .. }
  • 61. aka
  • 62. 5 stages of grief
  • 63. 5 stages of grief 1. Denial 2. Anger 3. Bargaining 4. Depression 5. Acceptance
  • 64. 5 stages of grief 1. Denial 2. Anger 3. Bargaining 4. Depression 5. Acceptance
  • 65. 5 stages of grief 1. Denial 2. Anger 3. Bargaining 4. Depression 5. Acceptance
  • 66. 5 stages of grief 1. Denial 2. Anger 3. Bargaining 4. Depression 5. Acceptance
  • 67. 5 stages of grief 1. Denial 2. Anger 3. Bargaining 4. Depression 5. Acceptance
  • 68. 5 stages of grief 1. Denial 2. Anger 3. Bargaining 4. Depression 5. Acceptance