SlideShare a Scribd company logo
1 of 5
Download to read offline
Dokumentasi Protokol Client Server
PEMROGRAMAN JARINGAN
KELAS F
Arifian Rahardianda 5111100141
Fajar Setiawan 5112100010
Luthfi Firmansyah Soehadak 5112100016
Adiyat Nurkautsar Sudirman 5112100065
R. M. Iskandar 5112100101
Jurusan Teknik Informatika - Institut Teknologi Sepuluh Nopember
Kampus ITS Keputih Sukolilo Surabaya
Format data inisialisasi koneksi
Format data yang dikirim client (request) :
{"REQ":"[request type]", "MESSAGE":"[request message]",
"DATA":{"SESSION_KEY":"[session key]", "CONTENT":"[sent/received
data or message content]", "TYPE":"[data type]"}}
Format data respon dari server :
{"STATE":"[state type]", "MESSAGE":"[response message]",
"DATA":{"SESSION_KEY":"[session key]", "CONTENT":"[sent/received
data or message content]", "TYPE":"[data type]"}}
Penjelasan format pesan :
REQ : Berisi jenis request yang diminta oleh client kepada server
STATE : Berisi jenis state untuk client, jadi ketika client menerima response dari
server dan membaca isi dari STATE, maka client akan berpindah ke state sesuai
response server
MESSAGE : Berisi string pesan request / response, yang nantinya akan
diterjemahkan disisi client / server menjadi pesan. Misal MESSAGE : LOGIN_OK
akan diterjemahkan client menjadi pesan “Anda telah berhasil login.”
DATA : SESSION_KEY (session key untuk tiap user yang berisi key, username
dan room), CONTENT (data yang dikirim atau diterima atau isi pesan) ,
TYPE(tipe data yang dikirim atau diterima)
Jenis type data : AUTH(untuk pengiriman username dan password), LIST(untuk
data array), TEXT(tipe data untuk pesan), NULL(tidak ada data yang dikirimkan)
Data yang dikirim dipisah dengan karakter “:”
Login
Format Client
{"REQ":"login", "MESSAGE":"REQ_LOGIN", "DATA":{"SESSION_KEY":" ",
"CONTENT":[username and password]}, "TYPE":"AUTH"}}
Format Server
Session Key : Key, Username, dan Room(none)
- Login Berhasil
{"STATE":"feature", "MESSAGE":"LOGIN_PERMIT",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ",
"TYPE":"NULL"}}
- Login Gagal (penginputan salah)
{"STATE":"login", "MESSAGE":"LOGIN_FAILED",
"DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}}
- Login Gagal (double login)
{"STATE":"login", "MESSAGE":"SESSION_FAILED",
"DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}}
Register
Format Client
{"REQ":"register", "MESSAGE":"REQ_REGISTER", "DATA":{"SESSION_KEY":"
", "CONTENT":[username and password]}, "TYPE":"AUTH"}
Format Server
Session Key : Key, Username, dan Room(none)
- Register Berhasil
{"STATE":"login", "MESSAGE":"REGISTER_PERMIT",
"DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}}
- Register Gagal
{"STATE":"register", "MESSAGE":"REGISTER_FAILED",
"DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}}
Logout
Format Client
{"REQ":"logout", "MESSAGE":"REQ_LOGOUT",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}}
Format Server
Session Key : dihapus
{"STATE":"welcome", "MESSAGE":"LOGOUT_SUCCESS",
"DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}}
Create Room
Format Client
{"REQ":"create", "MESSAGE":"REQ_CREATE",
"DATA":{"SESSION_KEY":[session key], "CONTENT":"[room name and room
password]", "TYPE":"AUTH"}}
Format Server
Session Key : Key, Username, dan Room Name
- Create Room Berhasil (SessionKey Update)
{"STATE":"chat", "MESSAGE":"CREATE_SUCCESS",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ",
"TYPE":"NULL"}}
- Create Room Gagal
{"STATE":"feature", "MESSAGE":"CREATE_FAILED",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ",
"TYPE":"NULL"}}
List Room
Format Client
{"REQ":"list_room", "MESSAGE":"REQ_LIST_ROOM",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}}
Format Server
Session Key : Key, Username, dan Room(none)
{"STATE":"join", "MESSAGE":"LIST_ROOM",
"DATA":{"SESSION_KEY":[session key], "CONTENT":[list room],
"TYPE":"LIST"}}
Join Room
Format Client
{"REQ":"join", "MESSAGE":"REQ_JOIN", "DATA":{"SESSION_KEY":[session
key], "CONTENT":"[room name and room password]", "TYPE":"AUTH"}}
Format Server
Session Key : Key, Username, dan Room Name
- Join Room Berhasil (SessionKey Update)
{"STATE":"chat", "MESSAGE":"JOIN_SUCCESS",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ",
"TYPE":"NULL"}}
- Join Room Gagal
{"STATE":"join", "MESSAGE":"JOIN_FAILED",
"DATA":{"SESSION_KEY":"[session key]", "CONTENT":[list room] ,
"TYPE":"LIST"}}
Chat
Format Client
{"REQ":"chat", "MESSAGE":"IN_CHAT", "DATA":{"SESSION_KEY":[session
key], "CONTENT":[chat content], "TYPE":"TEXT"}}
Format Server
Session Key : Key, Username, dan Room Name
{"STATE":"chat", "MESSAGE":"IN_CHAT",
"DATA":{"SESSION_KEY":"[session key]", "CONTENT":[chat content] ,
"TYPE":"TEXT"}}
Leave Chat Room
Format Client
{"REQ":"leave", "MESSAGE":"LEAVE_CHAT",
"DATA":{"SESSION_KEY":[session key], "CONTENT":[chat content] ,
"TYPE":"TEXT"}}
Format Server
Session Key : Key, Username, dan Room(none)
{"STATE":"feature", "MESSAGE":"LEAVE_SUCCESS",
"DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}}

More Related Content

Viewers also liked

Javier F. Helga y Héctor
Javier F. Helga y HéctorJavier F. Helga y Héctor
Javier F. Helga y HéctorMartina y Aiora
 
Quality Dashboard, an industry collaborative platform for translation quality...
Quality Dashboard, an industry collaborative platform for translation quality...Quality Dashboard, an industry collaborative platform for translation quality...
Quality Dashboard, an industry collaborative platform for translation quality...TAUS - The Language Data Network
 
Procucto 4 s5_raquel_castro
Procucto 4 s5_raquel_castroProcucto 4 s5_raquel_castro
Procucto 4 s5_raquel_castrorachell15
 
Low Budget BRAND VISIBILITY IDEAS for Small businesses new
Low Budget BRAND VISIBILITY IDEAS for Small businesses newLow Budget BRAND VISIBILITY IDEAS for Small businesses new
Low Budget BRAND VISIBILITY IDEAS for Small businesses newTolu Adebayo
 
Estrategias para la enseñanza del inglés a niños
Estrategias para la enseñanza del inglés a niñosEstrategias para la enseñanza del inglés a niños
Estrategias para la enseñanza del inglés a niñosYeison Valencia Cuadros
 
Post production final
Post production finalPost production final
Post production finalmarija2703
 
Evalutaion filming
Evalutaion filmingEvalutaion filming
Evalutaion filmingmarija2703
 

Viewers also liked (9)

Javier F. Helga y Héctor
Javier F. Helga y HéctorJavier F. Helga y Héctor
Javier F. Helga y Héctor
 
Quality Dashboard, an industry collaborative platform for translation quality...
Quality Dashboard, an industry collaborative platform for translation quality...Quality Dashboard, an industry collaborative platform for translation quality...
Quality Dashboard, an industry collaborative platform for translation quality...
 
Procucto 4 s5_raquel_castro
Procucto 4 s5_raquel_castroProcucto 4 s5_raquel_castro
Procucto 4 s5_raquel_castro
 
Kyra
KyraKyra
Kyra
 
Low Budget BRAND VISIBILITY IDEAS for Small businesses new
Low Budget BRAND VISIBILITY IDEAS for Small businesses newLow Budget BRAND VISIBILITY IDEAS for Small businesses new
Low Budget BRAND VISIBILITY IDEAS for Small businesses new
 
Estrategias para la enseñanza del inglés a niños
Estrategias para la enseñanza del inglés a niñosEstrategias para la enseñanza del inglés a niños
Estrategias para la enseñanza del inglés a niños
 
Post production final
Post production finalPost production final
Post production final
 
Evalutaion filming
Evalutaion filmingEvalutaion filming
Evalutaion filming
 
Proyecto canaiba
Proyecto canaibaProyecto canaiba
Proyecto canaiba
 

Similar to Dokumentasi Protokol Client Server

Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"South Tyrol Free Software Conference
 
ABV_fastcontact
ABV_fastcontactABV_fastcontact
ABV_fastcontactarjun rao
 
Login and Registration form using oop in php
Login and Registration form using oop in phpLogin and Registration form using oop in php
Login and Registration form using oop in phpherat university
 
HTML5 - The 2012 of the Web
HTML5 - The 2012 of the WebHTML5 - The 2012 of the Web
HTML5 - The 2012 of the WebRobert Nyman
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysqlKnoldus Inc.
 
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)Joel Lord
 
Types - ScalaSyd
Types - ScalaSydTypes - ScalaSyd
Types - ScalaSydRen Pillay
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013Kiril Iliev
 

Similar to Dokumentasi Protokol Client Server (11)

Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)Postman Collection Format v2.0 (pre-draft)
Postman Collection Format v2.0 (pre-draft)
 
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
SFScon17 - Patrick Puecher: "Exploring data with Elasticsearch and Kibana"
 
ABV_fastcontact
ABV_fastcontactABV_fastcontact
ABV_fastcontact
 
Neo4j introduction
Neo4j introductionNeo4j introduction
Neo4j introduction
 
Login and Registration form using oop in php
Login and Registration form using oop in phpLogin and Registration form using oop in php
Login and Registration form using oop in php
 
HTML5 - The 2012 of the Web
HTML5 - The 2012 of the WebHTML5 - The 2012 of the Web
HTML5 - The 2012 of the Web
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
 
Types - ScalaSyd
Types - ScalaSydTypes - ScalaSyd
Types - ScalaSyd
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Chat php
Chat phpChat php
Chat php
 

Dokumentasi Protokol Client Server

  • 1. Dokumentasi Protokol Client Server PEMROGRAMAN JARINGAN KELAS F Arifian Rahardianda 5111100141 Fajar Setiawan 5112100010 Luthfi Firmansyah Soehadak 5112100016 Adiyat Nurkautsar Sudirman 5112100065 R. M. Iskandar 5112100101 Jurusan Teknik Informatika - Institut Teknologi Sepuluh Nopember Kampus ITS Keputih Sukolilo Surabaya
  • 2. Format data inisialisasi koneksi Format data yang dikirim client (request) : {"REQ":"[request type]", "MESSAGE":"[request message]", "DATA":{"SESSION_KEY":"[session key]", "CONTENT":"[sent/received data or message content]", "TYPE":"[data type]"}} Format data respon dari server : {"STATE":"[state type]", "MESSAGE":"[response message]", "DATA":{"SESSION_KEY":"[session key]", "CONTENT":"[sent/received data or message content]", "TYPE":"[data type]"}} Penjelasan format pesan : REQ : Berisi jenis request yang diminta oleh client kepada server STATE : Berisi jenis state untuk client, jadi ketika client menerima response dari server dan membaca isi dari STATE, maka client akan berpindah ke state sesuai response server MESSAGE : Berisi string pesan request / response, yang nantinya akan diterjemahkan disisi client / server menjadi pesan. Misal MESSAGE : LOGIN_OK akan diterjemahkan client menjadi pesan “Anda telah berhasil login.” DATA : SESSION_KEY (session key untuk tiap user yang berisi key, username dan room), CONTENT (data yang dikirim atau diterima atau isi pesan) , TYPE(tipe data yang dikirim atau diterima) Jenis type data : AUTH(untuk pengiriman username dan password), LIST(untuk data array), TEXT(tipe data untuk pesan), NULL(tidak ada data yang dikirimkan) Data yang dikirim dipisah dengan karakter “:” Login Format Client {"REQ":"login", "MESSAGE":"REQ_LOGIN", "DATA":{"SESSION_KEY":" ", "CONTENT":[username and password]}, "TYPE":"AUTH"}} Format Server Session Key : Key, Username, dan Room(none)
  • 3. - Login Berhasil {"STATE":"feature", "MESSAGE":"LOGIN_PERMIT", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}} - Login Gagal (penginputan salah) {"STATE":"login", "MESSAGE":"LOGIN_FAILED", "DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}} - Login Gagal (double login) {"STATE":"login", "MESSAGE":"SESSION_FAILED", "DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}} Register Format Client {"REQ":"register", "MESSAGE":"REQ_REGISTER", "DATA":{"SESSION_KEY":" ", "CONTENT":[username and password]}, "TYPE":"AUTH"} Format Server Session Key : Key, Username, dan Room(none) - Register Berhasil {"STATE":"login", "MESSAGE":"REGISTER_PERMIT", "DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}} - Register Gagal {"STATE":"register", "MESSAGE":"REGISTER_FAILED", "DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}} Logout Format Client {"REQ":"logout", "MESSAGE":"REQ_LOGOUT", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}} Format Server Session Key : dihapus {"STATE":"welcome", "MESSAGE":"LOGOUT_SUCCESS", "DATA":{"SESSION_KEY":" ", "CONTENT":" ", "TYPE":"NULL"}}
  • 4. Create Room Format Client {"REQ":"create", "MESSAGE":"REQ_CREATE", "DATA":{"SESSION_KEY":[session key], "CONTENT":"[room name and room password]", "TYPE":"AUTH"}} Format Server Session Key : Key, Username, dan Room Name - Create Room Berhasil (SessionKey Update) {"STATE":"chat", "MESSAGE":"CREATE_SUCCESS", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}} - Create Room Gagal {"STATE":"feature", "MESSAGE":"CREATE_FAILED", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}} List Room Format Client {"REQ":"list_room", "MESSAGE":"REQ_LIST_ROOM", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}} Format Server Session Key : Key, Username, dan Room(none) {"STATE":"join", "MESSAGE":"LIST_ROOM", "DATA":{"SESSION_KEY":[session key], "CONTENT":[list room], "TYPE":"LIST"}} Join Room Format Client {"REQ":"join", "MESSAGE":"REQ_JOIN", "DATA":{"SESSION_KEY":[session key], "CONTENT":"[room name and room password]", "TYPE":"AUTH"}} Format Server Session Key : Key, Username, dan Room Name
  • 5. - Join Room Berhasil (SessionKey Update) {"STATE":"chat", "MESSAGE":"JOIN_SUCCESS", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}} - Join Room Gagal {"STATE":"join", "MESSAGE":"JOIN_FAILED", "DATA":{"SESSION_KEY":"[session key]", "CONTENT":[list room] , "TYPE":"LIST"}} Chat Format Client {"REQ":"chat", "MESSAGE":"IN_CHAT", "DATA":{"SESSION_KEY":[session key], "CONTENT":[chat content], "TYPE":"TEXT"}} Format Server Session Key : Key, Username, dan Room Name {"STATE":"chat", "MESSAGE":"IN_CHAT", "DATA":{"SESSION_KEY":"[session key]", "CONTENT":[chat content] , "TYPE":"TEXT"}} Leave Chat Room Format Client {"REQ":"leave", "MESSAGE":"LEAVE_CHAT", "DATA":{"SESSION_KEY":[session key], "CONTENT":[chat content] , "TYPE":"TEXT"}} Format Server Session Key : Key, Username, dan Room(none) {"STATE":"feature", "MESSAGE":"LEAVE_SUCCESS", "DATA":{"SESSION_KEY":[session key], "CONTENT":" ", "TYPE":"NULL"}}