VIETNAM NATIONAL UNIVERSITY HO CHI MINH CITY HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING CAPSTONE PROJECT AN OPEN API PLATFORM FOR ML-POWERED AND IOT-ENABLED APPLICATIONS Major: Computer Engineering THESIS COMMITTEE: 13 – OSPI – COMPUTER ENGINEERING SUPERVISOR(s): Dr. LE LAM SON REVIEWER: M. LE DINH THUAN ---o0o--- STUDENT 1: TRAN NHAT TAN (1852732) STUDENT 2: LE QUOC ANH (1852006) STUDENT 3: NGUYEN DINH NAM (1952858) HO CHI MINH CITY, 06-2023 VIETNAM NATIONAL UNIVERSITY, HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING CAPSTONE PROJECT (CO4347) AN OPEN API PLATFORM FOR ML-POWERED AND IOT-ENABLED APPLICATIONS Major: Software Engineering Council: 13 - OISP - Computer Engineering Reviewer: M. Le Dinh Thuan Supervisor: Dr.
Le Lam Son Students: Le Quoc Anh - 1852006 Tran Nhat Tan - 1852732 Nguyen Dinh Nam - 1952858 Ho Chi Minh City, May 2023 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING Date: Faculty of Computer Science and Engineering Assoc. Le Lam Son (Project Instructor) Computer Engineering Project - Academic year 2022 - 2023 Page 1/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING Computer Engineering Project - Academic year 2022 - 2023 Page 2/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING Declaration of Authenticity We declare that this thesis is solely the result of our own work, conducted under the supervision and guidance of Assoc. Le Lam Son. The result of our capstone project is legitimate and has not been submitted for any other degree or professional qualification.
All material used within this capstone project is collected from various verifiable sources, all of which are included in the Reference section. In any case of plagiarism, we stand by our actions and will be held responsible. Ho Chi Minh city University of Technology is therefore not responsible for any possible copyright infringement stemming from our research. Hồ Chí Minh City, May 2023 Research group Computer Engineering Project - Academic year 2022 - 2023 Page 3/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING Acknowledgement We would like to express our gratitude to every individual who has contributed to our capstone project.
We couldn’t have completed our work without invaluable patience and feedback, advice and guidance from our direct instructor, Assoc. Le Lam Son. Their knowledge and expertise have guided us throughout our journey. We would also like to express our gratitude to the University’s Board of Administration and every lecturer for their relentless pursuit of technical advances, which provides the students with state-of-the-art technology.
Last but not least, our capstone project is only feasible thanks to the OISP ’s schedule and equipment supports. Hồ Chí Minh City, May 2023 Research group Computer Engineering Project - Academic year 2022 - 2023 Page 4/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING Abstract Open application programming interfaces (APIs) have been playing a crucial role in software architecture, especially ones that are combining and enhanced with the Artificial Intelligence (AI). Techies or any domain-specialized users can easily find thousands of APIs re- lating to topics such as agriculture, finance, healthcare or blockchain, etc. that are irreplaceable in software engineering.
They serve specific purposes, enable a program to access the data and services of another, and along with the evolution of software engineering, APIs communities have been growing significantly, provide developers a wealth of up-to-date information. In this project, we implement a web application that provides an environment where users (as an API creator or consumer) can view, implement or utilize APIs. The main functionalities of the application includes creating API where users implement their algorithm in Python, sub- scribing to the APIs to get access, and finally utilizing APIs where users provide their raw data and work with the subscribed APIs. Hồ Chí Minh City, May 2023 Research group Computer Engineering Project - Academic year 2022 - 2023 Page 5/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING Contents 1 CAPSTONE PROJECT STRUCTURE 12 2 INTRODUCTION 14 2.2 Objectives and Limitation .1 Review of existing literature and relevant technologies .1 The vendor-agnostic EMPAIA platform for integrating AI applications into digital pathology infrastructures .3 Microsoft Azure ML Studio .2 Existed projects/tools limitations .1 The vendor-agnostic EMPAIA platform for integrating AI applications into digital pathology infrastructures .3 Microsoft Azure ML Studio .3 Identification of the gap that the proposed project will fill .1 What are microservices and containers? .2 Why use a microservices architecture? .4 Docker Compose and Kubernetes.
31 Computer Engineering Project - Academic year 2022 - 2023 Page 6/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING 4.1 Benefits of cloud computing .2 Types of cloud computing .3 Cloud computing in our project .3 Continuous Delivery & Continuous Deployment(CD) .2 Non-functional requirements .2 Use-case diagrams .3 Detailed use-case diagram descriptions .2 AWS HAProxy Load Balancer .3 Smart API Service .3 Authentication and Authorization. 64 Computer Engineering Project - Academic year 2022 - 2023 Page 7/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING 6.3 OAuth grant types .4 JSON Web Token (JWT) .5 Development tools and environment .1 First glance at the web application .2 Start creating an API .3 Search for an API .4 Subscribe and utilize an API. 88 Computer Engineering Project - Academic year 2022 - 2023 Page 8/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING List of Figures 1 Google Colab. 17 2 Azure Machine Learning.
19 5 Monolithic and microservices comparison. 43 21 Explore APIs use case diagram. 48 22 Subscribe to APIs use case diagram. 49 23 Create API use case diagram.
71 33 Login/Register page. 71 34 API workspace page. 72 35 API create form. 73 36 Provide a code editor for creator to implement the algorithm in Python and upload models.
73 37 Interface for creator to provide documentation and define inputs required. 74 38 User can search at Home page. 76 40 User can search at the API workspace page by clicking on "Search subscribed APIs. 76 41 The web application shows a modal for consumer to search subscribed APIs.
77 42 API detail page for APIs that can be utilized instantly. 78 43 Subscription payment modal for user to subscribe to an API. 79 44 Provide user an interface to utilize when click on "Start using". 80 45 Testing coverage detail of Authentication service.
81 Computer Engineering Project - Academic year 2022 - 2023 Page 9/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING 46 Logging functions testcases. 81 47 Subscription functions testcases. 82 48 Testing coverage detail of the web application. 82 49 JMeter thread preparation.
83 50 ECS Tasks configuration. 86 Computer Engineering Project - Academic year 2022 - 2023 Page 10/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING List of Tables 1 Table format of Explore APIs use case. 51 2 Table format of Subscribe to APIs use case. 52 3 Table format of Create an API use case.
53 4 Table format of Generate API use case. 54 Computer Engineering Project - Academic year 2022 - 2023 Page 11/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING 1 CAPSTONE PROJECT STRUCTURE Introduction • Background information on the project topic and its significance. • Objectives and scope of the project. • Limitation of capstone project Literature Review • Review of relevant literature and existing research in the field.
• Review and compare with relevant application out of market • Identification of gaps or limitations in the existing knowledge. Background • Discussion of key theories, concepts, or frameworks that inform the project. Analysis • Figure out functional and non-functional requirements • Use cases, user stories, or scenarios to illustrate the expected behavior of the software. • Stakeholder analysis and identification of key user groups.
Solution Design • Architecture and high-level design of the software system. • Design decisions and justifications, such as the selection of frameworks, libraries, or APIs. Screen flow • Final result in screen flows deno. Testing • Unit testing Computer Engineering Project - Academic year 2022 - 2023 Page 12/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING • Performance testing Summary • Measurement of project outcomes against the defined metrics (unit test, performance test, etc).
• Evaluation criteria used to assess the success of the project. • Summary of the project, emphasizing its achievements and constraints • Recommendations for further enhancements or future work. Conclusion • Reflection on lessons learned and areas for improvement. References • A list of all the sources cited in the report, following the appropriate citation style (e.
Computer Engineering Project - Academic year 2022 - 2023 Page 13/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING 2 INTRODUCTION 2.1 Project Overview Artificial Intelligence (AI) have been transforming various industries, the AI development and deployment become more challenging, especially for small and medium-sized businesses. To address these challenges, we have developed a web-based platform that support any AI models integration, manipulate cloud infrastructure, support numerous data types, auto generate API for any AI models, offer AI as a Service (AaaS) marketplace that provides an affordable price model for customers to use these AI APIs without purchase of copyright. Our platform is designed to provide a user-friendly and accessible AI development and deployment experience for businesses of all sizes. It enables users to upload data, train and evaluate models and deploy them to the cloud.
Our platform supports all popular AI frameworks, including TensorFlow, PyTorch, and Keras, and can integrate any custom AI models developed by users. One of key features of our platform is automatic creation of APIs for any AI models. Once the model is trained, deployed, the platform automatically create generates APIs depended on developer specification. These APIs can be used to integrate the models with any application and service.
This feature enables users to deploy their models to production without worrying about the technical details of creating APIs. In addition, although our platform is currently able to support JSON input format, our team aim this platform can support all data types, including structured, semi-structured, and unstructured data. Moreover, users can easily upload their data in various formats, including CSV, JSON, and text files, and use them to train and evaluate their models. Furthermore, our platform provides a flexible and scalable cloud infrastructure for deploy- ing AI models.
Users can choose from various AWS cloud resources that meet requirement and deploy their models in a few clicks. The platform also provides advanced monitoring and logging capabilities, enabling users to track the performance of their models and diagnose any Computer Engineering Project - Academic year 2022 - 2023 Page 14/91 HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY FACULTY OF COMPUTER SCIENCE AND ENGINEERING issues that may arise. Finally, our platform provides an affordable pricing model that does not require the purchase of the copyright. Customers can use the APIs at an affordable price without having to pay a large amount of money to purchase the copyright.
This makes our platform an ideal choice for small and medium-sized businesses that want to leverage the power of AI without breaking the bank.2 Objectives and Limitation 2.