SlideShare a Scribd company logo
Scala in Goozy

         Alexey Zlobin
         E-Legion
Index

1. Goozy overview
2. Scala's place
3. Lift
4. Cake pattern in scale
5. Scalaz and other fancy stuff
6. Summary
What is Goozy?
A social network built around
the concept of sticky note

 ● A note could be left
   anywhere in the Web.
 ● It is associated with
   particular page element.

Central UI concept: user's
related feed with all new notes
and comments
Top-level architecture

Recommended for you

Async Scope With Mule ESB
Async Scope With Mule ESBAsync Scope With Mule ESB
Async Scope With Mule ESB

The document discusses using asynchronous scopes in Mule ESB. An asynchronous scope allows a child flow to execute simultaneously with the parent flow without blocking it. This is useful when the parent flow does not depend on the result of the child flow. The document provides steps to configure an asynchronous scope, including creating the parent and child flows, adding a Groovy script component to the child flow to simulate a long-running task, and calling the child flow from within the asynchronous scope in the parent flow.

integrationmule esbtutorial
From monolith web app to micro-frontends
From monolith web app to micro-frontendsFrom monolith web app to micro-frontends
From monolith web app to micro-frontends

Single-Page Application (SPA) is the main-stream modern frontend development approach. However, we quickly hit limitations of monolith SPA in the growing company with multiple product teams, different technologies and release cycles. In this talk we share how these limitations have been overcome by extending microservice architecture to React frontend using dependency injection and Lerna mono-repository.

javascriptmicroservicesreact
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
Kharkiv JS  2015 - Creating isomorphic applications in React (en)Kharkiv JS  2015 - Creating isomorphic applications in React (en)
Kharkiv JS 2015 - Creating isomorphic applications in React (en)

