SlideShare a Scribd company logo
Creating a Facebook Clone - Part XVIII
© Codename One 2017 all rights reserved
Pros Con
Clustering Large Database
Reasonable Performance Performance Could be Challenging
Simple Simple unless we scale
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@Entity
public class Media {
@Id
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
Media
@ManyToOne
private User owner;
@Lob
private byte[] data;
public Media() {
id = UUID.randomUUID().toString();
}
public MediaDAO getDAO() {
return new MediaDAO(id, filename, date, role, mimeType, visibility,
owner.getDAO(), data);
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getFilename() {
return filename;
}
Media
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
public String getVisibility() {
return visibility;
}
public void setVisibility(String visibility) {
this.visibility = visibility;
}
public User getOwner() {
return owner;
}
public void setOwner(User owner) {
this.owner = owner;
}
}
Media
public interface MediaRepository extends CrudRepository<Media, String> {
}
MediaRepository
public class MediaDAO {
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
private UserDAO owner;
private byte[] data;
public MediaDAO() {
}
public MediaDAO(String id, String filename, long date, String role,
String mimeType, String visibility, UserDAO owner,
byte[] data) {
this.id = id;
this.filename = filename;
this.date = date;
this.role = role;
this.mimeType = mimeType;
MediaDAO
public class MediaDAO {
private String id;
private String filename;
private long date;
private String role;
private String mimeType;
private String visibility;
private UserDAO owner;
private byte[] data;
public MediaDAO() {
}
public MediaDAO(String id, String filename, long date, String role,
String mimeType, String visibility, UserDAO owner,
byte[] data) {
this.id = id;
this.filename = filename;
this.date = date;
this.role = role;
this.mimeType = mimeType;
MediaDAO
private String visibility;
private UserDAO owner;
private byte[] data;
public MediaDAO() {
}
public MediaDAO(String id, String filename, long date, String role,
String mimeType, String visibility, UserDAO owner,
byte[] data) {
this.id = id;
this.filename = filename;
this.date = date;
this.role = role;
this.mimeType = mimeType;
this.visibility = visibility;
this.owner = owner;
this.data = data;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
MediaDAO
public String getMimeType() {
return mimeType;
}
public void setMimeType(String mimeType) {
this.mimeType = mimeType;
}
public String getVisibility() {
return visibility;
}
public void setVisibility(String visibility) {
this.visibility = visibility;
}
public byte[] getData() {
return data;
}
public void setData(byte[] data) {
this.data = data;
}
public UserDAO getOwner() {
return owner;
}
public void setOwner(UserDAO owner) {
this.owner = owner;
}
MediaDAO

More Related Content

Similar to Creating a Facebook Clone - Part XVIII.pdf

Creating a Facebook Clone - Part XXXVIII.pdf
Creating a Facebook Clone - Part XXXVIII.pdfCreating a Facebook Clone - Part XXXVIII.pdf
Creating a Facebook Clone - Part XXXVIII.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part XXXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXXVIII - Transcript.pdfCreating a Facebook Clone - Part XXXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXXVIII - Transcript.pdf
ShaiAlmog1
 
Green dao 3.0
Green dao 3.0Green dao 3.0
Green dao 3.0
彥彬 洪
 
Creating a Whatsapp Clone - Part XII - Transcript.pdf
Creating a Whatsapp Clone - Part XII - Transcript.pdfCreating a Whatsapp Clone - Part XII - Transcript.pdf
Creating a Whatsapp Clone - Part XII - Transcript.pdf
ShaiAlmog1
 
Creating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdfCreating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdf
ShaiAlmog1
 
Boost Your Development With Proper API Design
Boost Your Development With Proper API DesignBoost Your Development With Proper API Design
Boost Your Development With Proper API Design
MarcusHeld1
 
Techniques for Cross Platform .NET Development
Techniques for Cross Platform .NET DevelopmentTechniques for Cross Platform .NET Development
Techniques for Cross Platform .NET Development
Jeremy Hutchinson
 
Android Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, VonageAndroid Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, Vonage
DroidConTLV
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
ShaiAlmog1
 
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Codemotion
 
Easy data-with-spring-data-jpa
Easy data-with-spring-data-jpaEasy data-with-spring-data-jpa
Easy data-with-spring-data-jpa
Staples
 
Di web tech mail (no subject)
Di web tech mail   (no subject)Di web tech mail   (no subject)
Di web tech mail (no subject)
shubhamvcs
 
PDFDemo
PDFDemoPDFDemo
PDFDemo
shubraj1987
 
Refactoring - Mejorando el diseño del código existente
Refactoring - Mejorando el diseño del código existenteRefactoring - Mejorando el diseño del código existente
Refactoring - Mejorando el diseño del código existente
Mariano Sánchez
 
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - NetbeansLaporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Melina Krisnawati
 
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Melina Krisnawati
 
Recyclerview in action
Recyclerview in action Recyclerview in action
Recyclerview in action
Pratama Nur Wijaya
 
Lombokの紹介
Lombokの紹介Lombokの紹介
Lombokの紹介
onozaty
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
JavaDayUA
 
NOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynoteNOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynote
Emil Eifrem
 

Similar to Creating a Facebook Clone - Part XVIII.pdf (20)

Creating a Facebook Clone - Part XXXVIII.pdf
Creating a Facebook Clone - Part XXXVIII.pdfCreating a Facebook Clone - Part XXXVIII.pdf
Creating a Facebook Clone - Part XXXVIII.pdf
 
Creating a Facebook Clone - Part XXXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXXVIII - Transcript.pdfCreating a Facebook Clone - Part XXXVIII - Transcript.pdf
Creating a Facebook Clone - Part XXXVIII - Transcript.pdf
 
Green dao 3.0
Green dao 3.0Green dao 3.0
Green dao 3.0
 
Creating a Whatsapp Clone - Part XII - Transcript.pdf
Creating a Whatsapp Clone - Part XII - Transcript.pdfCreating a Whatsapp Clone - Part XII - Transcript.pdf
Creating a Whatsapp Clone - Part XII - Transcript.pdf
 
Creating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdfCreating a Facebook Clone - Part X.pdf
Creating a Facebook Clone - Part X.pdf
 
Boost Your Development With Proper API Design
Boost Your Development With Proper API DesignBoost Your Development With Proper API Design
Boost Your Development With Proper API Design
 
Techniques for Cross Platform .NET Development
Techniques for Cross Platform .NET DevelopmentTechniques for Cross Platform .NET Development
Techniques for Cross Platform .NET Development
 
Android Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, VonageAndroid Architecture Components - Guy Bar on, Vonage
Android Architecture Components - Guy Bar on, Vonage
 
create-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdfcreate-netflix-clone-03-server.pdf
create-netflix-clone-03-server.pdf
 
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
Nicola Corti - Building UI Consistent Android Apps - Codemotion Milan 2017
 
Easy data-with-spring-data-jpa
Easy data-with-spring-data-jpaEasy data-with-spring-data-jpa
Easy data-with-spring-data-jpa
 
Di web tech mail (no subject)
Di web tech mail   (no subject)Di web tech mail   (no subject)
Di web tech mail (no subject)
 
PDFDemo
PDFDemoPDFDemo
PDFDemo
 
Refactoring - Mejorando el diseño del código existente
Refactoring - Mejorando el diseño del código existenteRefactoring - Mejorando el diseño del código existente
Refactoring - Mejorando el diseño del código existente
 
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - NetbeansLaporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
Laporan Final Project - Aplikasi Sistem Informasi Rental CD - Netbeans
 
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
Laporan pembuatan Final Project (Java - Netbeans) "Rental CD"
 
Recyclerview in action
Recyclerview in action Recyclerview in action
Recyclerview in action
 
Lombokの紹介
Lombokの紹介Lombokの紹介
Lombokの紹介
 
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp KrennPaintfree Object-Document Mapping for MongoDB by Philipp Krenn
Paintfree Object-Document Mapping for MongoDB by Philipp Krenn
 
NOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynoteNOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynote
 

More from ShaiAlmog1

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
ShaiAlmog1
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
ShaiAlmog1
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
ShaiAlmog1
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
ShaiAlmog1
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
ShaiAlmog1
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
ShaiAlmog1
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
ShaiAlmog1
 
Creating a Whatsapp Clone - Part IX.pdf
Creating a Whatsapp Clone - Part IX.pdfCreating a Whatsapp Clone - Part IX.pdf
Creating a Whatsapp Clone - Part IX.pdf
ShaiAlmog1
 

More from ShaiAlmog1 (20)

The Duck Teaches Learn to debug from the masters. Local to production- kill ...
The Duck Teaches  Learn to debug from the masters. Local to production- kill ...The Duck Teaches  Learn to debug from the masters. Local to production- kill ...
The Duck Teaches Learn to debug from the masters. Local to production- kill ...
 
create-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdfcreate-netflix-clone-06-client-ui.pdf
create-netflix-clone-06-client-ui.pdf
 
create-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdfcreate-netflix-clone-01-introduction_transcript.pdf
create-netflix-clone-01-introduction_transcript.pdf
 
create-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdfcreate-netflix-clone-02-server_transcript.pdf
create-netflix-clone-02-server_transcript.pdf
 
create-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdfcreate-netflix-clone-04-server-continued_transcript.pdf
create-netflix-clone-04-server-continued_transcript.pdf
 
create-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdfcreate-netflix-clone-01-introduction.pdf
create-netflix-clone-01-introduction.pdf
 
create-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdfcreate-netflix-clone-06-client-ui_transcript.pdf
create-netflix-clone-06-client-ui_transcript.pdf
 
create-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdfcreate-netflix-clone-04-server-continued.pdf
create-netflix-clone-04-server-continued.pdf
 
create-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdfcreate-netflix-clone-05-client-model_transcript.pdf
create-netflix-clone-05-client-model_transcript.pdf
 
create-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdfcreate-netflix-clone-03-server_transcript.pdf
create-netflix-clone-03-server_transcript.pdf
 
create-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdfcreate-netflix-clone-02-server.pdf
create-netflix-clone-02-server.pdf
 
create-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdfcreate-netflix-clone-05-client-model.pdf
create-netflix-clone-05-client-model.pdf
 
Creating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdfCreating a Whatsapp Clone - Part II.pdf
Creating a Whatsapp Clone - Part II.pdf
 
Creating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdfCreating a Whatsapp Clone - Part IX - Transcript.pdf
Creating a Whatsapp Clone - Part IX - Transcript.pdf
 
Creating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdfCreating a Whatsapp Clone - Part II - Transcript.pdf
Creating a Whatsapp Clone - Part II - Transcript.pdf
 
Creating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdfCreating a Whatsapp Clone - Part V - Transcript.pdf
Creating a Whatsapp Clone - Part V - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdfCreating a Whatsapp Clone - Part IV - Transcript.pdf
Creating a Whatsapp Clone - Part IV - Transcript.pdf
 
Creating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdfCreating a Whatsapp Clone - Part IV.pdf
Creating a Whatsapp Clone - Part IV.pdf
 
Creating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdfCreating a Whatsapp Clone - Part I - Transcript.pdf
Creating a Whatsapp Clone - Part I - Transcript.pdf
 
Creating a Whatsapp Clone - Part IX.pdf
Creating a Whatsapp Clone - Part IX.pdfCreating a Whatsapp Clone - Part IX.pdf
Creating a Whatsapp Clone - Part IX.pdf
 

Recently uploaded

"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
ScyllaDB
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
christinelarrosa
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 

Recently uploaded (20)

"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Christine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptxChristine's Product Research Presentation.pptx
Christine's Product Research Presentation.pptx
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 

Creating a Facebook Clone - Part XVIII.pdf

  • 1. Creating a Facebook Clone - Part XVIII
  • 2. © Codename One 2017 all rights reserved Pros Con Clustering Large Database Reasonable Performance Performance Could be Challenging Simple Simple unless we scale
  • 3. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 4. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 5. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 6. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 7. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 8. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 9. @Entity public class Media { @Id private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } Media
  • 10. @ManyToOne private User owner; @Lob private byte[] data; public Media() { id = UUID.randomUUID().toString(); } public MediaDAO getDAO() { return new MediaDAO(id, filename, date, role, mimeType, visibility, owner.getDAO(), data); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getFilename() { return filename; } Media
  • 11. return mimeType; } public void setMimeType(String mimeType) { this.mimeType = mimeType; } public byte[] getData() { return data; } public void setData(byte[] data) { this.data = data; } public String getVisibility() { return visibility; } public void setVisibility(String visibility) { this.visibility = visibility; } public User getOwner() { return owner; } public void setOwner(User owner) { this.owner = owner; } } Media
  • 12. public interface MediaRepository extends CrudRepository<Media, String> { } MediaRepository
  • 13. public class MediaDAO { private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; private UserDAO owner; private byte[] data; public MediaDAO() { } public MediaDAO(String id, String filename, long date, String role, String mimeType, String visibility, UserDAO owner, byte[] data) { this.id = id; this.filename = filename; this.date = date; this.role = role; this.mimeType = mimeType; MediaDAO
  • 14. public class MediaDAO { private String id; private String filename; private long date; private String role; private String mimeType; private String visibility; private UserDAO owner; private byte[] data; public MediaDAO() { } public MediaDAO(String id, String filename, long date, String role, String mimeType, String visibility, UserDAO owner, byte[] data) { this.id = id; this.filename = filename; this.date = date; this.role = role; this.mimeType = mimeType; MediaDAO
  • 15. private String visibility; private UserDAO owner; private byte[] data; public MediaDAO() { } public MediaDAO(String id, String filename, long date, String role, String mimeType, String visibility, UserDAO owner, byte[] data) { this.id = id; this.filename = filename; this.date = date; this.role = role; this.mimeType = mimeType; this.visibility = visibility; this.owner = owner; this.data = data; } public String getId() { return id; } public void setId(String id) { this.id = id; MediaDAO
  • 16. public String getMimeType() { return mimeType; } public void setMimeType(String mimeType) { this.mimeType = mimeType; } public String getVisibility() { return visibility; } public void setVisibility(String visibility) { this.visibility = visibility; } public byte[] getData() { return data; } public void setData(byte[] data) { this.data = data; } public UserDAO getOwner() { return owner; } public void setOwner(UserDAO owner) { this.owner = owner; } MediaDAO