Sistem Terdistribusi 2 Model arsitektur Terdistribusi
Masalah Membangun SisTer • B Berhubungan h b d dengan peletakan l t k komponenk komponen dan juga relasi antar komponen • Memastikan M tik struktur t kt arsitektur it kt bisa bi memenuhi hi kebutuhan dan membuat sistem reliable, manageable adaptable manageable, adaptable, dan cost-effective • Sistem hrs melakukan klasifikasi terhadap proses yang terjadi pada server server, client client, maupun peer • Sister memiliki banyak sekali variasi, tergantung dari jaringan komputer komputer, performa performa, reliabilitas reliabilitas, keamanan, dan biaya
Kesulitan kesulitan peletakan Kesulitan-kesulitan • Dari D i sisi i i mode d pemakaian k i – Variasi yang beragam terhadap karakteristik pemakaian sistem • Berapa kali suatu halaman dikunjungi? • Seberapa sibuk suatu server?
• Dari sisi masalah Internal – Masalah konkurensi akses
• Dari sisi masalah lingkungan sistem – Masalah heterogenitas: hardware, sistem operasi dan j jaringan g
• Dari sisi masalah ancaman eksternal – Masalah keamanan data
Model Arsitektur SisTer • Software architecture – Organisasi logika dari komponen-komponen software – Ada 4 jenis: • • • •
Layered architectures Object-based architectures Data-centered architectures Event-based architectures
• System Architecture – Placement of machines – Placement off software f on machines
Software architecture Layered system - Breaking up the complexity of systems by designing them through layers and services - layer: group of closely related and highly coherent functionalities - service: functionality provided to a superior layer
- Examples p of layered y architectures - operating systems (kernel, other services), - computer network protocol architectures
Layered Architecture
Contoh OS: – Windows – Linux – Macintosh Contoh lain: OSI dan TCP/IP
Typical layering in Distributed Systems - Platform: Pl tf H d Hardware and d operating ti system t - Windows NT / Pentium processor - Solaris / SPARC processor
- Middleware: achieve transparency p y of heterogeneity at platform level - Achieve communication and resource sharing g ie.g., remote method invocation - Examples - CORBA (OMG), DCOM (Microsoft), Java Remote Method Invocation (Sun)
Object based Architecture
Bagus dapat menggunakan mekanisme Remote Procedure Call antar obyek Bagus,
Event based Architecture Event-based Dikenal sbg: Publish/Subscribe System
Proses Berkomunikasi berdasarkan event yg terjadi
Data Centered Architecture
Proses-proses berkomunikasi melalui repository data (database terdistribusi)
Klasifikasi Proses • Proses P Server S – Menyediakan layanan dan menangani request
• Proses Client – Proses membuat melakukan request
• Proses Peer – Proses yang saling bekerja sama dan berkomunikasi
• Middleware – Menyediakan transparansi terhadap keanekaragaman platform proses dan objek pada sekumpulan mesin yang menerapkan protokol untuk aplikasi terdistribusi – Cth: CORBA, Java RMI, DCOM
Clients - Servers Client
invocation result
invocation
Server
Server
result
Client Key: Process:
• Bersifat: centralized architecture • Terjadi invocation dari client ke server • Contoh: client ((browser)) meminta HTML ke HTTP Server
Computer:
Interaksi client-server client server
Karakteristik CS • S Service i : Menyediakan M di k llayanan tterpisah i h yang berbeda • Shared Sh d resource : Server S d dapatt melayani l i beberapa client pada saat yang sama dan mengatur pengaksesan Resource • Asymmetrical Protocol : antara client dan server merupakan hubungan one one-to-many. to many • Mix-and-match : tidak tergantung pada platform • Encapsulation of service : message memberitahu server apa yang akan dikerjakan
Karakteristik CS • T Transparency Location L ti : proses server dapat d t ditempatkan pada mesin yang sama atau terpisah dengan proses client. Client/server akan menyembunyikan lokasi server dari client. • Message-based-exchange g g : antara client dan server berkomunikasi dengan mekanisme pertukaran message. • Scalability S l bilit : sistem i t C/S dapat d t dimekarkan di k k b baik ik vertikal maupun horisontal • Integrity : kode dan data server diatur secara terpusat, sedangkan pada client tetap pada komputer p tersendiri
Multiple server
• Service disediakan oleh beberapa server • Contoh: sebagian besar layanan web komersial diterapkan melalui server fisik yang berbeda • Untuk: kehandalan, kehandalan unjuk gigi • Server menggunakan replikasi atau database terdistribusi
Web proxy server Web server
Client Proxy y server
C Client
Web server
• Server menduplikasi informasi (cache) untuk bertindak sebagai proxy • Cache: • • • •
menyimpan informasi f lokal yg sering digunakan Mengurangi beban kerja server Meningkatkan kinerja Wajib digunakan pada search engine
Cache
Web applets / Mobile Agent a)) client li t requestt results lt iin th the d downloading l di off applet l t code d
Client Applet code
Web server
b) client interacts with the applet
Client
Applet
Web server
Mobile agents • Executing program (code + data) in client side, carrying out of an autonomous task & interactive • Advantages: flexibility and savings in communications cost • Disadvantages: worm programs and cannot access to client resources (ie: JAVA applet)
Apllication Layering
Application Layering example
• The simplified organization of an Internet search engine into three different layers.
Multitiered Architectures • Disebut sebagai: Decentralized architecture • The simplest organi organization ation is to ha have e onl only two types of machines: – A client machine containing only the programs implementing (part of) the userinterface level – A server machine containing g the rest,, • the programs implementing the processing and data level
Multitiered Architectures (2) Thin Client
Thick Client
Contoh C t h Thin Thi Client: Cli t • VNC client (Virtual Network Controller) • VNC is remote control software which allows you to view and fully interact with one computer desktop
Multitiered Architectures Interaction
Middleware • Sebuah komponen untuk – Menyamarkan e ya a a heterogeneity e e oge e y – Melakukan message passing
• Di Direpresentasikan t ik d dalam l b bentuk t k object bj t • Contoh: Sun RPC,, CORBA,, RMI,, DCOM • Keuntungan: OS + Hardware independen
Peer to Peer Peer-to-Peer
Peer to peer Peer-to-peer • Static structure – LAN – Example: Borgchat
• Dynamic y structure – Structured • Distributed hash table
– Unstructured – Example JXTA, Torrent
DHT on Peer-to-Peer Peer to Peer
Superpeers
• Gabungan g p peer-to-peer p & client server
Collaborative Distributed Systems bitTorrent
• Download file .torrent dari website, yang berisi informasi file yg akan didwnload (seed) • Sisterm akan mencari penyedia file (seeder) Tracker, user (leecher) akan bergabung • Dicatat oleh Tracker dalam node seed dan peer
Model Sister • Interaction model: sistem dipandang y p proses yyang g saling g terdiri dari banyak berinteraksi • Failure model: sistem bisa gagal • Security model: sistem harus diamankan
Fundamental Model SisTer
it is impossible for any process to have a view on the current global state of the system
Faktor faktor Interaction Model Faktor-faktor • Latency, L t d l antara delay t pengirim ii d dan penerima i message – Network access time (cth: ethernet delay) – Waktu untuk pengiriman bit pertama dari Network Interface pengirim ke Network Interface Penerima – Waktu pemrosesan pada proses pengiriman dan penerimaan
• Th Throughput, h t jumlah j l h paket k t yang tterantar t per satuan t waktu • Bandwidth, Bandwidth jumlah informasi (bit) yang terkirim per satuan waktu • Delay jitter, variasi delay antar pesan bertipe sama yang berbeda (cth: video frame delay)
Macam macam failure model Macam-macam • Process failure: crash • Deteksi e e s dg dgn timeout eou
• Communication failure: message drop • Karena: K transmission t i i error, buffer b ff overflow fl
• Arbitrary y failure: p proses melewatkan step p yang harus dilakukan atau membawa data yg salah • Data korup, data double
NEXT Interprocess Communication: komunikasi, direct direct, indirect • Prinsip komunikasi communication, karakteristik IPC, macammacam IPC IPC, group communication • Komunikasi jaringan: OSI, TCP, UDP • Failure model of IPC • Representasi R t iD Data t p 4 • Sumber: chapter