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

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 17th, 2025 11:35 am
Powered by Dreamwidth Studios