Shapeless : Computing deltas

A real life example

This is the code and some personal notes from the Shapeless? - Easy! talk where Valentin Kasas explains in a great way an advanced example of a real life use case (with slides).

Computing deltas

  • Imagine we want to be able to determine what are the difference between two objects of the same type
  • For example, we need to know what have changed in our DB since the last backup
  • We need to be able to compute such deltas over a wide variety of classes, that are unrelated
  • Of course, doing this by hand for each and every class is not an option

Our diff representation

[Read More]

Play Framework - Beginner Tutorial : How to handle a big json file in play ( more than 22 root variables)

It is not a good practice to have such a big json with many root variables. Nevertheless, we might need to call a rest api that will give a json like this

{
  "a1": ...,
  "a2" : ...,
  "a3" : ...,
  "a4" : ...,
  "a5" : ...,
  "a6" : ...,
  "a7" : ...,
  "a8" : ...,
  "a9" : ...,
  "a10" : ...,
  "a11" : ...,
  "a12" : ...,
  "a13" : ...,
  "a14" : ...,
  "a15" : ...,
  "a16" : ...,
  "a17" : ...,
  "a18" : ...,
  "a19" : ...,
  "a20" : ...,
  "a21": ...,
  "a22" : ...,
  "a23" : ...,
  "a24" : ...,
  ....
}

First approach

Since scala 2.11 we can have case class with more than 22 fields, so the following compiles.

[Read More]

Play Framework - Beginner Tutorial : Make a post request and save the form data in Mongodb

Before the tutorial 

You should :

Tutorial 

Youtube video

After the tutorial

You should be able to :

[Read More]

Scala libraries

Whenever I come I across a Scala library I take a note of it here. This collection is neither complete nor have I used all of these libraries. It is mainly used as a point of reference if I want to find some functionality implemented in a Scala library.

Akka

Server Sent Events for Akka HTTP

toy project implementing RAFT on top of Akka Cluster (not prod ready)

[Read More]

Libraries for Play Framework

Whenever I come I across a Play library I take a note of it here. This collection is neither complete nor have I used all of these libraries. It is mainly used as a point of reference if I want to find some functionality implemented in a Play library.

Akka

This is a simple Play 2.6 module, which allows you to manage akka jobs.

Cache

Play framework 2 cache plugin as an adapter to redis-server check also scala cache libraries

[Read More]

Content writing