Pengembangan dan Peningkatan Kinerja REST API Server Data IoT dengan Python FastAPI dan PostgreSQL
Date
2023Author
Kusuma, Grey Syafiq
Akbar, Auriza Rahmad
Ridha, Ahmad
Metadata
Show full item recordAbstract
Berbagai macam teknologi dapat dijadikan pilihan untuk membangun sebuah
ekosistem IoT, salah satunya adalah server data IoT yang menjadi poin utama untuk
menyimpan dan mengambil data yang didapat dari perangkat IoT. Kinerja server
data IoT selain dipengaruhi oleh spesifikasi perangkat keras, juga oleh perangkat
lunak yang digunakan seperti bahasa pemrograman dan framework yang
digunakan. Dalam penelitian ini, kami mengembangkan backend server data IoT
dengan framework Python FastAPI dan database PostgreSQL, dibandingkan
kinerjanya dengan framework Python Falcon dan Python Sanic. Metode
pengembangan yang digunakan adalah waterfall. Berdasarkan pengujian kinerja
menggunakan Siege, aplikasi FastAPI memiliki rataan kinerja sebesar 986
transaction per second, nilai ini 1.5 kali lipat lebih cepat dari aplikasi Sanic dan
167 kali lipat dari aplikasi Falcon. Penggunaan memori FastAPI hampir sama
dengan Sanic, yaitu di kisaran 2 GB. Hal ini menunjukkan bahwa FastAPI adalah
framework REST API Python yang memiliki kinerja yang lebih baik. Various technologies can be selected to build an IoT ecosystem, one of which
is the IoT data server which is the main point for storing and retrieving data obtained
from IoT devices. The performance of the IoT data server is not only influenced by
hardware specifications, but also by the software used, such as the programming
language and framework used. In this study, we develop an IoT data server backend
with the Python FastAPI framework and the PostgreSQL database, comparing its
performance with the Python Falcon and Python Sanic frameworks. The
development method used is the waterfall. Based on performance testing using
Siege, the FastAPI application has an average performance of 986 transactions per
second, this value is 1.5 times faster than the Sanic application and 167 times that
of the Falcon application. FastAPI memory usage is almost the same as Sanic,
which is around 2 GB. This shows that FastAPI is a Python REST API framework
that has better performance.
Collections
- UT - Computer Science [2482]
