Play framework security with Silhouette

Knoldus Blogs

Silhouette is a security library for Play framework. Its basically a core only fork of Secure Social, which is another security library for play framework. Secure Social is a great framework for lots of user but my experience with secure social is not that good, nor with some of my friends and colleagues who use Play framework in their application. It’s been thrown out from the projects we worked on. However I am not going to talk about secure social here, technologies are like that only, it works for some people and doesn’t work for some other people, and for whom it do not work they find or build some alternatives. Silhouette is born because of securesocial’s problems, mostly because of its tight coupling. Silhouette is a loosely coupled security library. It gives users the flexibility to inject their own implementation when things don’t seem work with the given implementation.

View original post 1,099 more words


Elasticsearch: CURD Operations and sorting documents by time stamp with scala using java api of elastic search

Knoldus Blogs

Elasticsearch is an open-source search engine built on top of Apache Lucene™, a full-text search-engine library. You can read it more on their website.

Elasticsearch is also written in Java and uses Lucene internally for all of its indexing and searching, but it aims to make full-text search easy by hiding the complexities of Lucene behind a simple, coherent, RESTful API.

In this post, we will learn to use elasticsearch java api in Scala. The scenario will be that we will perform CRUD operation on elasticsearch. Then searching and sorting on the basis of time stamp and retrieve specified size of document  from elasticsearch  index and validate it.

we will start with adding dependency of elasticsearch in the project. At the time 1.5.2 is the latest. Here is the snippet in build.sbt file.

name := “crudOnEs”

scalaVersion :=  “2.11.4”

libraryDependencies  ++= {
“org.elasticsearch” % “elasticsearch” % “1.5.2”

View original post 742 more words