How to create isomorphic application in React and Redux. What pitfalls will you meet during the work? WebbyLab moves isomorphic production app to Github (https://github.com/webbylab/itsquiz-wall)

nodejsreactjavascript
Scala's place

API server

Main functions:
 ● Storage access
 ● Background tasks (feed writing, e-mails)
 ● Email sending
 ● Text indexing
Why scala?

● Fast
● Сoncise
● Expressive
● Advanced OO
● Some functional stuff
   ○ Simple concurrency
● All Java legacy
  available
The team

● 2 persons
● Strong Java background
● Fancy about technologies
● Love to try new things
Lift
       Utilized features:
        ● REST
        ● JSON serialisation

       That's it...

Recommended for you

Before you jump into Angular
Before you jump into AngularBefore you jump into Angular
Before you jump into Angular

Discussion on ECMAScript 6 to TypeScript selective features before jump into Angular and brushing your JS programming concepts. Whats new with ECMAScript 6, why ES6 superset - TypeScript adopted by the Angular community and warming up JavaScript philosophy.

ecmascriptecmascript6ecmascript2015
JavaScript Comprehensive Overview
JavaScript Comprehensive OverviewJavaScript Comprehensive Overview
JavaScript Comprehensive Overview

The document provides an agenda for a lesson on JavaScript. It begins with an introduction on what JavaScript is, how it is used in HTML, and its capabilities. It then covers JavaScript syntax, including that it is case sensitive, how to write comments, how to define variables and use conditions, loops and arrays. It also discusses how to add JavaScript to HTML using internal and external scripts, and how to write and call functions.

javascript
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector mule

The Quartz connector in Mule allows scheduling of events using cron expressions or repeat intervals. Cron expressions provide powerful scheduling capabilities like executing jobs weekly or monthly on a specific date. Attributes of the Quartz connector include display name, cron expression, repeat interval, repeat count, start delay, and job. Jobs perform actions when triggers occur, and connector configurations associate endpoints with global configurations.

Lift: issues
Localisation performance
 ● Hand-made localisation on standard resource bundles
   gave 4 times throughput improvement.

Very memory-consuming JSON serialisation.
 ● Not so efficient PrettyPrinter is used
 ● Functional-styled string escaping

Poor code style
 ● Extremely long map-match-if hierarchies
 ● Mutable, difficult to debug LiftRules design
Lift: shift from

Some plans about             But we have a strong
migration to less            dependency from Boot
sophisticated framework...   and configuration

Ideally small and simple     And there is some aspect-
enough to be completely      like hooks on HTTP
rewritten in case of any     processing, which are
issue.                       unportable.
Goozy API logical structure

Application is composed
from three layers.

Each layer consists from
several similar
components. Like
UserStorage,
GroupStorage, etc.
Conceptual problems

● Components of each level depend from each other
● Components most likely have several dependencies
  from the previous level
● A lot of common stuff inside a level
    ○ Every storage needs a DB connection
    ○ Every service needs an entire storage system and
      access to text indexes
    ○ Etc...

Recommended for you

Introduction to Reactjs
Introduction to ReactjsIntroduction to Reactjs
Introduction to Reactjs

- What is React? - Why use React? - Core Concepts - About Virtual DOM - Advantages & Disadvantages

nodejsnodexpertsjavascript
Flow
FlowFlow
Flow

Flow is a static type checker for JavaScript that tracks types as they flow through a program to find errors. It works by parsing code, generating an abstract syntax tree, performing type inference to create a Flow graph, then evaluating the graph to find errors. Basic setup involves installing Flow, adding "// @flow" comments, and running the "flow" command to check files. Flow is focused on soundness while TypeScript prioritizes tooling and scalability.

reacttypecheckingstatic typing
Scripting robot
Scripting robotScripting robot
Scripting robot

This document provides an overview of test case formatting and structure in Robot Framework. It discusses test case files, the editor used, table structure including test cases, settings, keywords and variables. It also covers syntax elements like spacing, argument separators, and comments. Additionally, it explains how to create keywords, pass parameters, use setup/teardown, and address elements. It concludes with examples of simple test scenarios and encourages enjoying test automation.

robot framework
The solution: cake pattern
● Each logically closed piece
  of functionality is
  represented as component
● Dependencies are
  expressed as self-type
● Common features expressed
  as mix-ins
● Common combinations of
  functionality are expressed
  as mix-ins of several
  components
Cake pattern: consequences
+ All top-level architecture   - Long dependency lists
is expressed in one less         ● Poor design?
than 100 LOC file
                               - Implicit dependency on mix-
+ Compile-time                 in order (linearisation strikes
dependency checks              back)
                                 ● Prefer def and lazy
+ The biggest file is
around 1000 LOC                - A bit unclear how to deal
                               with several dependencies of
                               the same type but different
                               runtime implementation
scalaz.Validation
                    One sweet morning I sent a
                    link to the colleague...

                    On the next morning we had
                    a new dependency and
                    totally refactored request
                    parameters analysis.

                    Now everything is validated.
Validation: pros and cons
+ Comprehensible error      - Monads and Applicatives
aggregation and reporting   cause massive brain
                            damage
+ The only imaginable way
to deal with 20+ request    - Complicated error reports
parameters with 2-3         from the compiler
constraints on each
                            - You can't just ignore
+ Unified approach to       possibility of runtime
request validation and      exception
runtime error handling

+ Type-level check for
correct error handling

Recommended for you

Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby

jRuby fixes some issues with the Ruby programming language like memory leaks and lack of kernel level threading by running Ruby code on the Java Virtual Machine which has features like a sophisticated garbage collector, just-in-time compilation for improved performance, and native threading; benchmarks show jRuby provides much higher concurrency and better performance than Ruby for background processing and web applications; deploying a Ruby application using jRuby and a Java application server like Torquebox allows it to take advantage of the reliability, scalability and deployment features of the Java platform.

torqueboxjrubyruby on rails
.Net framework
.Net framework.Net framework
.Net framework

The document discusses Microsoft's .NET Framework, which includes a Common Language Runtime (CLR) that allows any supported language to run on a virtual machine. Languages compile to Microsoft Intermediate Language (MSIL) bytecode. Assemblies are the fundamental unit of deployment and security. The .NET Framework supports web services, distributed applications, and data binding through XML.

Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm

The document discusses the architecture of the Java Virtual Machine (JVM). It explains that Java code is first compiled to bytecode, which is then converted to native machine code by the JIT compiler and loaded into memory segments by the class loader for execution. The JVM handles tasks like memory management, execution, and exception handling through various modules that interface with the underlying operating system and hardware platform.

 
by home
Validations and exceptions
Problem: exceptions are here




Solution: catch'em and convert!
Error handling: big picture
Lessons

1. Always prefer simple tools
2. Options and Eithers (Validations): they really work
    ○ It is possible to live with both exceptions and eithers
    ○ Performance consequences are not clear
    ○ Some times I had to use things far behind my
      understanding (sequence, traverse)
3. Server-side testing is difficult
    ○ Testing approach should be established before any code
      is written
References

1. http://www.assembla.
   com/spaces/liftweb/wiki/REST_Web_Services - REST
   support in Lift
2. http://jonasboner.com/2008/10/06/real-world-scala-
   dependency-injection-di.html - complete cake pattern intro
3. https://gist.github.com/970717 - easy Validation example

Recommended for you

Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)

