What kind of “EventBus” to use in Spring? Built-in, Reactor, Akka?

I’m not sure I can adequately answer your question in this small space. But I’ll give it a shot! 🙂 Spring’s ApplicationEvent system and Reactor are really quite distinct as far as functionality goes. ApplicationEvent routing is based on the type handled by the ApplicationListener. Anything more complicated than that and you’ll have to implement … Read more

How can I have an Akka actor executed every 5 min?

You don’t really need an actor to do this in Akka 1.3.1 you can schedule a function to be called every 5 minutes like this: Scheduler.schedule(() => println(“Do something”), 0L, 5L, TimeUnit.MINUTES) However, if you do want it to be an actor for other reasons you would call it like this case class Message() val … Read more

Akka Logging outside Actor

Actually I would redirect Akka logging to slf4j and use this API directly in all unrelated classes. First add this to your configuration: akka { event-handlers = [“akka.event.slf4j.Slf4jEventHandler”] loglevel = “DEBUG” } Then choose some SLF4J implementation, I suggest logback. In your actors continue using ActorLogging trait. In other classes simply rely on SLF4J API … Read more

Why is the error Conflicting cross-version suffixes?

The conflicts appear because: you’ve specified your Scala version to be 2.11 you’ve explicitly specified the Scala version (2.10) for the reactivemongo and poi-scala libraries. The fix is to use the %% operator for those two libraries as well. “org.reactivemongo” %% “reactivemongo” % reactiveMongoVersion, “info.folone” %% “poi-scala” % foloneVersion That’s the purpose of the %% … Read more

How are Java threads heavy compared to Scala / Akka actors?

Scala actors (including the Akka variety) use Java threads. There’s no magic: more than a few thousand threads running simultaneously is a problem for most desktop machines. The Actor model allows for awake-on-demand actors which do not occupy a thread unless they have work to do. Some problems can be modeled effectively as lots of … Read more

Scala actors – worst practices? [closed]

Avoid !? wherever possible. You will get a locked system! Always send a message from an Actor-subsystem thread. If this means creating a transient Actor via the Actor.actor method then so be it: case ButtonClicked(src) => Actor.actor { controller ! SaveTrade(trdFld.text) } Add an “any other message” handler to your actor’s reactions. Otherwise it is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)