Posts

Showing posts from February, 2022

Rest API simple Application with http mothods

We will be developing REST API using JAX-RS (Jersey) and Tomcat server and we will be implementing basic 4 methods so lets get started Here is pom.xml file: <project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.dpq.webservices</groupId><artifactId>SimpleRestApiApp</artifactId><packaging>war</packaging><version>0.0.1-SNAPSHOT</version><name>SimpleRestApiApp</name><build> <finalName>SimpleRestApiApp</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1&

Rest API understanding with its Architecture

REST is an acronym for  RE presentational  S tate  T ransfer and an architectural style for  distributed hypermedia systems . 1. Principles of REST:     Uniform Interface: The following four constraints can achieve a uniform REST interface: Identification of resources  – The interface must uniquely identify each resource involved in the interaction between the client and the server. Manipulation of resources through representations  – The resources should have uniform representations in the server response. API consumers should use these representations to modify the resources state in the server. Self-descriptive messages  – Each resource representation should carry enough information to describe how to process the message. It should also provide information of the additional actions that the client can perform on the resource. Hypermedia as the engine of application state  – The client should have only the initial URI of the application. The client application should dynamically driv

United Kingdom Sponsor Data Analysis with Java Streams and Parallel Streams and comparisons

United Kingdom Sponsor Data Analysis with Java Streams and Parallel Streams and comparisons Things which are covered: Reading CSV data using CSVReader check count preparing List of objects to process evaluating range check checking whether a given company is registered or not processing above point by streams and parallel streams comparing times b/w Streams and parallel streams inconsistency in parallel streams Inconsistency in parallel streams: Here while searching element in records which returned from parallelstream objects don’t give guarantee because records are splits to be processed in parallel and while comparing one chunk of data is beings considered to compare, that’s why there is inconsistency in parallel streams and how Spark will handle this with minimum code with consistency we will see in upcoming post Later we will compare the same analysis with Spark and see differences in execution and with respect to time comoplexity Implementation: package com . dpq . sponsors . dr