Robot Framework is a keyword-driven test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has a simple tabular test data syntax that allows tests to be maintained without programming skills. Robot Framework supports different test styles including keyword-driven, data-driven, and behavior-driven. It is open source and can be extended through test libraries implemented using Python, Jython, IronPython, or any other language.

test frameworkrobot framework
Mule quartz
Mule quartz Mule quartz
Mule quartz

Quartz transport in Mule allows scheduling inbound and outbound events. Cron expressions are used to define schedules and jobs trigger actions when a time trigger occurs. A simple example application writes a file to an outbound folder at a specified interval using Quartz, demonstrating how it can schedule flows to run periodically.

Quartz in Mule
Quartz in MuleQuartz in Mule
Quartz in Mule

Quartz can be used in Mule applications to schedule events. Inbound quartz endpoints can trigger repeating events like every second, while outbound endpoints schedule existing events for later dates. Cron expressions define schedules using fields separated by spaces. Jobs perform scheduled actions. For example, a Mule flow can be configured to write a file to an outbound folder every specific interval using quartz.

Testing

A lot of features

Very quickly evolved at the beginning

We needed to exclude possibility of regression
Testing: solution

● Integration testing from the client point of view
● All test deal only with the http interface
● Every case is a short (5-10 reqs.) scenario
● Every case is wrapped into JUnit test for convenience
Testing: logical architecture

1. JUnit wrapper
2. Scenario
3. Library of available
   operation on http interface
4. Groovy's HTTPBuilder
Integration testing: problems

Groovy
 1. Dynamic typing
 2. Not obvious ways to do simple things
 3. One extra language in project

Execution time

Recommended for you

Actividad 2
Actividad 2Actividad 2
Actividad 2

Internet comenzó como un proyecto militar estadounidense pero hoy en día es accesible para todo el mundo. Originalmente era complejo publicar contenido en línea pero ahora es fácil gracias a herramientas como la Web 2.0, que permite a los usuarios crear y compartir contenido de forma sencilla. Internet ha cambiado la forma en que nos comunicamos y accedemos a la información.

Totus subidus
Totus subidusTotus subidus
Totus subidus

Ikasleen lanak

Présentation ubib
Présentation ubibPrésentation ubib
Présentation ubib

Présentation ubib SCDUAG

More Related Content

What's hot

Use notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages developmentUse notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages development
Frank van der Linden
 
Consume wsa
Consume wsaConsume wsa
Consume wsa
mahe797
 
jQuery (intermediate)
jQuery (intermediate)jQuery (intermediate)
jQuery (intermediate)
Madhukar Anand
 
Async Scope With Mule ESB
Async Scope With Mule ESBAsync Scope With Mule ESB
Async Scope With Mule ESB
Jitendra Bafna
 
From monolith web app to micro-frontends
From monolith web app to micro-frontendsFrom monolith web app to micro-frontends
From monolith web app to micro-frontends
Rustam Aliyev
 
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
Kharkiv JS  2015 - Creating isomorphic applications in React (en)Kharkiv JS  2015 - Creating isomorphic applications in React (en)
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
Viktor Turskyi
 
Before you jump into Angular
Before you jump into AngularBefore you jump into Angular
Before you jump into Angular
M A Hossain Tonu
 
