PERNYATAAN Dengan ini saya menyatakan bahwa dalam Tugas

advertisement
PERNYATAAN
Dengan ini saya menyatakan bahwa dalam Tugas Akhir ini tidak terdapat
karya yang pernah diajukan untuk memperoleh gelar kesarjanaan di perguruan
tinggi lain, dan sepanjang pengetahuan saya tidak terdapat karya atau pendapat
yang pernah ditulis atau diterbitkan oleh orang lain, kecuali yang secara tertulis
diacu dalam naskah ini dan disebutkan pada daftar pustaka.
Denpasar, 24 September 2016
Pande Made Risky Cahya Dinatha
iii
KATA PENGANTAR
Puji dan syukur penulis panjatkan kehadapan Ida Sang Hyang Widhi
Wasa/Tuhan Yang Maha Esa, karena atas Asung Kerta Wara Nugraha-Nya,
penulis dapat menyelesaikan tugas akhir dengan judul “Layanan Pertukaran
Data dengan menggunakan API Google Drive”. Selama pelaksanaan tugas
akhir ini penulis mendapat banyak masukan dan bimbingan dari berbagai pihak.
Untuk itu, penulis ingin mengucapkan rasa terima kasih kepada:
1.
Bapak Prof. Ir. Ngakan Putu Gede Suardana, M.T., Ph.D, selaku Dekan
Fakultas Teknik Universitas Udayana.
2.
Bapak Dr. Eng. I Putu Agung Bayupati, S.T., M.T., selaku Ketua Jurusan
Teknologi Informasi Universitas Udayana.
3.
I Made Sukarsa, S.T., M.T., selaku dosen pembimbing I yang telah banyak
memberikan masukan dan bimbingan selama penyusunan tugas akhir ini.
4.
A. A. K. Agung Cahyawan Wiranatha, S.T., M.T., selaku dosen
pembimbing II yang telah banyak memberikan masukan dan bimbingan
selama penyusunan tugas akhir ini.
5.
Bapak Putu Wira Buana, S.Kom., M.T., selaku dosen pembimbing
akademik, yang telah memberikan bimbingan selama menempuh
pendidikan di Jurusan Teknologi Informasi Fakultas Teknik Universitas
Udayana.
6.
Kedua orang tua dan keluarga yang telah memberikan dukungan dan
motivasi dalam pembuatan tugas akhir ini.
7.
Teman-teman seperjuangan dan segenap civitas di Jurusan Teknologi
Informasi Universitas Udayana yang telah memberikan sumbangan ide,
pemikiran dan dukungan dalam penyusunan tugas akhir ini.
Denpasar, 24 September 2016
Pande Made Risky Cahya Dinatha
vi
ABSTRAK
Layanan Pertukaran Data dengan menggunakan API Google Drive
merupakan layanan berbasis web yang dapat melakukan pertukaran data melalui
jaringan Internet. Layanan ini memanfaatkan cloud storage Google Drive sebagai
perantara dan media penyimpanan data. Google Drive sebagai solusi dari masalah
interoperabilitas yaitu kemampuan sistem dalam memanfaatkan informasi yang
ditukarkan. Google Drive bersifat gratis dan memiliki banyak fitur pendukung
dalam pengelolaan file khususnya file dokumen. Tujuan dari layanan ini adalah
untuk membantu proses bisnis pada suatu organisasi dan menyediakan jalur
komunikasi alternatif jika terjadi masalah pada sistem utama. Salah satu kelebihan
dari metode pertukaran data dengan memanfaatkan cloud storage Google Drive
adalah tidak terikat oleh alamat Internet Protocol sehingga dalam
pengoperasiannya dapat dilakukan dimanapun hanya dengan jaringan Internet.
Layanan ini membutuhkan sebuah akun Google yang digunakan untuk autentikasi
dan sebagai identitas pengirim data. Aplikasi berbasis web ini memiliki fitur
utama yaitu Layanan Penjadwalan Pesan yang dapat menerima dan mengirim
pesan secara otomatis.
Kata Kunci: Layanan Pertukaran Data, Google Drive, API, REST API Google
Drive, Cloud Storage.
vii
ABSTRACT
Data Exchange Service Using Google Drive API is a web based service
that can exchange data through the Internet. This service utilizes Google Drive
cloud storage as an intermediary and data storage media. Google Drive as a
solution to the problem of interoperability is the ability of the system to take
advantage of the information being exchanged. Google Drive is free and has many
features in the management of files, especially document files. The purpose of this
service is to help the business processes of an organization and provides an
alternative communication way if a problem occurs in the main system. One of
the advantages of the method of data exchange by utilizing the Google Drive
cloud storage is not bound by the Internet Protocol address so that the operation
can be done anywhere just with the Internet network. This service requires a
Google account that is used for authentication and as the sender's identity data.
Message Scheduling Service is the main features of this web-based application
that can receive and send messages automatically.
Keywords: Data Exchange Service, Google Drive, API, Google Drive REST API,
Cloud Storage.
viii
DAFTAR ISI
HALAMAN SAMPUL .......................................................................................i
HALAMAN JUDUL...........................................................................................ii
PERNYATAAN..................................................................................................iii
LEMBAR PENGESAHAN TUGAS AKHIR ....................................................iv
BERITA ACARA TUGAS AKHIR ...................................................................v
KATA PENGANTAR ........................................................................................vi
ABSTRAK ..........................................................................................................vii
ABSTRACT ..........................................................................................................viii
DAFTAR ISI .......................................................................................................ix
DAFTAR GAMBAR ..........................................................................................xii
DAFTAR TABEL ...............................................................................................xiv
DAFTAR KODE PROGRAM ............................................................................xv
BAB I PENDAHULUAN ..................................................................................... 1
1.1
Latar Belakang .......................................................................................... 1
1.2
Rumusan Masalah ..................................................................................... 3
1.3
Batasan Masalah ........................................................................................ 3
1.4
Tujuan Penelitian....................................................................................... 3
1.5
Manfaat Penelitian..................................................................................... 4
1.6
Sistematika Penulisan ................................................................................ 4
BAB II KAJIAN PUSTAKA ................................................................................ 6
2.1
State of The Art .......................................................................................... 6
2.2
Pengertian Cloud Storage.......................................................................... 8
2.2.1 Google Drive .................................................................................... 8
2.3
Application Programming Intreface (API) ............................................... 9
2.3.1
Google Drive Application Programming Interface (API)
Representational State Transfer (REST) v3 .............................10
2.3.1.1 Kuota Request Queries pada Google Drive API ......10
2.3.1.2 Mengakses Google Drive REST API .......................11
2.3.1.3 Menggunakan Google Drive REST API ..................19
2.3.2 Komparasi Teknologi Pertukaran Data .....................................21
2.3.2.1 Komparasi Web Service dengan API ........................21
2.3.2.2 Komparasi Remote Procedure Calls (RPC) .............24
2.3.2.3 Komparasi Remote Method Invocation ....................26
2.3.2.4 Komparasi Google Drive APIs REST (HTTP)
dengan Google Drive APIs for Android ...................27
2.3.2.5 Arsitektur Backend Line Messenger.........................29
2.4
Middleware-Oriented Middleware (MOM) ............................................30
2.5
Electronic Data Intrechange (EDI) .........................................................31
2.6
Hypertext Mark Up Language (HTML)..................................................31
2.7
Hypertext Preprocessor (PHP)................................................................31
2.7.1
Kelebihan PHP ..........................................................................32
2.8
Javascript .................................................................................................33
2.8.1
AJAX ........................................................................................33
ix
2.9
2.10
Web Service .............................................................................................34
MySQL ...................................................................................................34
2.10.1 Elemen Dasar SQL pada Penelitian ..........................................34
2.10.2 Tipe-tipe Data MySQL pada Penelitian ....................................35
2.10.3 Kelompok Pernyataan SQL.......................................................35
2.10.4 Keunggulan MySQL .................................................................38
2.11 Task Scheduler ........................................................................................38
BAB III METODOLOGI DAN PERANCANGAN SISTEM ............................40
3.1
Tempat dan Waktu ..................................................................................40
3.2
Alur dan Analisis .....................................................................................40
3.3
Sumber Data ............................................................................................42
3.3.1
Metode Pengumpulan Data .......................................................43
3.4
Bahasa Pemrograman ..............................................................................43
3.5
Pemodelan Sistem ...................................................................................43
3.5.1
Statement of Purpose.................................................................43
3.5.2
Daftar Kejadian .........................................................................45
3.5.3
Gambaran Umum Sistem ..........................................................45
3.5.4
Diagram Alir Sistem .................................................................46
3.5.4.1 Diagram Alir Request Permission ............................46
3.5.4.2 Diagram Alir New Message ......................................47
3.5.4.3 Diagram Alir Inbox ...................................................49
3.5.4.4 Diagram Alir Outbox ................................................50
3.5.4.5 Diagram Alir View Message .....................................51
3.5.4.6 Diagram Alir Settings ...............................................52
3.5.4.7 Diagram Alir Signout................................................52
3.5.4.8 Diagram Alir Scheduler Incoming Message .............53
3.5.4.9 Diagram Alir Scheduler Outgoing Message .............55
3.6
Perancangan Basis Data ..........................................................................57
3.6.1
Struktur Data .............................................................................57
3.7
Mockup Sistem ........................................................................................60
3.7.1
Mockup Halaman Login Sistem ................................................60
3.7.2
Mockup Halaman New Message ...............................................60
3.7.3
Mockup Halaman Inbox ............................................................61
3.7.4
Mockup Halaman Outbox..........................................................62
3.7.5
Mockup Halaman View Message ..............................................62
3.7.6
Mockup Halaman Settings .........................................................63
3.8
Pengaturan Task Scheduler .....................................................................64
3.9
Kebutuhan Perangkat ..............................................................................68
3.9.1
Kebutuhan Perangkat Keras ......................................................68
3.9.2
Kebutuhan Perangkat Lunak .....................................................68
BAB IV HASIL DAN PEMBAHASAN ............................................................70
4.1
Arsitektur Sistem .....................................................................................70
4.1.1
Komponen Send Message .........................................................71
4.1.2
Komponen Inbox .......................................................................72
4.1.3
Komponen Outbox ....................................................................73
4.1.4
Komponen Settings ...................................................................73
x
4.2
Standard Operational Procedure (SOP) .................................................74
4.2.1
SOP Send Message....................................................................74
4.2.2
SOP Send Message Task Scheduler ..........................................76
4.2.3
SOP Inbox .................................................................................77
4.2.4
SOP Outbox...............................................................................79
4.2.5
SOP Settings ..............................................................................80
4.3
Pengujian Sistem .....................................................................................81
4.3.1
Instalasi Aplikasi .......................................................................81
4.3.2
Kebutuhan Perangkat Lunak Pengujian Sistem ........................83
4.3.3
Kebutuhan Perangkat Keras Pengujian Sistem .........................83
4.3.4
Tahap Pengujian ........................................................................84
4.3.5
Autentikasi ................................................................................85
4.3.5.1 Pengujian Tampilan Awal...........................................85
4.3.5.2 Autentikasi Google .....................................................86
4.3.6
Penerimaan dan Pengiriman Pesan ...........................................87
4.3.6.1 Penerimaan Pesan .......................................................87
4.3.6.2 Pengiriman Pesan ........................................................89
4.3.7
Tampilan Informasi ...................................................................91
4.3.7.1 Tampilan Informasi Pesan ..........................................91
4.3.8
Manajemen Pengaturan Sistem .................................................92
4.3.9
Layanan Penjadwalan Pesan .....................................................93
4.4
Analisa Hasil ...........................................................................................99
4.4.1
Analisa Kebutuhan Sistem ........................................................99
4.4.2
Analisa Kebutuhan Informasi ...................................................99
4.4.3
Analisa Kelebihan dan Kekurangan Sistem ..............................100
BAB V PENUTUP ..............................................................................................102
5.1
Simpulan..................................................................................................102
5.2
Saran ........................................................................................................103
DAFTAR PUSTAKA .........................................................................................104
xi
DAFTAR GAMBAR
Gambar 2.1
Gambar 2.2
Gambar 2.3
Gambar 2.4
Gambar 2.5
Gambar 2.6
Gambar 2.7
Gambar 2.8
Gambar 2.9
Gambar 2.10
Gambar 2.11
Gambar 2.12
Gambar 2.13
Gambar 2.14
Gambar 3.1
Gambar 3.2
Gambar 3.3
Gambar 3.4
Gambar 3.5
Gambar 3.6
Gambar 3.7
Gambar 3.8
Gambar 3.9
Gambar 3.10
Gambar 3.11
Gambar 3.12
Gambar 3.13
Gambar 3.14
Gambar 3.15
Gambar 3.16
Gambar 3.17
Gambar 3.18
Gambar 3.19
Gambar 3.20
Gambar 3.21
Gambar 3.22
Gambar 4.1
Gambar 4.2
Gambar 4.3
Gambar 4.4
Gambar 4.5
Gambar 4.6
Gambar 4.7
Gambaran API .............................................................................9
Membuat Proyek Baru .................................................................11
Memilih API ................................................................................12
Membuat Kredensial ...................................................................13
Membuat Kredensial Lanjutan ....................................................14
Halaman Kredensial ....................................................................15
Layar Persetujuan OAuth ............................................................16
Halaman Unduh Client Libraries Google Drive .........................17
OAuth, JSON file, dan Client Libraries Google Drive ...............18
Remote Procedure Call Flow ......................................................25
Arsitektur Sistem RMI ................................................................26
Gambaran REST ..........................................................................28
Gambaran Google Drive APIs for Android.................................29
Arsitektur Backend Line Messenger ...........................................30
Flowchart Alur Pembuatan Layanan Pertukaran Data ................41
Gambaran Umum Sistem ............................................................44
Diagram Alir Request Permission ...............................................46
Diagram Alir New Message.........................................................47
Diagram Alir Inbox......................................................................48
Diagram Alir Outbox ...................................................................49
Diagram Alir View Message ........................................................50
Diagram Alir Settings ..................................................................51
Diagram Alir Signout ..................................................................52
Diagram Alir Scheduler Incoming Message................................53
Diagram Alir Scheduler Outgoing Message................................55
Mockup Halaman Login Sistem...................................................59
Mockup Halaman Send Message .................................................60
Mockup Halaman Inbox ...............................................................60
Mockup Halaman Outbox ............................................................61
Mockup Halaman View Message .................................................62
Mockup Halaman Settings ...........................................................63
Pengaturan Task Scheduler General ...........................................64
Pengaturan Task Scheduler Triggers...........................................64
Pengaturan Task Scheduler Actions ............................................65
Pengaturan Task Scheduler Conditions .......................................66
Pengaturan Task Scheduler Settings ............................................66
Arsitektur Sistem .........................................................................69
Arsitektur Komponen Send Message ..........................................70
Arsitektur Komponen Inbox ........................................................71
Arsitektur Komponen Outbox .....................................................72
Arsitektur Komponen Settings ....................................................73
SOP Send Message ......................................................................74
SOP Send Message Task Scheduler ............................................76
xii
Gambar 4.8
Gambar 4.9
Gambar 4.10
Gambar 4.11
Gambar 4.12
Gambar 4.13
Gambar 4.14
Gambar 4.15
Gambar 4.16
Gambar 4.17
Gambar 4.18
Gambar 4.19
Gambar 4.20
Gambar 4.21
SOP Inbox....................................................................................77
SOP Outbox .................................................................................78
SOP Settings ................................................................................80
Komponen Aplikasi .....................................................................81
Halaman Depan ...........................................................................84
Halaman Pemilihan Akun Google ...............................................85
Halaman Autentikasi ...................................................................85
Halaman Inbox.............................................................................86
Halaman New Message................................................................88
Halaman Outbox ..........................................................................89
Halaman View Message ...............................................................91
Halaman Settings .........................................................................92
Tabel Inbox ..................................................................................93
Tabel Outbox ...............................................................................93
xiii
DAFTAR TABEL
Tabel 2.1
Tabel 2.2
Tabel 3.1
Tabel 3.2
Tabel 4.1
Tabel 4.2
Tabel 4.3
Tabel 4.4
Tabel 4.5
Tabel 4.6
Tabel 4.7
Tabel 4.8
Tabel 4.9
Tabel 4.10
Kuota Request Queries ..................................................................10
Perbedaan Web Service dengan Web Service + API .....................22
Tabel Inbox ....................................................................................57
Tabel Outbox .................................................................................58
Daftar Aktivitas dalam SOP Send Message ...................................74
Daftar Aktivitas dalam SOP Send Message Task Scheduler .........75
Daftar Aktivitas dalam SOP Inbox ................................................77
Daftar Aktivitas dalam SOP Outbox ..............................................78
Daftar Aktivitas dalam SOP Settings .............................................79
Kebutuhan Perangkat Keras Pengujian Sistem ..............................82
Hasil Pengujian Penerimaan Pesan ................................................87
Hasil Pengujian Mengirim Pesan Baru ..........................................88
Hasil Pengujian Menerima Data Pesan Keluar ..............................90
Hasil Pengujian View Message ......................................................91
xiv
DAFTAR KODE PROGRAM
Kode Program 2.1
Kode Program 2.2
Kode Program 2.3
Kode Program 2.4
Kode Program 2.5
Kode Program 2.6
Kode Program 2.7
Kode Program 2.8
Kode Program 2.9
Kode Program 2.10
Kode Program 2.11
Kode Program 2.12
Kode Program 2.13
Kode Program 2.14
Kode Program 4.1
Kode Program 4.2
Menyertakan Client Libraries Google Drive REST API ...19
Menyertakan Library PHPExcel ........................................19
Kode Program pada oauth2callback.php ...........................20
Query Membuat Database .................................................35
Query Menggunakan Database .........................................35
Query Menghapus Database..............................................35
Query Membuat Tabel .......................................................36
Query Menghapus Tabel ....................................................36
Query Menghapus Primary Key pada Sebuah Tabel .........36
Query Menambahkan Kolom Baru pada Sebuah Tabel .....36
Query Menyisipkan Sebuah Baris Data Baru ....................37
Query Menghapus Sebuah Baris Data pada Sebuah
Tabel...................................................................................37
Query Mengubah Baris Data pada Sebuah Tabel ..............37
Query Melihat Isi Data pada Sebuah Tabel .......................37
Fitur Layanan Penjadwalan Pesan Masuk .........................94
Fitur Layanan Penjadwalan Pesan Keluar .........................96
xv
Download