Tech Blogs

Some strong “building-blocks” of scala (Tutorial 1 : Lists)

Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. Scala supports functional programming & is a pure object-oriented language in the sense that every value is an object. Let us discuss about some of the strongest building blocks of Scala. Scala Lists: Lists are an important data structure in many Scala programs. A list Continue Reading

Knolx Session: Introducing Scala

We organize KnolX sessions regularly at Knoldus so that our learning spreads in our organisation. This KnolX session had Scala flavor written all over it. We believe in experiential learning. This session has code examples which Knolders tried while I was explaining it. I combined sbt, Scala, Scala collections and ScalaTest together in this presentation. The objective was that by the end of Knolx session Continue Reading

Liftweb JSON serialization and deserialization using Scala

We are working on a Scala project using Play framework. We had written the Serializers and Deserialzers for parsing the JSON data that contains different data types like ObjectId , Scala Enumeration etc. We are using net.liftweb.json for writing and parsing the JSON data. We were having the JSON looks like as : [{“id”:1,”school”:”Cambridge”,”year”:{“name”:”FirstYear”},”major”:”Science”,”degree”:{“name”:”Bachelor’s”},”Date”:”01/05/2011″}] The year field here is an scala enumeration and the Date Continue Reading

Using GridFS within Scala to store large files in MongoDB

GridFS is a specification for storing large files in MongoDB. Some of the features of GridFS are : * GridFS tends to handle large numbers of files better than many file systems. * Query Support is good. * If you have certain files that change a lot then it makes sense to store them in GridFS so you can modify them in one place and Continue Reading

QuickKnol: Reading Configuration Files in Scala

There are several ways of reading configuration files in Scala including the java properties way with the deprecated Configgy and quite some more. One way which is easy and comes in handy is with the Typesafe Config project which is also used in Akka. Let us quickly see how to set it up, You would need to include the following dependency in your build.sbt or Continue Reading

Deploying the Play 2.0 application on Heroku

We are working on a project using Play freamework with Scala programming language. Here we’ll discuss about the deployment of the play application on Heroku. This is a very straightforward process. You just have need to follow some simple steps and your application will be on Heroku in minutes. 1. Heroku needs a file named ‘Procfile‘ for each application to be deployed on it. Procfile Continue Reading

ZeroMQ Module In AKKA 2.0 Some Gotchas

Akka framework supports ZeroMQ in its ZeroMQ extensions module. Akka is a great framework and we have our product built on its version 1.3x. We were looking at ZeroMQ support in our product and we stumbled on this issue. We found that ZeroMQ applications built on Akka extensions are running slower than an application built in plain scala. Please read about our discussion thread on Continue Reading

QuickKnol: Integrating Logback with Scala

Logback is the successor of Log4j and is one of the better logging frameworks around. In this post, we would quickly see how to set it up on a Scala project and how to start using it. The relevant dependency to be included in your build.sbt is libraryDependencies += “ch.qos.logback” % “logback-classic” % “1.0.1” Once, you have this set, next you have to get a Continue Reading

Integrating Twitter Bootstrap with Play 2.0 using Scala

We spent more than a few hours in getting the boostrapping right for Play 2.0 RC3 and twitter bootstrap. Following is a summary of steps we followed and some pitfalls that we encountered. For starters, you can start by having a look to the sample play application for a todo list. Here we are going to discuss about the twitter bootstrap integration using ‘Build.scala‘ file. Continue Reading

Handling Large Data File Using Scala and Akka

We needed to handle large data files reaching size Gigabytes in scala based Akka application of ours. We are interested in reading data from the file and then operating on it. In our application a single line in a file forms a unit of data to be worked upon. That means that we can only operate on lines in our big data file. These are Continue Reading

Intercepting Nutch Crawl Flow with a Scala Plugin

Apache Nutch, is an open source web search project. One of the interesting things that it can be used for is a crawler. The interesting thing about Nutch is that it provides several extension points through which we can plugin our custom functionality. Some of the existing extension points can be found here. It supports a plugin system which is used in Eclipse as well. Continue Reading

What can be done when the PO isn’t empowered?

A fairly common situation in organizations is the presence of a PO without authority. It is common for a BA to play this role, and mainly due to the mistaken belief that functional knowledge is  the only criteria for a PO. Also the term ScrumMaster suggesting an all important person in a move to Scrum, contributes to this thinking. As in many things the best Continue Reading

Using MongoDB in Scala with Salat

In our last post, we had seen how easily we could access MongoDB with the Casbah driver. In this post, we would have a sneak peak at Salat. Salat is a bidirectional, serialization library which helps us work with MongoDB’s DBObject. To quicly get started with Salat, you would need to include the following dependency in your Build.scala We would also need the dependency for Continue Reading

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!