JavaScript Comprehensive Overview
JavaScript Comprehensive OverviewJavaScript Comprehensive Overview
JavaScript Comprehensive Overview
Mohamed Loey
 
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector mule
Sindhu VL
 
Introduction to Reactjs
Introduction to ReactjsIntroduction to Reactjs
Introduction to Reactjs
NodeXperts
 
Flow
FlowFlow
Scripting robot
Scripting robotScripting robot
Scripting robot
Chonlasith Jucksriporn
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
Barry Jones
 
.Net framework
.Net framework.Net framework
.Net framework
teach4uin
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
home
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
Zhe Li
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
Praneethchampion
 
Quartz in Mule
Quartz in MuleQuartz in Mule
Quartz in Mule
Mohammed246
 

What's hot (18)

Use notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages developmentUse notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages development
 
Consume wsa
Consume wsaConsume wsa
Consume wsa
 
jQuery (intermediate)
jQuery (intermediate)jQuery (intermediate)
jQuery (intermediate)
 
Async Scope With Mule ESB
Async Scope With Mule ESBAsync Scope With Mule ESB
Async Scope With Mule ESB
 
From monolith web app to micro-frontends
From monolith web app to micro-frontendsFrom monolith web app to micro-frontends
From monolith web app to micro-frontends
 
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
Kharkiv JS  2015 - Creating isomorphic applications in React (en)Kharkiv JS  2015 - Creating isomorphic applications in React (en)
Kharkiv JS 2015 - Creating isomorphic applications in React (en)
 
Before you jump into Angular
Before you jump into AngularBefore you jump into Angular
Before you jump into Angular
 
JavaScript Comprehensive Overview
JavaScript Comprehensive OverviewJavaScript Comprehensive Overview
JavaScript Comprehensive Overview
 
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector mule
 
Introduction to Reactjs
Introduction to ReactjsIntroduction to Reactjs
Introduction to Reactjs
 
Flow
FlowFlow
Flow
 
Scripting robot
Scripting robotScripting robot
Scripting robot
 
Day 8 - jRuby
Day 8 - jRubyDay 8 - jRuby
Day 8 - jRuby
 
.Net framework
.Net framework.Net framework
.Net framework
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Quartz in Mule
Quartz in MuleQuartz in Mule
Quartz in Mule
 

Viewers also liked

Actividad 2
Actividad 2Actividad 2
Actividad 2
acidmau
 
Totus subidus
Totus subidusTotus subidus
Totus subidus
karmele
 
Présentation ubib
Présentation ubibPrésentation ubib
Présentation ubib
scduag
 
Gruppo Hera - Relazione trimestrale al 30 settembre 2012
Gruppo Hera - Relazione trimestrale al 30 settembre 2012Gruppo Hera - Relazione trimestrale al 30 settembre 2012
Gruppo Hera - Relazione trimestrale al 30 settembre 2012
Hera Group
 
Proyecto emprendedores 2014
Proyecto emprendedores 2014Proyecto emprendedores 2014
Proyecto emprendedores 2014
Isha Mtz
 
Beckham david
Beckham davidBeckham david
Beckham david
eflcafe
 
деловой велосипед 2014
деловой велосипед 2014деловой велосипед 2014
деловой велосипед 2014
Pashka Gorbunov
 
Carancho Albino[1]
Carancho Albino[1]Carancho Albino[1]
Carancho Albino[1]
vergaramax
 
El Teatro Isabelino
El Teatro IsabelinoEl Teatro Isabelino
El Teatro Isabelino
guestfc4e36
 
Sortie a saigon v2
Sortie a saigon v2Sortie a saigon v2
Sortie a saigon v2
lfiduras
 
Manos Pintadas R
Manos Pintadas RManos Pintadas R
Manos Pintadas R
Jorge Llosa
 
Perioada "preweb" e-mail si icq
Perioada "preweb" e-mail si icqPerioada "preweb" e-mail si icq
Perioada "preweb" e-mail si icq
Kristeen Bumbac
 
Buenas dias escuela
Buenas dias escuelaBuenas dias escuela
Buenas dias escuela
Kevin Donovan
 
Dn13 u3 a26_lswa
Dn13 u3 a26_lswaDn13 u3 a26_lswa
Dn13 u3 a26_lswa
wendatgo
 
