scala

Building Massively Scalable Applications with Akka 2.0

Reading Time: < 1 minute Recently Knoldus, presented at the IndicThreads conference, New Delhi on the power of Akka 2.0. The case study involved a demonstration on how a major white goods company is able to analyse their social feeds in real time and respond back to customers needs. The solution currently runs on a cluster of 40 nodes with 16 cores on each node. The presentation emphasized on the Continue Reading

Harnessing the Power of Nutch with Scala

Reading Time: < 1 minute Knoldus was recently speaking at the IndicThreads conference in New Delhi, India. Here, we talked about Nutch and how easy it was for us to integrate it with Scala and build a scalable web crawler with less than 900 lines of code. The case study and the demonstration made the attendees aware of the power of Scala as a language of choice.

Knolx Session: Introducing Scala

Reading Time: < 1 minute 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

Reading Time: 2 minutes 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

Reading Time: < 1 minute 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

Deploying the Play 2.0 application on Heroku

Reading Time: 2 minutes 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

QuickKnol: Integrating Logback with Scala

Reading Time: 2 minutes 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

Handling Large Data File Using Scala and Akka

Reading Time: 6 minutes 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

Reading Time: 4 minutes 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

Using MongoDB in Scala with Salat

Reading Time: 2 minutes 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

Getting Started with MongoDB using Scala

Reading Time: 3 minutes MongoDB is a document oriented NoSQL database which has gained tremendous popularity on account of its performance and scalability characteristics. It positions itself in the sweet spot near RDBMS which provide depth of functionality and memcache for scalability and performance characteristics. In this post, we would look at connecting with MongoDB running on the local system with a Scala client. To install MongoDB, follow the Continue Reading

Capsules for recovering Scala fever.

Reading Time: 2 minutes Scala is a multi-paradigm programming language that combines the features of object-oriented programming and functional programming. The word “Scala” refers to “Sca(Scalable)+la(Language)” i.e designed to grow with the demands of its users. Scala runs on the Java Virtual Machine. Here We’ll discuss about some of the basic concepts in Scala that make it distinct from other programming languages.Let us start with some of the following: Continue Reading