SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload...

18
SIMAGINARITY Salih Safa BACANLI

Transcript of SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload...

Page 1: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

SIMAGINARITYSalih Safa BACANLI

Page 2: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Description• Simaginarity is a site that allows users to upload their

photos and see the other users’ photos that are similar to theirs’.• Photo and username

Page 3: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Technologies• PHP (Apache Server)• MYSQL• Amazon EC2 (servers)• Amazon S3 (file storage)

Page 4: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

• PHP• Easy to handle code & design• Relatively fast• Supported by Amazon AWS

Page 5: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

• MYSQL (mysqli)• Works fine with Apache, PHP• Necessary to get ordered data

Page 6: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

db

hostMYSQL

APACHE

Page 7: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Basic Scenario• Users creates an account with email and username• User uploads photos (rare)• User sees similar photos (often)

Page 8: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Now...• When user uploads a new photo it is compared with all of

the photos in the system and similarity values written to database (heavy work)

• When user wants to see similar photos photo information from database is shown. • No calculation again.

Page 9: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Before...• Calculation is done when everytime user sees similar

photos.• Time consuming,• Kills the efficiency when number of photos increase

• Previous design is changed

Page 10: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

• In order to see the most similar photos we need to get the ordered values of comparison.• Not possible with nosql database

• Installed Redis (nosql database) but useless• Redis is slow if working in VM (EC2) http://redis.io/topics/latency• http://stackoverflow.com/questions/11765502/best-ec2-setup-for-re

dis-server

Page 11: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Why not nosql

Page 12: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

DB

Page 13: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

MVC• Model

• Config.php

• View• Php html files

• Controller• library.php

Page 14: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Image Functions• Histogram• Histcompare

• sum (xi-yi)2 (Covariance)

• If array sizes different than some value, histograms are not same (value:99)

• The more value is closer to 0 the more similar are the images• Get the sorted values of «value» in imagecomp table

• Average (not used)• Getting average color

Page 15: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

What should be done to make it more efficient?

• SQS (no time left)• Comparison is done by host now. If it can be done by another

server or DB server, the host can be little light afterwards.

• Average value comparison (recorded, not used)• A way to do the processing on S3. Files are processed on

local.• Some way to make the processing on user’s computer

(javascript, java)• Using maybe nosql for users and images table

Page 16: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

Site feature improvements• Make users define groups of photos so that only their

friends see their similar photos• To make the job realistic, get only some points of photo

histogram• Image processing techniques• Geotagging• Mobile version of site

Page 17: SIMAGINARITY Salih Safa BACANLI. Description Simaginarity is a site that allows users to upload their photos and see the other users’ photos that are.

What I learnt?• Using AWS• Nice features of Cloud• Getting used to using Distributed System• Useful cloud computing usage idea