Saga Crespúsculo
Saga CrespúsculoSaga Crespúsculo
Saga Crespúsculo
guest5e4d0b
 
Правительство Ростовской области
Правительство Ростовской областиПравительство Ростовской области
Правительство Ростовской области
Babenchuk
 
Space project.
Space project. Space project.
Space project.
joh0073
 
License
LicenseLicense
License
Niluh Nayna
 
Capstone
CapstoneCapstone
Capstone
guest474636
 
A nossa estatística (2)
A nossa estatística (2)A nossa estatística (2)
A nossa estatística (2)
Sasuke Sakura
 

Viewers also liked (20)

Actividad 2
Actividad 2Actividad 2
Actividad 2
 
Totus subidus
Totus subidusTotus subidus
Totus subidus
 
Présentation ubib
Présentation ubibPrésentation ubib
Présentation ubib
 
Gruppo Hera - Relazione trimestrale al 30 settembre 2012
Gruppo Hera - Relazione trimestrale al 30 settembre 2012Gruppo Hera - Relazione trimestrale al 30 settembre 2012
Gruppo Hera - Relazione trimestrale al 30 settembre 2012
 
Proyecto emprendedores 2014
Proyecto emprendedores 2014Proyecto emprendedores 2014
Proyecto emprendedores 2014
 
Beckham david
Beckham davidBeckham david
Beckham david
 
деловой велосипед 2014
деловой велосипед 2014деловой велосипед 2014
деловой велосипед 2014
 
Carancho Albino[1]
Carancho Albino[1]Carancho Albino[1]
Carancho Albino[1]
 
El Teatro Isabelino
El Teatro IsabelinoEl Teatro Isabelino
El Teatro Isabelino
 
Sortie a saigon v2
Sortie a saigon v2Sortie a saigon v2
Sortie a saigon v2
 
Manos Pintadas R
Manos Pintadas RManos Pintadas R
Manos Pintadas R
 
Perioada "preweb" e-mail si icq
Perioada "preweb" e-mail si icqPerioada "preweb" e-mail si icq
Perioada "preweb" e-mail si icq
 
Buenas dias escuela
Buenas dias escuelaBuenas dias escuela
Buenas dias escuela
 
Dn13 u3 a26_lswa
Dn13 u3 a26_lswaDn13 u3 a26_lswa
Dn13 u3 a26_lswa
 
Saga Crespúsculo
Saga CrespúsculoSaga Crespúsculo
Saga Crespúsculo
 
Правительство Ростовской области
Правительство Ростовской областиПравительство Ростовской области
Правительство Ростовской области
 
Space project.
Space project. Space project.
Space project.
 
License
LicenseLicense
License
 
Capstone
CapstoneCapstone
Capstone
 
A nossa estatística (2)
A nossa estatística (2)A nossa estatística (2)
A nossa estatística (2)
 

Similar to Алексей Злобин «Scala in Goozy»

Full stack development
Full stack developmentFull stack development
Full stack development
Pavlo Iuriichuk
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
Matthias Noback
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
Rob Davarnia
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 Slides
Alex Cruise
 
Headless cms architecture
Headless cms architectureHeadless cms architecture
Headless cms architecture
Kevin Wenger
 
stigbot_beta
stigbot_betastigbot_beta
stigbot_beta
Zachary Job
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Study
housecor
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
MichalSchroeder
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
Geoff Harcourt
 
Node.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniquesNode.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniques
Manuel Eusebio de Paz Carmona
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
Jumping Bean
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
Alex Ross
 
apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...
apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...
apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...
apidays
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
Юлия Коваленко
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDaniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
Develcz
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
Cloud Orchestration is Broken
Cloud Orchestration is BrokenCloud Orchestration is Broken
Cloud Orchestration is Broken
Public Broadcasting Service
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
vanphp
 
Fighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless phpFighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless php
Fabio Pellegrini
 

Similar to Алексей Злобин «Scala in Goozy» (20)

Full stack development
Full stack developmentFull stack development
Full stack development
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
DevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 SlidesDevOps Days Vancouver 2014 Slides
DevOps Days Vancouver 2014 Slides
 
