Υλοποίηση εφαρμογής restful web-service σε spring framework με οπτικοποίηση metrics σε prometheus και grafana
Data processing by implementation of restful api web service in spring framework with metrics visualization in prometheus and grafana

View/ Open
Keywords
Web services ; Spring Boot ; DevOpsAbstract
The creation of the Internet[1] has been identified as the cradle of the science of information transmission, beginning in the late 1960s with the creation of the ARPANET project. The evolution of the latter as well as the creation of the World Wide Web by Tim Berners Lee in the late 80's, brought the revolution, the magnitude of which continues to be discovered today with new technologies and services available to the people.
Undoubtedly, the Internet is considered as the most social good in the services of the citizens while special arrangements are provided so that it becomes accessible everywhere. Special funds and investments have already been given and continue to be given by government and telecommunications organizations, with the aim of developing modern high-speed networks with the main technology of this, the fiber optics at home (Fiber to the Home - FTTH).
All of the above, combined with the entry of humanity into the Industry 4.0 era, which contributes to the increasing digitization of services and processes governed by simple and daily operations of the human population, made possible the creation of the Internet of Things (IoT). This development, in turn, requires an even greater flow of information to and from devices that display and process this data, with the aim of informing users in a timely manner, seamlessly and in real time.
Apart from the many different technologies, the development of internet services through the SOAP and REST protocols has played and continues to play a catalytic role in achieving the goals of the Industry 4.0 and the Internet of Things. Services with special emphasis on data transmission and processing, in order to achieve the above objectives.
In this dissertation, the implementation of a web service using the JAVA programming language under the REST protocol will be practically take place, by using the most widespread framework, namely the Spring Boot. The main purpose of this implementation is to create an application, which will be able to receive in its input data from any type of IoT sensor, then process them and capture the output results that concern the field of interest of each user.
With these assumptions, the writing of this document begins with the first chapter referring to introductory concepts about JAVA WEB services, with particular emphasis on the two protocols mentioned in the previous paragraphs. The end-use of the REST protocol will be concluded and then there will be a brief introduction to the Spring framework and the benefits of using it . To accommodate the access to the bibliography of this dissertation, bookmarks will be used that will act as hyperlinks to the latter.
The second chapter synthesizes the establishment of the objectives of the present project, starting with the implementation of a requirements analysis. During their execution, the need to consume two external APIs will arise. Through this patchwork, a map-like diagram will be constructed, to understand the steps and sequence of components that will make up the final result.
The third chapter is the point of intersection between the theory and the final implementation, since the technologies and tools used, are recorded there. Special emphasis will be given to the security of the application, with the implementation of Spring Security in HTTPS protocol and user authentication through Email Verification system. In a special section, the types of classes, that a Spring Boot project usually consists of, will be captured and the annotations that took place will be explained.
In the fourth chapter, the construction of DevOps processes is undertaken with the Prometheus and Grafana platforms having a leading role. Detailed explanations will be given as to the usage of these through Docker and the benefits that arise from capturing metrics and graphic dashboards. The overall implementation was done via WSL Ubuntu on Windows 11 OS.
Finally, in the fifth chapter, the final usage of the two API services consumed within the application is made. The guidelines and the sequence of the HTML pages, on which the consumed results from the two APIs are displayed, are given with print screen images.