Posts

Spring Boot Apps- Technical Issues and Challenges

Image
Hi, I am Malathi Boggavarapu working at Volvo Group and i live in Gothenburg, Sweden. I have been working on Java since several years and had vast experience and knowledge across various technologies. This post is related to technical challenges that were being faced at daily work regarding Spring Boot applications. Please note, anyone who is willing to share the problems and solutions regarding Spring Boot applications, you are welcome to post them in comment box. I will add them to this post so that it would be helpful for others. Let's also talk a bit about Spring Boot. Spring Boot makes life easier when we want to integrate different libraries and frameworks in your application due to its dependency management structure. Spring boot causes intelligent collection of dependencies "The bill of materials" or BOM. The spring developers have taken the time to match up all the frameworks that you may want to include in your application with approp

Best Design Practices for securing webapplication

Hi, I am Malathi Boggavarapu working at Volvo Group and i live in Gothenburg, Sweden. I have been working on Java since several years and had vast experience and knowledge across various technologies. This post will introduce you to the design practices about User authentication which is required for every web application. As you all aware that user authentication is the gateway for the application where user is verified against different set of rules and guidelines inorder to access the application services. Now-a-days Cyber attacks has become very common in this computer world and companies need to protect their Developement systems and software in an effective manner to thwart the cyber crimes. As we all know User authentication mainly consists of Loginname and Password. Below are some of the best practices we could apply during authentication inorder to safegaurd the application and i also discuss a bit about performance of the application now and then. Design

AWS - DeepLens (A Deep Learning Camera)

Image
Hi, I am Malathi Boggavarapu working at Volvo Group and i live in Gothenburg, Sweden. I have been working on Java since several years and had vast experience and knowledge across various technologies. DeepLens - A Deep Learning Camera Amazon's Cloud computing subsidiary, Amazon Web Services (AWS), has launched  DeepLens - A Deep Learning camera for all the developers in US.  It is the new way to learn Machine Learning. T he product is about teaching the basics of deep learning which is one of the machine learning technique with example projects available and pre-trained computer vision models that can detect faces, objects, and recognizing more than 30 kind of actions such as guitar playing, tooth-brushing, applying lipstick. DeepLens is the Amazon's equivalent to Google's Clips Smart camera but it is targetted for Developers instead of Consumers. Technical Specifications DeepLens is a 4-Megapixel (1080

Linux command line - Working with text using grep and sed

Image
Hi, I am Malathi Boggavarapu working at Volvo Group and i live in Gothenburg, Sweden. I have been working on Java since several years and had vast experience and knowledge across various technologies. In this post we discuss about Linux commands  grep and sed and the corresponding options that are helpful at work. When working with text on a linux system, we often need to search for particular string in log file or in some code or in some configuration file. Well there is always an option to open the file and look through it but there is a better tool to do. That is grep command. First let's create a text file with some text in it and we work on grep command and it's options using the text file content. I prefer to use Cygwin shell to execute the commands of Linux. But it is upto you to determine which shell you want to use. Open the shell and create a text file with some content in it. I added the following text to the grep_demo.txt file. Pleas

How to get client Ip Address using Java HttpServletRequest

Hi, I am Malathi Boggavarapu working at Volvo Group and i live in Gothenburg, Sweden. I have been working on Java since several years and had vast experience and knowledge across various technologies. In this post we will see how to get IP address from HttpServletRequest.  For the web application which is not running behind the proxy server, we can directly get from the  HttpServletRequest  request object as below remoteAdr = request.getRemoteAddr(); For suppose if your web application is behind a proxy server, load balancer or Cloudfare then you should get client Ip address using the Http request header  X-Forwarded-For  ( XFF) . See below. private String getIpAddress(HttpServletRequest request) { String remoteAdr = "" ; if (request != null ){ remoteAdr = request.getHeader( "X-FORWADED-FOR" ); if (remoteAdr == null || "" .equals(remoteAdr)) { remoteAdr = request.getRemoteAddr();

Question and answers related to Sql queries

Hello, In this post, questions about oracle Sql would be placed with answers. From day to day this post will be updated with question and answers. I have got few questions today to post and hence i did. What would be the default size of varchar2 in oracle? The default size of varchar2 in oracle is 4k and the default value of varchar2 is 32k when it is being used as input parameter in stored procedure or a function. What would be the recommended size of database column to store IP address? There are two types of IP address. One is IPv4 and another one is IPv6. Each of the numbers between the periods in an IP address range between 0-255 which occupies one byte each. so the total recommended size for IPv4 addresses is 4*8 = 32 characters But IPv6 addresses are 128 bits as opposed to 32 bits (IPv4 addresses). IPV6 addresses are usually written as 8 groups of 4 hex digits seperated by colon (2001:0db8:85a3:0000:0000:8a2e:0370:7334. So 39 characters is recommende

Bash - Execute Pl/Sql script from Shell script

Hi, I am Malathi Boggavarapu working at Volvo Group and i live in Gothenburg, Sweden. I have been working on Java since several years and had vast experience and knowledge across various technologies. In this post we see how to build a bash script which executes pl/sql script, retrieve data and send it to graphite server using NetCat. We also go through various basic bash commands such as do/while, nc and also we use bash functions too. NetCat is used to connect to the servers and stream out the data to them. You can visit wiki to get basic understanding about it.  https://en.wikipedia.org/wiki/Netcat To understand what graphite is visit the following link https://graphiteapp.org/ Now let's start with pl/sql script to retrieve data inorder to send it to graphite server. Pl/sql script A table holds the size of each table exists in the database every 24hrs. The query is to get the latest record of each table and it's size and some other columns too.