Author Archives: Ajitesh Kumar

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com

AWS DynamoDB PutItem Java Example to Create Items

dynamodb putitem example in Java

In this post, you will learn about Java code example related to creating an entry in the DynamoDB table using PutItem API. The following are some of the points considered later in this article: Configure Dev Environment with AWS Credentials Update POM.xml or Gradle file to include DynamoDB library Use PutItem API to create an Item in DynamoDB table PutItem API example with Spring Boot app Configure Dev Environment with AWS Credentials Make sure you have configured your dev environment with appropriate Access Key ID and secret access key. You could do that by executing the command such as following: If you have configured it correctly, you should be able …

Continue reading

Posted in AWS, Java. Tagged with , .

DynamoDB – Partition Key vs Composite Partition Key

dynamodb partition key vs composite primary key

AWS DynamoDB has two key concepts related to table design or creating new table. A beginner with DynamoDB is found to be wondering on whether to use a partition key or composite partition key when creating a new table. Composite partition key is also termed as composite primary key or hash-range key. In this post, you will learn about some of the following: Is the partition key same as the primary key of a table? What are composite partition key or composite primary key? When to use partition key vs composite partition key? This post presumes that you have got a good understanding of partition concept and how DynamoDB stores …

Continue reading

Posted in AWS, Database. Tagged with .

Build IVR System using Amazon Polly, Lambda and Twilio

Build IVR with Amazon Polly, S3, Lambda and Twilio

Building an intelligent IVR system with a Bot handling the interaction with your end users and bringing in humans based on pre-defined events would bring a lot of automation and remove mundane manual activities which takes up lot of time for a person. This can be achieved using cloud services provided by cloud providers such as Amazon, Google, Azure etc and communication service providers such as Twilio. In this post, you will learn about how to create or build an intelligent or smart IVR system using some of the following: Use Amazon Polly to create one or more custom text-to-speech audios and store the same at predefined locations in AWS …

Continue reading

Posted in AI, AWS, Java, Tutorials. Tagged with , , .

Amazon Polly Text-to-speech with AWS S3, Twilio Java App

Amazon Polly - S3 - Twilio - Spring Boot - Java

Amazon Polly can be used with Twilio phone service and AWS S3 to create an automated alert system which does (achieves) some of the following: Convert text to speech (using Amazon Polly) Upload audio (speech stream) created using Polly service on AWS S3 bucket Use Twilio Call service to play the audio to the destined phone number The following represents the application architecture diagram (communication flow viewpoint) representing communication between  Spring Boot app and Amazon Polly, Amazon S3 and Twilio Service to achieve automated phone alerts based on text-to-speech conversion. This can be used to create automated alert/notification system around following use cases which makes phone call to concerned personal …

Continue reading

Posted in AI, AWS, Java.

Java Code to Invoke Twilio Rest API to Play Audio

Java and Twilio Rest API for Phone Calls

This post represents sample Java code (example) to demonstrate how to invoke Twilio Rest API to play pre-recorded audio in a phone call made to the users. The code could be used to in some of the following usecase: Alert users via phone call in relation to different kind of critical events such as security issues, production downtime, production issues etc. Play different kind of messages to users in relation to different occasions such as birthdays, anniversaries etc. The code can be used to play audio stored at locations such as cloud platform storage (AWS storage, Google/Azure storage etc.) The key is to provide public access (READ permission) to these …

Continue reading

Posted in Java. Tagged with , .

Twilio & AWS S3 using Java & Spring Boot – Code Example

twilio and AWS S3 with Java and Spring Boot

Twilio is a very popular communication service which could be used to send SMS, make the phone or video calls to people in different countries. In this post, you will learn about creating Java and Spring Boot app in relation to how to use Twilio phone service to make a phone call and play audio stored at AWS S3 bucket. The following are some of the related use cases: Play security and other alerts via phone calls Play messages of any kind via phone calls The following are some of the topics which would be covered in this post: Define VoiceService interface defining APIs Create Twilio Voice Service implementation Load …

Continue reading

Posted in AWS, Java. Tagged with , , , .

AWS Temporary Credentials with Java & Spring Boot

AWS Temporary Security Credentials - AWS STS

AWS Security Token Service (STS) is an Amazon web service which enables you to request temporary, limited-privilege credentials for AWS Identity and Access Management (IAM) users or for users that you authenticate (federated users). By default, the AWS Security Token Service (AWS STS) is available as a global service, and all AWS STS requests go to a single endpoint at https://sts.amazonaws.com. You can optionally send your AWS STS requests to endpoints in any of the AWS regions shown in the table that follows. In this post, you would learn how to use AWS security token service to create temporary security credentials with Spring Boot and Java app. I would recommend …

Continue reading

Posted in AWS, Java, Tutorials. Tagged with , , .

10 Spring Framework Interview Questions for Freshers

Spring framework interview questions for freshers

Spring Framework is one of the most popular and widely used Java frameworks which makes it very easy to create a Java application/web application using several out-of-box framework components provided by Spring. Thus, it is imperative that beginners starting to do Java web app would end up using Spring framework for building the app. From that perspective, it becomes of great importance for beginners to take note of some of the basic concepts related to which interview questions can be asked. In this post, you will learn some of the Spring framework fundamentals concepts which could be asked in form of interview questions and answers. These questions and answers may …

Continue reading

Posted in Career Planning, Freshers, Interview questions, Java. Tagged with , , .

Amazon S3 with Spring Boot & Java – Sample Code

amazon S3 with Spring Boot and Java

