2015-10-05

juan_gandhi: (VP)
2015-10-05 08:24 am
Entry tags:

myflyfit.com

myflyfit.com - a funny app for bicyclists, tracks your movements, meaning, every pedal stroke, so telling you your cadence - in case you are crazy enough to watch it.

(I just liked the idea and the app)
juan_gandhi: (VP)
2015-10-05 09:25 am
Entry tags:

scala lift wtf

So, it creates a transaction wrapper for one http request. If I want to run 1000 transactions in one request... can't figure out if it's even possible.
juan_gandhi: (VP)
2015-10-05 01:53 pm

кӧрткерӧсса выльторъяс

Плиту монтировали-монтировали...


И демонтировали! Без проекта смонтировали!



Вот так и Дамбаск.

Все распилено, все свободны.
juan_gandhi: (VP)
2015-10-05 05:05 pm
Entry tags:

switched to actors

So, in Scala Lift, there's one single transaction per request. And I have to, say, process a thousand records, and then what? I thought about adding a request handler per record, and call it via http. Stupid, eh. There are actors. So I wrote the actor, moved all the functionality there, and now I call that actor. Can process that 1000 in parallel now, big deal. And each has its own transaction of course (just switch to Future).

  def process(lineNo: Int, line: String): Status = {
    importActor !? ((lineNo, line)) match {
      case s:Status => s
      case basura   => onError(lineNo, s"Wrong response from importer: $basura")
    }
  }


I know, it's rather stupid, but well... just having fun