4/17/13 1 Distributed Data Management Summer Semester 2013 TU Kaiserslautern Dr.Ing. Sebas9an Michel [email protected]Distributed Data Management, SoSe 2013, S. Michel 1 MOTIVATION AND OVERVIEW Lecture 1 Distributed Data Management, SoSe 2013, S. Michel 2 Distributed Data Management • What does “distributed” mean? • And why would we want/need to do things in a distributed way? Distributed Data Management, SoSe 2013, S. Michel 3 Reason: Federated Data • Data is per se hosted at different sites • Autonomy of sites • Maintained by diff. organiza9ons • Mashups over such independent sources • Linked Open Data (LOD) Distributed Data Management, SoSe 2013, S. Michel 4 Reason: Sensor Data • Data originates at different sensors • Spread across the world • Health data from mobile devices Distributed Data Management, SoSe 2013, S. Michel 5 Con$nuous queries! Distributed Data Management, SoSe 2013, S. Michel 6 IP Bytes in kB 192.168.1.7 31kB 192.168.1.3 23kB 192.168.1.4 12kB IP Bytes in kB 192.168.1.8 81kB 192.168.1.3 33kB 192.168.1.1 12kB IP Bytes in kB 192.168.1.4 53kB 192.168.1.3 21kB 192.168.1.1 9kB IP Bytes in kB 192.168.1.1 29kB 192.168.1.4 28kB 192.168.1.5 12kB E.g. find clients that cause high network traffic. Reason: Network Monitoring
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Distributed Data Management, SoSe 2013, S. Michel 1
MOTIVATION AND OVERVIEW Lecture 1
Distributed Data Management, SoSe 2013, S. Michel 2
Distributed Data Management
• What does “distributed” mean?
• And why would we want/need to do things in a distributed way?
Distributed Data Management, SoSe 2013, S. Michel 3
Reason: Federated Data • Data is per se hosted at different sites
• Autonomy of sites • Maintained by diff. organiza9ons • Mashups over such independent sources
• Linked Open Data (LOD)
Distributed Data Management, SoSe 2013, S. Michel 4
Reason: Sensor Data
• Data originates at different sensors • Spread across the world • Health data from mobile devices
Distributed Data Management, SoSe 2013, S. Michel 5
Con$nuous queries!
Distributed Data Management, SoSe 2013, S. Michel 6
IP Bytes in kB
192.168.1.7 31kB
192.168.1.3 23kB
192.168.1.4 12kB
IP Bytes in kB
192.168.1.8 81kB
192.168.1.3 33kB
192.168.1.1 12kB
IP Bytes in kB
192.168.1.4 53kB
192.168.1.3 21kB
192.168.1.1 9kB
IP Bytes in kB
192.168.1.1 29kB
192.168.1.4 28kB
192.168.1.5 12kB
E.g. find clients that cause high network traffic.
Reason: Network Monitoring
4/17/13
2
Reason: Individuals as Providers/Consumers
• Don’t want single operator with global knowledge -‐> be^er decentralized?
• Distributed search engines • Data on mobile phones • Peer-‐to-‐Peer (P2P) systems • Distributed social networks • Leveraging idle resources
Distributed Data Management, SoSe 2013, S. Michel 7
Example: SETI@Home
• Distributed Compu9ng • Donate idle 9me of your personal computer
• Analyze extraterrestrial radio signals when screensaver is running
Distributed Data Management, SoSe 2013, S. Michel 8
Distributed Data Management, SoSe 2013, S. Michel 9
Example: P2P Systems: Napster
Publish
file sta
9s9cs
File Download
File Dow
nload
• Central server (index) • Client sofware sends informa9on about users‘ contents to server. • User send queries to server • Server responds with IP of users that store matching files. à Peer-‐to-‐Peer file sharing!
• Developed in 1998. • First P2P file-‐sharing system
Pirate-‐to-‐Pirate?
Example: Self Organiza9on & Message Flooding
Distributed Data Management, SoSe 2013, S. Michel 10
• That leaves trading off consistency and availability
Distributed Data Management, SoSe 2013, S. Michel 32
Best effort: BASE
• Basically Available • Sof State • Eventual Consistency
Distributed Data Management, SoSe 2013, S. Michel 33
see h^p://www.allthingsdistributed.com/2007/12/eventually_consistent.html W. Vogels. Eventually Consistent. ACM Queue vol. 6, no. 6, December 2008.
The NoSQL “Movement”
• No one-‐size-‐fits-‐all • Not only SQL (not necessarily “no” SQL at all) • for group of non-‐tradi9onal DBMS (not rela9onal, ofen no SQL), for different purposes – key value stores – graph databases – document stores
Distributed Data Management, SoSe 2013, S. Michel 34
Example: Key Value Stores
• Like Apache Cassandra, Amazon’s Dynamo, Riak • Handling of (K,V) pairs
• Consistent hashing of values to nodes based on their keys
• Simple CRUD opera9ons (create, read, update, delete) (no SQL, or at least not full)
Distributed Data Management, SoSe 2013, S. Michel 35
Cri9cisms
• Some DB folks say “Map Reduce is a major step backward”.
• And NoSQL is too basic and will end up re-‐inven9ng DB standards (once they need it).
• Will ask in a few weeks: What do you think?
Distributed Data Management, SoSe 2013, S. Michel 36
4/17/13
7
Cloud Compu9ng
• On demand hardware – rent your compu9ng machinery – virtualiza9on
• Google App engine, Amazon AWS, Microsof Azure – Infrastructure as a Service (IaaS) – Pla�orm as a Service (PaaS) – Sofware as a Service (SaaS)
Distributed Data Management, SoSe 2013, S. Michel 37
Cloud Compu9ng (Cont’d) • Promises “no” startup cost for own business in terms of hardware you need to buy
• Scalability: Just rent more when you need them • And return them when there is no demand • Prominent showcase: Animoto, in Amazon’s EC2. From 50 to 3,500 machines in few days.
• But also problema9c: – fully dependent on a vendors hardware/service – sensi9ve data (all your data) is with vendor, maybe stored in a diff country (likely)
Distributed Data Management, SoSe 2013, S. Michel 38
Dynamic Big Data
• Scalable, con9nuous processing of massive data streams
• Twi^er’s Storm, Yahoo! (now Apache) S4
Distributed Data Management, SoSe 2013, S. Michel 39
h^p://storm-‐project.net/
Last but not least: Fallacies of Distributed Compu9ng
1. The network is reliable 2. Latency is zero 3. Bandwidth is infinite 4. The network is secure 5. Topology doesn't change 6. There is one administrator 7. Transport cost is zero 8. The network is homogeneous
Distributed Data Management, SoSe 2013, S. Michel 40
source: Peter Deutsch and others at Sun
LECTURE: CONTENT & REGULATIONS
Distributed Data Management, SoSe 2013, S. Michel 41
What you will learn in this Lecture • Most of the lecture is on processing big data
– Map Reduce, NoSQL, Cloud compu9ng • Will operate on state of the art research results and tools
• Middle way between pure systems/tools discussion and learning how to build algorithms on top of them (see Joins over MR, n-‐grams, etc.)
• But also basic (important) techniques, like consistent hashing, PageRank, Bloom filters
• Very relevant stuff. Think “CV” ;)
Distributed Data Management, SoSe 2013, S. Michel 42
4/17/13
8
• We will cri9cally discuss techniques (philosophies).
Distributed Data Management, SoSe 2013, S. Michel 43
Prerequisites • Successfully a^ended informa9on systems or database lectures.
• Prac9cal exercises require solid Java skills
• Work with systems/tools requires will to dive into APIs and installa9on procedures
Distributed Data Management, SoSe 2013, S. Michel 44
• Exercise: – Tuesday (bi-‐weekly) – 15:30 -‐ 17:00 – Room 52-‐203 – First session: May 7th.
Distributed Data Management, SoSe 2013, S. Michel 47
Lecture Organiza9on
• New Lecture (almost all slides are new).
• On topics that are ofen brand new.
• Later topics are s9ll tenta9ve.
• Please provide feedback. E.g., too slow / too fast? Important topics you want to be addressed?
Distributed Data Management, SoSe 2013, S. Michel 48
4/17/13
9
Exercises
• Assignment sheet, every two weeks • Sheet + TA session by Johannes Schildgen • Mixture of:
– Prac9cal: Implementa9on (e.g., Map Reduce) – Prac9cal: Algorithms on “paper” – Theory: Where appropriate (show that …) – Brief Essay: Explain the difference of x and y (short summary)
• Ac9ve par9cipa9on wanted! J
Distributed Data Management, SoSe 2013, S. Michel 49
Exam
• Oral Exam at the end of semester/early in semester break.
• Around 20min • Topics captured announced few (1-‐2) weeks before exams
• We assume you ac9vely par9cipated in the exercises.
Distributed Data Management, SoSe 2013, S. Michel 50
Registra9on
• Please register by email to – Sebas9an Michel and Johannes Schildgen – Use subject prefix: [ddm13] – With content:
• Your name • Matricula9on number
• In par9cular to receive announcements/news
Distributed Data Management, SoSe 2013, S. Michel 51
BIG DATA
Distributed Data Management, SoSe 2013, S. Michel 52
source: Dilbert by ScoQ Adams (cropped)
(The Big data Challenge)
What is Big Data? • Massive amounts of data from a variety of sources – Web search logs – social networks and blogs – RFID and other sensor data – sales data – scien9fic data
& it is a big buzzword!
Distributed Data Management, SoSe 2013, S. Michel 53
What is Big Data? (Cont’d)
Distributed Data Management, SoSe 2013, S. Michel 54
• Big data is ofen associated with NoSQL and MapReduce tools to process it.
• Processed in and across gigan9c data centers
• The term “Big Data” denotes not only size but things we want to/can do with it (benefits)
4/17/13
10
Tradi9onal Handling
• Data warehousing, e.g., at Walmart, Ebay, etc. Also super big and constantly growing.
• But you know your data, know what you are looking for
• Schema is “small” enough to allow human input (admin)
• It is “just” YOUR data
Distributed Data Management, SoSe 2013, S. Michel 55
“Simple” Case: Shopping Pa^erns
• Famous story: – sta9s9cian at target.com (large retailer in US) – task: figure out woman is pregnant even if she doesn’t want them to know
– even more: roughly which week/month – Why? To sell products!
Distributed Data Management, SoSe 2013, S. Michel 56