Oct. 5th, 2015

juan_gandhi: (VP)
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)
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)
Плиту монтировали-монтировали...


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



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

Все распилено, все свободны.
juan_gandhi: (VP)
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

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

September 2025

S M T W T F S
 1 2345 6
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 8th, 2025 01:24 pm
Powered by Dreamwidth Studios