Web

Providing a “Sign-in with Google” functionality using Scala

Reading Time: 4 minutes Continuing our series on providing authentication via third party OAuth/Open ID providers, in this post we look at Google. We have already covered sign in with Facebook and Sign in with Twitter in the past. We walk through a step by step scenario to make it work for a Lift based application. Most of the steps would be the same for Play as well. 1) Continue Reading

Working with Play framework using Scala and MongoDB

Reading Time: 2 minutes Scala : Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. More… Play Framework : Play 2.0 is a high-productivity Scala web application framework that integrates the components and APIs you need for modern web application development. Play is based on a lightweight, stateless, web-friendly architecture. More… MongoDB : MongoDB is a scalable, high-performance, Continue Reading

URL shortening with bit.ly in Scala

Reading Time: < 1 minute Short URL’s are becoming the need of most of the application. We’ve used the bit.ly for the URL shortening in our application. Just a little bit work to do for achieving the URL shortening with bit.ly. Here are the steps to do that : You should have the following credentials in order to call the bit.ly API. i. apiKey : You’d get it on registering Continue Reading

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.

Storing files on Amazon S3 using Scala

Reading Time: 2 minutes Amazon S3 serves the purpose of “storage for the Internet” . S3 stand for ” Simple Storage Service”. Amazon S3 can be used for storing and retrieving any amount of data at any time, from anywhere on the web. You can use simple interface “AWS Management Console” provided by Amazon for creating buckets for storage , adding files in those buckets and for many other Continue Reading

Introducing inheritance and traits in scala

Reading Time: < 1 minute We believe in experiential learning. This knolx session has code examples which Knolders tried while I was explaining it. The objective was to  the to introduce Inheritance and Traits. in this presentation i told about  mixin composition of traits into classes ,ordered traits,traits as stackable modification, and option pattern Here is the presentation I gave.

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

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

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

Integrating Twitter Bootstrap with Play 2.0 using Scala

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