Advertisements

Author: Sidharth Khattri

How to setup and use zookeeper in scala using Apache Curator

Reading Time: 2 minutes In order to use Zookeeper to manage your project’s configurations across the cluster, first we will setup the zookeeper ensemble on our local machine (setup is for testing on a single machine) by following these steps: 1) Download a stable zookeeper release 2) Unpack it at three places and rename it to: /home/user/Desktop/zookeeper1, /home/user/Desktop/zookeeper2, and /home/user/Desktop/zookeeper3 3) In order to use zookeeper we will need Continue Reading

Advertisements

How to flatten nested tuples in scala

Reading Time: 2 minutes In a project which I’ve been working on, I encountered a situation to flatten a nested tuple but couldn’t come up with a way to do so, hence out of curiosity I started googling about it and came to the following conclusion. As for an example I had a structure something similar to the one mentioned below, though not identical: val structureToOperateOn = List(List(“a1″,”a2″,”a3”), List(“b1″,”b2″,”b3”) Continue Reading

Remote profiling using SSH Port Forwarding (SSH Tunneling) on Linux

Reading Time: < 1 minute In this blog post I’ll lay out few steps that are needed for remote profiling using SSH Port Forwarding (SSH Tunneling) using Yourkit profiler.   Steps to be followed on remote machine: 1) Download Yourkit profiler from official Yourkit website. 2) Extract the downloaded file anywhere. 3) What we need to do now is find the file named libyjpagent.so in the extracted folder corresponding to Continue Reading

Google Sign-In using Clojure

Reading Time: 2 minutes Last time I wrote an article for providing Facebook Sign-In using Clojure. This article will guide you to add Google Sign-In functionality in your web application using clojure. We’ll use compojure.core for routing, clj-http.client for http requests, cheshire.core for parsing json and noir.response for redirections. First, make a new google project to get your project’s Client ID and Client Secret Key from this URL: https://console.developers.google.com/project. Now Continue Reading

Facebook Sign-in using Clojure

Reading Time: 2 minutes In order to provide Facebook sign-in functionality you need to create a new Facebook App from this url: https://developers.facebook.com/docs/facebook-login. Provide the redirection URI that you’ll use for the App. After setting up the app you’ll get an App ID and App Secret key. We’ll use “clj-oauth2.client” to redirect a user to the authentication page, “clj-http.client” for HTTP requests, “cheshire.core” to parse Json string in order Continue Reading

Parallelism in Clojure, Part I

Reading Time: 4 minutes An axiom of microprocessor development stating that the number of transistors on integrated circuits doubles approximately every two years is analogous to the fact the processing power doubles during the same period, relative to the cost or size. This has lead to the need of parallelism in programming languages and Clojure is one such language which provides a variety of functions for your multi-threaded code. Continue Reading

Knoldus Pune Careers - Hiring Freshers

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