Headless cms architecture
Headless cms architectureHeadless cms architecture
Headless cms architecture
 
stigbot_beta
stigbot_betastigbot_beta
stigbot_beta
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Study
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
Node.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniquesNode.js Course 2 of 2 - Advanced techniques
Node.js Course 2 of 2 - Advanced techniques
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...
apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...
apidays Paris 2022 - Of graphQL, DX friction, and surgical monolithectomy, Fr...
 
Modularity problems
Modularity  problemsModularity  problems
Modularity problems
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
 
Daniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého SchizmaDaniel Steigerwald - Este.js - konec velkého Schizma
Daniel Steigerwald - Este.js - konec velkého Schizma
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Cloud Orchestration is Broken
Cloud Orchestration is BrokenCloud Orchestration is Broken
Cloud Orchestration is Broken
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
 
Fighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless phpFighting legacy with hexagonal architecture and frameworkless php
Fighting legacy with hexagonal architecture and frameworkless php
 

More from e-Legion

MBLT16: Elena Rydkina, Pure
MBLT16: Elena Rydkina, PureMBLT16: Elena Rydkina, Pure
MBLT16: Elena Rydkina, Pure
e-Legion
 
MBLT16: Alexander Lukin, AppMetrica
MBLT16: Alexander Lukin, AppMetricaMBLT16: Alexander Lukin, AppMetrica
MBLT16: Alexander Lukin, AppMetrica
e-Legion
 
MBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Vincent Wu, Alibaba MobileMBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Vincent Wu, Alibaba Mobile
e-Legion
 
MBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Dmitriy Geranin, Afisha RestoranyMBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Dmitriy Geranin, Afisha Restorany
e-Legion
 
MBLT16: Marvin Liao, 500Startups
MBLT16: Marvin Liao, 500StartupsMBLT16: Marvin Liao, 500Startups
MBLT16: Marvin Liao, 500Startups
e-Legion
 
MBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Maslak, AviasalesMBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Maslak, Aviasales
e-Legion
 
MBLT16: Andrey Bakalenko, Sberbank Online
MBLT16: Andrey Bakalenko, Sberbank OnlineMBLT16: Andrey Bakalenko, Sberbank Online
MBLT16: Andrey Bakalenko, Sberbank Online
e-Legion
 
Rx Java architecture
Rx Java architectureRx Java architecture
Rx Java architecture
e-Legion
 
Rx java
Rx javaRx java
Rx java
e-Legion
 
MBLTDev15: Hector Zarate, Spotify
MBLTDev15: Hector Zarate, SpotifyMBLTDev15: Hector Zarate, Spotify
MBLTDev15: Hector Zarate, Spotify
e-Legion
 
MBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Cesar Valiente, WunderlistMBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Cesar Valiente, Wunderlist
e-Legion
 
MBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Brigit Lyons, SoundcloudMBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Brigit Lyons, Soundcloud
e-Legion
 
MBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Egor Tolstoy, Rambler&CoMBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Egor Tolstoy, Rambler&Co
e-Legion
 
MBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Alexander Orlov, PostforpostMBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Alexander Orlov, Postforpost
e-Legion
 
MBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Artemiy Sobolev, ParallelsMBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Artemiy Sobolev, Parallels
e-Legion
 
MBLTDev15: Alexander Dimchenko, DIT
MBLTDev15: Alexander Dimchenko, DITMBLTDev15: Alexander Dimchenko, DIT
MBLTDev15: Alexander Dimchenko, DIT
e-Legion
 
MBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Evgeny Lisovsky, LitresMBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Evgeny Lisovsky, Litres
e-Legion
 
MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev: Alexander Dimchenko, Bright Box MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev: Alexander Dimchenko, Bright Box
e-Legion
 
MBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Konstantin Goldshtein, MicrosoftMBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Konstantin Goldshtein, Microsoft
e-Legion
 
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
e-Legion
 

More from e-Legion (20)

MBLT16: Elena Rydkina, Pure
MBLT16: Elena Rydkina, PureMBLT16: Elena Rydkina, Pure
MBLT16: Elena Rydkina, Pure
 
