servlet vs RESTful web service

  • REST is a software architecture “style”;
  • Servlet is a server-side technology.

You can, for example, implement REST-like services using Servlets.

  1.  Servlets are Java specific but RESTful web services are not.
  2. Servlets are API but RESTful is not.
  3. RESTful web service can use Servlets as there implementation but vice versa is not true.
  4. Servlets can run in Servlet container only but RESTful services can run in web container as well.
  5. RESTful talks about Resources/Entities/Verbs and gives you more Specific way to use the services i.e There is clear explanation on the usage of HTTP verbs.
  6. Request handling in both is totally different e.g. Servlets are multi-threaded inherently but RESTful services are not.
  7. If you want to share the RESTful services with other teams/client/public to consume there are plenty of Document tools which can generate documentation for your REST services (e.g swagger) but you won’t find that kind of documentation tools with Servlets.

 

There are two flavours of webservices 1) SOAP based 2) RESTful webservices.

Difference between servlets and soap based webservices: i) these webservices can’t be directly accessed through browser. ii) We need not to write webservices prototype separate, which is generating wsdl(which describes webservices using xsd), it can be published to consumers of webservices iii) soap ws are introduced to easily support SOA(Service Oriented Architecture)

Difference between servlets and restful webservices: i) Even though restful webservices directly works on http/https protocal, it provides some other web methods in addition to get, post are put, delete. Which allows to write db operation based structured code easily. ii) As restful webservices allows for pathparameters apart from query parameters, we can easily write class level and method level convenient operations-code. iii) we can use postman like browser plugins to easily check rest-api’s. We can easily add headers, body parameter, selecting different methods, content type along with request to required restful webservice under an URL. iv) we can also provide security to rest-webservices easily through header section of http request msg’s

 

 

Reference :

Atul Tiwari, Big data and Analytics (2016-present)
Gowtham

Java & AI

Introduction

In this article, we’ll go over an overview of Artificial Intelligence (AI) libraries in Java.

Since this article is about libraries, we’ll not make any introduction to AI itself. Additionally, theoretical background of AI is necessary in order to use libraries presented in this article.

AI is a very wide field, so we will be focusing on the most popular fields today like Natural Language Processing, Machine Learning, Neural Networks and more. In the end, we’ll mention few interesting AI challenges where you can practice your understanding of AI.

2. Expert Systems

2.1. Apache Jena

Apache Jena is an open source Java framework for building semantic web and linked data applications from RDF data. The official website provides a detailed tutorial on how to use this framework with a quick introduction to RDF specification.

2.2. PowerLoom Knowledge Representation and Reasoning System

PowerLoom is a platform for the creation of intelligent, knowledge-based applications. It provides Java API with detailed documentation which can be found on this link.

2.3. d3web

d3web is an open source reasoning engine for developing, testing and applying problem-solving knowledge onto a given problem situation, with many algorithms already included. The official website provides a quick introduction to the platform with many examples and documentation.

2.4. Eye

Eye is an open source reasoning engine for performing semi-backward reasoning.

2.5. Tweety

Tweety is a collection of Java frameworks for logical aspects of AI and knowledge representation. The official website provides documentation and many examples.

3. Neural Networks

3.1. Neuroph

Neuroph is an open source Java framework for neural network creation. Users can create networks through provided GUI or Java code. Neuroph provides API documentation which also explains what neural network actually is and how it works.

3.2. Deeplearning4j

Deeplearning4j is a deep learning library for JVM but it also provides API for neural network creation. The official website provides many tutorials and simple theoretical explanations for deep learning and neural networks.

4. Natural Language Processing

4.1. Apache OpenNLP

Apache OpenNLP library is a machine learning based toolkit for the processing of natural language text. The official website provides API documentation with information on how to use the library. Here is an Introduction to Apache OpenNLP.

4.2. Stanford CoreNLP

Stanford CoreNLP is the most popular Java NLP framework which provides various tools for performing NLP tasks. The official website provides tutorials and documentation with information on how to use this framework.

5. Machine Learning

5.1. Java Machine Learning Library (Java-ML)

Java-ML is an open source Java framework which provides various machine learning algorithms specifically for programmers. The official website provides API documentation with many code samples and tutorials.

5.2. RapidMiner

RapidMiner is a data science platform which provides various machine learning algorithms through GUI and Java API. It has a very big community, many available tutorials, and an extensive documentation.

5.3. Weka

Weka is a collection of machine learning algorithms which can be applied directly to the dataset, through the provided GUI or called through the provided API. Similar as for RapidMiner, a community is very big, providing various tutorials for Weka and machine learning itself.

5.4. Encog Machine Learning Framework

Encong is a Java machine learning framework which supports many machine learning algorithms. It’s developed by Jeff Heaton from Heaton Research. The official website provides documentation and many examples.

6. Genetic Algorithms

6.1. Jenetics

Jenetics is an advanced genetic algorithm written in Java. It provides a clear separation of the genetic algorithm concepts. The official website provides documentation and a user guide for new users.

6.2. Watchmaker Framework

Watchmaker Framework is a framework for implementing genetic algorithms in Java. The official website provides documentation, examples, and additional information about the framework itself.

6.3. ECJ 23

ECJ 23 is a Java based research framework with strong algorithmic support for genetic algorithms. ECJ is developed at George Mason University’s ECLab Evolutionary Computation Laboratory. The official website provides extensive documentation and tutorials.

6.4. Java Genetic Algorithms Package (JGAP)

JGAP is a genetic programming component provided as a Java framework. The official website provides documentation and tutorials.

6.5. Eva

Eva is a simple Java OOP evolutionary algorithm framework.

7. Automatic programming

7.1. Spring Roo

Spring Roo is a lightweight developer tool from Spring. It’s using AspectJ mixins to provide separation of concerns during round-trip maintenance.

7.2. Acceleo

Acceleo is an open source code generator for Eclipse which generates code from EMF models defined from any metamodel (UML, SysML, etc.).

8. Challenges

Since AI is very interesting and popular topic, there are many challenges and competitions online. This is a list of some interesting competitions where you can train and test your skills:

9. Conclusion

In this article, we presented various Java AI frameworks which can be used in everyday work.

We also saw that AI is a very wide field with many frameworks and services – all of which can make your applications better and more innovative.

 

 

 

Reference : AI and JAVA

 

 

XML Web Services related Specs

Resource: Oracle

Add getFileName() method to javax.servlet.http.Part

 

Java SE Technologies – Jave SE Platform at a Glance

Java SE Technologies

The following conceptual diagram illustrates the components of Oracle’s Java Platform Products:

Jave SE Platform at a Glance

 
Java Conceptual Design - Java Technologies

Click the preceding illustration to go to the Java Conceptual Design documentation. Click the following technology links to go either to a hub page on that technology, if available, or to the documentation.
Description of Java Conceptual Diagram