REST

Swagger With Play2

Reading Time: 5 minutes What is Swagger : Swagger is very powerful tool for REST API description and API documentation.Swagger API gives a Swagger GUI for humans to learn and test your API.It’s 100% open source.The goal of Swagger is to enable client and documentation systems to update at the same pace as the server. The documentation of methods, parameters, and models are tightly integrated into the server code, Continue Reading

Play 2.4.X : Microservice Architecture using Play and Scala

Reading Time: < 1 minute Playing-Microservices This blog describes a basic Microservice architecture design using Play 2.4.X and Scala. The big idea behind microservices is to architect large, complex and long-lived applications as a set of cohesive services that evolve over time. The term microservices strongly suggests that the services should be small. In short, the microservice architectural style is an approach to developing a single application as a suite Continue Reading

How To Implement logRequestResponse in Spray

Reading Time: < 1 minute Spray has the feature to log request and response of every route through logRequestResponse. We needn’t to add log in each route because it could be done from a single place. This also helps to maintain clean code. Please see below example:- class HubServices extends Actor with HubRoutes { def actorRefFactory: ActorContext = context // logs just the request method and response status at info Continue Reading

Spray with Akka Starter Kit

Reading Time: 3 minutes Over the last few months, Spray is fast becoming the de-facto for all the products that we are working on. Irrespective of whether it is a product which has a full featured UI or a gaming component which needs to provide services for the game to execute in a performant way, Spray has found its use. The best part about Spray being that is very Continue Reading

Testing Jersey Based REST Services with Grizzly

Reading Time: 2 minutes In my last post, we had seen how easy it was to create REST based services with Spring and Jersey. In this post we would quickly see how we can unit test them. Ok, this is not entirely a unit test in the strict sense because we are not testing the resource in isolation but it is a good strategy nevertheless because it helps us Continue Reading

Just REST, it’s Easy With Spring and Jersey

Reading Time: 4 minutes In one of the products that we are working on, there is a need to expose the API as REST so that it can be consumed by the developer community and foster innovation. I did a few prototypes for the combination of dependency injection and REST with Restlet, Guice, Jersey and Spring and finally settled with Jersey and Spring primarily due to the easy configuration Continue Reading