Posts

Apache Http Server Configuration using httpd.conf

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 various options that are available in Apache Http server configuration file httpd.conf. ServerTokens ServerTokens Prod - Server sends (ex, ): Server: Apache ServerTokens Major - Server sends (ex, ): Server: Apache/2 ServerTokens Minor - Server sends (ex, ): Server: Apache/2.0 ServerTokens Min - Server sends (ex, ): Server: Apache/2.0.41 ServerTokens OS - Server sends (ex, ): Server: Apache/2.0.41 (Unix) ServerTokens Full (or not specified) - Server sends (ex, ): Server: Apache/2.0.41 (Unix) PHP/4.2.2 MyMod/1.3 ServerRoot - Root directory of Apache http server PidFile - [Run time directory]/httpd.pid - The file in which the Server should record its Process identification number when it starts. Timeout - 60 - The number of ...

Working with Linux command line

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 explain different commands used in Linux environment. I use Cygwin to interact with Linux server remotly and access and process different files over there. Let's get started. ssh [remote_server_ip_address] - Connect to the remote server. scp -r  xxx.pl  user@127.0.0.0:/tmp - Connects to the remote server with specified IP address with user and copy the file xxx.pl to the folder tmp on remote server. scp -vp user@127.0.0.0:/var/logs/audit\* /cygdrive/c/logs/auditlogs - Connects to the remote linux server with specified IP address as user and copy all the files from the folder /var/logs/audit to the destination windows folder c/logs/auditlogs . As i was working with Cygwin to connect to remote linux server, the destination folder should be ...

Accessing HttpServletRequest in normal Java class

Accessing HttpServletRequest in normal Java class  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. Recently i came across the situation at work where i need to access HttpServletRequest in a normal Java class inorder to get Ip Address from the request. In my normal Java class i do not have direct access to the request and hence i used the below code to do that. But the normal Java class should be the part of HttpServlet request thread. It means that the normal Java class is being called from a HttpServlet request thread. ServletRequest servletRequest = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); if(servletRequest instanceOf HttpServletRequest) {    ipAddress =  ((HttpServletRequest)request).getHeader(" X-Forwarded-For "); } if(ipAddress ...

Problems and Solutions regarding Fedora VM

Hi, This post addresses the problems developers face in Fedora VM in their daily work. How to configure proxies to get internet connection in Guest VM? - Login to Fedora VM. - Click on arrow symbol located next to Battery icon. It may differ according to the flavour of VM     that you use. - Choose Wired Connected -> Wired Settings - Go to Network proxy and click on Settings icon. - There you go!!! Choose option Manual and set Http and Https proxies. Now you could able to access the internet in Guest VM too. Please add your experiences too. It would be helpful for others. find . -name scooter\* - find a file in a directory from a command line sudo mount -t vboxsf projects /home/malathiboggavarapu/Shared - Mounts the folder projects to /home/malathiboggavarapu/Shared in Fedora cp [src][dest] - Copies the file from src to dest mv [src][dest] - Moves the file from src to dest history | grep mount - Find mount from history. If history contains some com...

Load Balancing using Spring Cloud Netflix Ribbon

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 teaches you about how to acheive Client side LoadBalancing using SpringCloud Netflix Ribbon Api. So let's jump start into the details. First we learn what is meant by LaodBalancing and the differences between Client side and Server side Load Balancing and also we see which one is the best fit for MicroServices. What is Load Balancing Simply put, Load balancing is a way to improve distribution of work load across multiple computing resources -Wikipedia The most important thing you need to know is what role does Load balancing plays in cloud native architecture. It would be very clear if we understand the difference between load balancing in cloud and non-cloud native architecture. In non-cloud native application, we go from having multiple instances...

Truth About the loss of jobs due to automation In 3 Minutes – wake up NOW!!!

Image
Job loss has been a trend which has been fluctuating across the decade due to various reasons starting from global conflicts to recessions. As we enter into the digital era, the new threat which is showing up is job loss due to “ Automation ”. Unlike earlier automation through computerization and Information technology which resulted in the generation of jobs, the upcoming rapid automation empowered with Artificial Intelligence (AI) shows a negative trend in the future job market. What could be the reason?  The earlier automation eliminated repetitive and low-value jobs and in turn generated high-value jobs which generated abundant opportunities for highly skilled knowledge workers. But what is the issue with the upcoming Automation? The answer to that is the upcoming automation empowered by Artificial Intelligence and Machine Learning can replace jobs which need human intelligence. This will eliminate jobs of high skilled workers too. At the sam...

Gateway Service using Spring Cloud Netflix Zuul

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 will see how to map our MicroServices in the Cloud using Intelligent Routing via Netflix Api. So what is meant by Intelligent Routing? Let's jump start into the details. Intelligent Routing Each of the individual services would be running on different port, different addresses or a combination of both. And they also likely have different paths and different API's to interact with. As a user or a client of those services such as mobile app or web app, interacting with each of the individual services which could easily be in double or triple digits would be a nightmare. Instead we can use Intelligent Routing to make our application appear as it was a single system.  Intelligent Routing via a Gateway Service Routing is implemented via ...