Blog Posts

Update: removed rogue toString call in the second code example, since it was unnecessary (and harmful). Debugging actor systems is no small feat, even when there is IDE support for it. In fact, debugging any asynchronous system for that matter is a rather complicated task. Which is why, especially during development, it is not entirely uncommon to rely on DEBUG ... Read More

The post Akka anti-patterns: logging (the wrong way) appeared first on manuel bernhardt.

When you need to build your Scala project, but have no way to install SBT on your host, you can still do it if you have Docker.

There are few ready to use container images on DockerHub. We create our own.

All we need for that is to prepare a Dockerfile:

 FROM java:latest  
MAINTAINER Nikolay Kushin nikolay@indoo.rs
ENV SCALA_VERSION 2.11.7
ENV SBT_VERSION 0.13.9
ENV SBT_OPTS -Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xss2M -Duser.timezone=GMT
# install sbt
RUN wget https://dl.bintray.com/sbt/debian/sbt-$SBT_VERSION.deb
RUN dpkg -i sbt-$SBT_VERSION.deb
# install scala
RUN wget https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.deb
RUN dpkg -i scala-$SCALA_VERSION.deb
# fetch base dependencies
RUN sbt compile
VOLUME /src
WORKDIR /src
CMD ["sbt"]

Our Dockerfile is relatively easy and self-explaining.

Next step is to build an image. Save Dockerfile in some folder and execute following commande in terminal:

 docker build -t sbt-docker .  

Now when the image is ready we can create container with mounted source folder, containing our Scala project and run SBT.

 docker run -it --rm -v $(pwd):/src sbt-docker sbt docker:stage  

Thats it! Enjoy!
Simply run following script to install latest Scala and SBT on your Ubuntu:
The past weekend I was lucky enough to participate in an event held by Koding (http://koding.com) titled "Global Hackathon" (https://koding.com/Hackathon).
Hackathon - is a kind of time-limited events, where participants work on projects for which in ordinary daily life there is no time as a rule. The main idea is to bring the idea to the finished prototype of the final product in the shortest possible time. Hackathon is named this way because participants can use all possible tools and ways to achieve this goal.


file-2.pngThe event was attended by 2000 teams from all around the world, selected from more than 19,000 applications. Maximum number of participants in the team was equal to 5. Many people like me was not fortunate enough to find teammates and had to work alone. 51 of the judges will find winners among completed projects and the most worthy of them will be awarded.

Weiterlesen »
Last year we started building our web/mobile startup journi (called miavia back then), and I considered 3 different backend languages before finally settling on Scala: PHP. I didn’t want to continue working with a language that had grown into a … Continue reading
It is quite extraordinary what is possible nowadays with a group of interested developers and powerful tools such as Scala and Akka. Three months ago we had our first Akka Workshop here at the Vienna Scala User Group (VSUG), in … Continue reading

i uploaded my slides from my talk at scala-vienna user group. i present two plugin for easier file resource handing and image resizing on-the-fly.

CloudControl (https://www.cloudcontrol.com) is a Platform as a Service solution.

You can deploy on it Java  NodeJS  PHP  Python  Ruby applications as well as a lot of Third-Party Buildpacks including Scala/Play (https://github.com/heroku/heroku-buildpack-play). Its main particularity is that it supports vertical and horizontal scaling.

The following guide explains how to deploy your application on CloudControl.

Weiterlesen »
The new Slick 2.0 database library comes with a simple code generator that generates Scala code for all your tables so you can quickly start coding against your database. It takes into consideration not only the tables and columns, but also primary … Continue reading
Last Saturday I was on Coderetreat 2013 in Vienna. There we tried to implement rules of Conway's Game of Life. During the day I've got a lot of experience in TDD, pair programming and languages I haven't used for a while. One thing I've missed was final implementation of game.

One day after the event I've tried some ideas I'd got before. I've pushed my own implementation of game in my Github repository and created an instance of server on Heroku.

Weiterlesen »