MBLT16: Alexander Lukin, AppMetrica
MBLT16: Alexander Lukin, AppMetricaMBLT16: Alexander Lukin, AppMetrica
MBLT16: Alexander Lukin, AppMetrica
 
MBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Vincent Wu, Alibaba MobileMBLT16: Vincent Wu, Alibaba Mobile
MBLT16: Vincent Wu, Alibaba Mobile
 
MBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Dmitriy Geranin, Afisha RestoranyMBLT16: Dmitriy Geranin, Afisha Restorany
MBLT16: Dmitriy Geranin, Afisha Restorany
 
MBLT16: Marvin Liao, 500Startups
MBLT16: Marvin Liao, 500StartupsMBLT16: Marvin Liao, 500Startups
MBLT16: Marvin Liao, 500Startups
 
MBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Maslak, AviasalesMBLT16: Andrey Maslak, Aviasales
MBLT16: Andrey Maslak, Aviasales
 
MBLT16: Andrey Bakalenko, Sberbank Online
MBLT16: Andrey Bakalenko, Sberbank OnlineMBLT16: Andrey Bakalenko, Sberbank Online
MBLT16: Andrey Bakalenko, Sberbank Online
 
Rx Java architecture
Rx Java architectureRx Java architecture
Rx Java architecture
 
Rx java
Rx javaRx java
Rx java
 
MBLTDev15: Hector Zarate, Spotify
MBLTDev15: Hector Zarate, SpotifyMBLTDev15: Hector Zarate, Spotify
MBLTDev15: Hector Zarate, Spotify
 
MBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Cesar Valiente, WunderlistMBLTDev15: Cesar Valiente, Wunderlist
MBLTDev15: Cesar Valiente, Wunderlist
 
MBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Brigit Lyons, SoundcloudMBLTDev15: Brigit Lyons, Soundcloud
MBLTDev15: Brigit Lyons, Soundcloud
 
MBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Egor Tolstoy, Rambler&CoMBLTDev15: Egor Tolstoy, Rambler&Co
MBLTDev15: Egor Tolstoy, Rambler&Co
 
MBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Alexander Orlov, PostforpostMBLTDev15: Alexander Orlov, Postforpost
MBLTDev15: Alexander Orlov, Postforpost
 
MBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Artemiy Sobolev, ParallelsMBLTDev15: Artemiy Sobolev, Parallels
MBLTDev15: Artemiy Sobolev, Parallels
 
MBLTDev15: Alexander Dimchenko, DIT
MBLTDev15: Alexander Dimchenko, DITMBLTDev15: Alexander Dimchenko, DIT
MBLTDev15: Alexander Dimchenko, DIT
 
MBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Evgeny Lisovsky, LitresMBLTDev: Evgeny Lisovsky, Litres
MBLTDev: Evgeny Lisovsky, Litres
 
MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev: Alexander Dimchenko, Bright Box MBLTDev: Alexander Dimchenko, Bright Box
MBLTDev: Alexander Dimchenko, Bright Box
 
MBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Konstantin Goldshtein, MicrosoftMBLTDev15: Konstantin Goldshtein, Microsoft
MBLTDev15: Konstantin Goldshtein, Microsoft
 
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
MBLTDev15: Anna Mikhina, Maxim Evdokimov, Tinkoff Bank
 

Recently uploaded

Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
jackson110191
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
Stephanie Beckett
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
Bert Blevins
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
BookNet Canada
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 

Recently uploaded (20)

Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfINDIAN AIR FORCE FIGHTER PLANES LIST.pdf
INDIAN AIR FORCE FIGHTER PLANES LIST.pdf
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
What's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptxWhat's New in Copilot for Microsoft365 May 2024.pptx
What's New in Copilot for Microsoft365 May 2024.pptx
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Password Rotation in 2024 is still Relevant
Password Rotation in 2024 is still RelevantPassword Rotation in 2024 is still Relevant
Password Rotation in 2024 is still Relevant
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024Details of description part II: Describing images in practice - Tech Forum 2024
Details of description part II: Describing images in practice - Tech Forum 2024
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 

