This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // initialise actor via companion object | |
| val msg = "SHARE #lat #lon" | |
| context.actorOf(MessageHandler.props(msg), "MessageHandler") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package components | |
| /** | |
| * Database component | |
| */ | |
| trait MsgDbComp { | |
| val msgDb: MsgDb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package actors | |
| import actors.SenzSender.SenzMsg | |
| import akka.actor.{Actor, Props} | |
| import components.MsgDbComp | |
| import org.slf4j.LoggerFactory | |
| import scala.concurrent.duration._ | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package components | |
| import com.datastax.driver.core.querybuilder.QueryBuilder | |
| import db.SenzCassandraCluster | |
| /** | |
| * Cassandra based MsgDbComp implementation | |
| */ | |
| trait CassandraTransDbComp extends MsgDbComp { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val msg = "SHARE #lat #lon" | |
| val messageHandlerComp = new MessageHandlerComp with CassandraTransDbComp with SenzCassandraCluster | |
| context.actorOf(messageHandlerComp.MessageHandler.props(msg)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # via apt get | |
| sudo apt-get install lxc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lxc-checkconfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # command | |
| sudo lxc-create -n <container-name> -t <template> | |
| # example | |
| sudo lxc-create -n mongodb -t ubuntu | |
| # mongodb is the container name and ubuntu is the template | |
| # list of available templates at /usr/share/lxc/templates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo lxc-ls --fancy |