Amazon Simple Storage Service (S3) is an AWS object storage platform which helps you to store the files/data in form of objects, and, store and retrieve any amount of data from anywhere – websites and mobile apps, corporate applications, and data from IoT sensors or devices. Each file stored in Amazon S3 (as an object) is represented using a key. The following are some of the usecases where S3 could be used. Thus, it becomes of utmost importance to understand how to interact with Amazon S3 API using AWS SDKs including AWS Java SDK. Backup & recovery Data archiving Big data analytics Disaster recovery Cloud-native application data Hybrid cloud storage …

Continue reading

Posted in AWS, Java, Tutorials. Tagged with , , .

Amazon Polly Hello World with Java & Spring Boot

amazon polly with spring boot and java

Amazon Polly is one cool AWS service which can be used to achieve requirements such as creating business, security alerts via phone call. When integrated with communication providers such as Twilio, several value-added services could be created using Amazon Polly AWS service. In this post, you will learn about creating a sample Java app which uses Amazon Polly service for converting text to speech. You should be able to listen to the following text using the program given below: Hello World! How are you doing? This is Polly. I am happy to talk with you. The following are some of the aspects covered in this post: Create a Spring Boot app …

Continue reading

Posted in AI, AWS, Cloud, Java, Tutorials. Tagged with , , , .

Spring Boot CommandLineRunner Code Example

spring boot app using command liner

Spring Boot helps you quickly get started with building a Spring-based web app in no time. All you need to do is go to Eclipse IDE, create a new Spring Starter Project and that is it. This is provided you installed Eclipse plugin, Spring Tools (aka Spring IDE and Spring Tool Suite) by going to Help > Eclipse Marketplace… and searching for “spring tools” keyword. Often, one wants to run a Spring Boot app as a Java application as like a traditional Java program and test different parts of their app. In this post, you will get a template code for quickly getting started with Command Liner which would help …

Continue reading

Posted in Java, Tutorials. Tagged with , , .

Python Quick Coding Tutorials for Experienced Developers

python tutorials for experienced developers

Learning Python has taken centerstage for many developers as Python is one of the key language for working in the field of data science/machine learning. If you are an experienced developer, this post would help you quickly get started with Python programming. In this post, you will quickly learn some of the following in relation to Python programming: Data types Input/output operations Defining functions Conditional expressions Looping constructs String functions Defining Module Defining Classes Exception handling Python Programming Concepts Data types: Python interprets and declares variables when they are equated to a value. The following represents how variables are casted to specific data types. float(variable): Casts variable to float int(variable): …

Continue reading

Posted in Python, Tutorials. Tagged with .

How to Get Started with Amazon Polly using AWS CLI

how to setup amazon polly with aws cli

Amazon Polly is a text-to-speech service which turns text into life-like speech, allowing you to create applications that talk in a human voice. The human voice could be selected appropriately while configuring the service based on the region/location where the speech needs to be delivered. For example, for India, it supports voice with Name as Aditi and Raveena. The complete list can be found on this page, AWS Polly Available Voices. There could be many applications which could be built around Amazon/AWS Polly by integrating Polly with other AWS services or telephony services such as Twilio. For example, phone alerts/notifications, reminders, feedback, results etc. In this post, you would learn …

Continue reading

Posted in AWS, Cloud, Tutorials. Tagged with .

8 Machine Learning Javascript Frameworks to Explore

javascript framework for machine learning

Javascript developers tend to look out for Javascript frameworks which can be used to train machine learning models based on different machine learning algorithms. The following are some of the machine learning algorithms using which models can be trained using different javascript frameworks listed in this article: Simple linear regression Multi-variate linrear regression Logistic regression Naive-bayesian K-nearest neighbour (KNN) K-means Support vector machine (SVM) Random forest Decision tree Feedforward neural network Deep learning network In this post, you will learn about different Javascsript framework for machine learning. They are some of the following: Deeplearn.js Propel ConvNetJS ML-JS KerasJS STDLib Limdu.js Brain.js DeepLearn.js Deeplearn.js is an open-source machine learning Javascript library …

Continue reading

Posted in AI, Data Science, Javascript, Machine Learning. Tagged with , , , .

Docker UI App – How to Get Started with Docker UCP

Docker UCP Dashboard

Docker Universal Control Plane (UCP) is a containerized web application (UI-based) that runs on Docker Enterprise Edition and makes it easier to deploy, configure, and monitor your applications at scale. You could as well get started with Docker UCP on your Docker community edition (CE). In this post, you would learn about some of the following: Brief introduction to Docker UCP Installation instructions for UCP Logging into UCP Brief overview of Docker UCP dashboard Brief introduction to Docker UCP One can do some of the following using Docker UCP: From Docker UCP UI, deploy applications using docker-compose.yml Using Docker UCP CLI, deploy applications using docker-compose.yml. Commands such as docker stack …

Continue reading

Posted in Dockers. Tagged with .

Docker UI App – How to Install Portainer

Portainer is a Docker UI app which can be used to manage one or more docker environments locally or remotely with ease. It provides a detailed overview of Docker environment including UI access to manage containers, images, networks and volumes. In addition, it helps in managing different aspects of Docker environment such as managing Docker images, containers etc.  One of the most cool features is user management. You would be able to create users and associate it with different Docker environments (locally or remotely). In this post, you will learn about how to install Portainer on your Linux desktop environment having Docker runtime engine. How to install Portainer on Linux …

Continue reading

Posted in Dockers. Tagged with .