Алексей Злобин «Scala in Goozy»

  • 1. Scala in Goozy Alexey Zlobin E-Legion
  • 2. Index 1. Goozy overview 2. Scala's place 3. Lift 4. Cake pattern in scale 5. Scalaz and other fancy stuff 6. Summary
  • 3. What is Goozy? A social network built around the concept of sticky note ● A note could be left anywhere in the Web. ● It is associated with particular page element. Central UI concept: user's related feed with all new notes and comments
  • 5. Scala's place API server Main functions: ● Storage access ● Background tasks (feed writing, e-mails) ● Email sending ● Text indexing
  • 6. Why scala? ● Fast ● Сoncise ● Expressive ● Advanced OO ● Some functional stuff ○ Simple concurrency ● All Java legacy available
  • 7. The team ● 2 persons ● Strong Java background ● Fancy about technologies ● Love to try new things
  • 8. Lift Utilized features: ● REST ● JSON serialisation That's it...
  • 9. Lift: issues Localisation performance ● Hand-made localisation on standard resource bundles gave 4 times throughput improvement. Very memory-consuming JSON serialisation. ● Not so efficient PrettyPrinter is used ● Functional-styled string escaping Poor code style ● Extremely long map-match-if hierarchies ● Mutable, difficult to debug LiftRules design
  • 10. Lift: shift from Some plans about But we have a strong migration to less dependency from Boot sophisticated framework... and configuration Ideally small and simple And there is some aspect- enough to be completely like hooks on HTTP rewritten in case of any processing, which are issue. unportable.
  • 11. Goozy API logical structure Application is composed from three layers. Each layer consists from several similar components. Like UserStorage, GroupStorage, etc.
  • 12. Conceptual problems ● Components of each level depend from each other ● Components most likely have several dependencies from the previous level ● A lot of common stuff inside a level ○ Every storage needs a DB connection ○ Every service needs an entire storage system and access to text indexes ○ Etc...
  • 13. The solution: cake pattern ● Each logically closed piece of functionality is represented as component ● Dependencies are expressed as self-type ● Common features expressed as mix-ins ● Common combinations of functionality are expressed as mix-ins of several components
  • 14. Cake pattern: consequences + All top-level architecture - Long dependency lists is expressed in one less ● Poor design? than 100 LOC file - Implicit dependency on mix- + Compile-time in order (linearisation strikes dependency checks back) ● Prefer def and lazy + The biggest file is around 1000 LOC - A bit unclear how to deal with several dependencies of the same type but different runtime implementation
  • 15. scalaz.Validation One sweet morning I sent a link to the colleague... On the next morning we had a new dependency and totally refactored request parameters analysis. Now everything is validated.
  • 16. Validation: pros and cons + Comprehensible error - Monads and Applicatives aggregation and reporting cause massive brain damage + The only imaginable way to deal with 20+ request - Complicated error reports parameters with 2-3 from the compiler constraints on each - You can't just ignore + Unified approach to possibility of runtime request validation and exception runtime error handling + Type-level check for correct error handling
  • 17. Validations and exceptions Problem: exceptions are here Solution: catch'em and convert!
  • 19. Lessons 1. Always prefer simple tools 2. Options and Eithers (Validations): they really work ○ It is possible to live with both exceptions and eithers ○ Performance consequences are not clear ○ Some times I had to use things far behind my understanding (sequence, traverse) 3. Server-side testing is difficult ○ Testing approach should be established before any code is written
  • 20. References 1. http://www.assembla. com/spaces/liftweb/wiki/REST_Web_Services - REST support in Lift 2. http://jonasboner.com/2008/10/06/real-world-scala- dependency-injection-di.html - complete cake pattern intro 3. https://gist.github.com/970717 - easy Validation example
  • 21. Testing A lot of features Very quickly evolved at the beginning We needed to exclude possibility of regression
  • 22. Testing: solution ● Integration testing from the client point of view ● All test deal only with the http interface ● Every case is a short (5-10 reqs.) scenario ● Every case is wrapped into JUnit test for convenience
  • 23. Testing: logical architecture 1. JUnit wrapper 2. Scenario 3. Library of available operation on http interface 4. Groovy's HTTPBuilder
  • 24. Integration testing: problems Groovy 1. Dynamic typing 2. Not obvious ways to do simple things 3. One extra language in project Execution time