In grails app, there might come scenarios where one need to create a non-persistent domain rather than creating a command obejct or POJO / POGO. GORM comes with a handy static property mapWith which has default value GORM (which associates any domain with gorm persistence layer). To make a domain non persistent set mapWith=”none”. For […]
There are times when we need to parse the URL mappings in our grails app. In my case we have a REST API. In which we have implemented a generic query method for all controllers but it is available to only a few using custom URL mappings. We wanted to create test cases in such […]
Hi, There arise several situations where you need to implement a certain flow comprising of various tasks. These tasks may be executed independent of each other and it gives us an opportunity to separate out the different parts of a flow into separate threads that can be executed “asynchronously”. I had a very similar use […]
I recently had a situation where I had the exact same criteria in multiple domains. I found a way to DRY them using Closure.delegate. I wanted to share that in this post. Just including the relevant details the domains that I had were like the following. [code language=”groovy”]class Subscription { static belongsTo = [topic: Topic] […]
AWS Lambda has been launched with the new features for Mobile Developers. The service was launched last year with the preview version at AWS re:Invent. We have given the detailed description about AWS LAMBDA in our previous blogs : An Introduction To AWS Lambda and AWS Lambda walk-through. It is a compute service that makes […]
To start, we create a Lambda function to consume events published by Amazon S3. For any object uploaded to a bucket, S3 will invoke our Lambda function by passing event information in the form of function parameters. AWS Lambda executes the function. As the function executes, it reads the S3 event data, logs some of […]
Yet again Amazon ended the AWS Summit in San Francisco in the best fashion setting various benchmarks for other Cloud Services providers. One of the services which was announced towards the end of the keynote was the Amazon Elastic File System. Amazon EFS is a file storage service for Amazon EC2 instances. In my opinion […]
We Can upload file on Amazon S3 Server directly without intervention of web server by using REST API call on S3 Server. Use Case : File upload was required on mobile app without integrating SDK because integrating SDK causes app to be heavier in size and also if it goes through our web server than it would […]
In almost every project we need to deal with files. But what if size of file is too large ?? Heap gets full and JVM rewards us by throwing OutOfMemoryError. Java provides a class called MappedByteBuffer (part of JavaNIO), which helps us dealing with large size files. MappedByteBuffer is a class which creates Virtual-memory mapping […]
This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which […]