54
Speaker: Gilles Dubuc

Gilles Dubuc - Barcelona Facebook developer garage

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Gilles Dubuc - Barcelona Facebook developer garage

Speaker: Gilles Dubuc

Page 2: Gilles Dubuc - Barcelona Facebook developer garage

non-profit ad network

Page 3: Gilles Dubuc - Barcelona Facebook developer garage

non-profit ad networklessons learned

Page 4: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

Why create a non-profit ad network?

BigAppInc.

SmallAppLtd

advertisement$$$

PequeñoAppSL

advertisement$$$

PetiteAppSARL

Page 5: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

Why create a non-profit ad network?

come on in,you’ll make a quick buckBigApp

Inc.

SmallAppLtd

advertisement$$$

PequeñoAppSL

advertisement$$$

PetiteAppSARL

Page 6: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

Why create a non-profit ad network?

come on in,you’ll make a quick buckBigApp

Inc.

SmallAppLtd

already has a userbase andsells ad space to other application makers

advertisement$$$

PequeñoAppSL

advertisement$$$

PetiteAppSARL

Page 7: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

Why create a non-profit ad network?

come on in,you’ll make a quick buckBigApp

Inc.

SmallAppLtd

already has a userbase andsells ad space to other application makers

advertisement$$$

PequeñoAppSL

advertisement$$$

all hope that they’ll grow big enough to sell ad space to smaller application makers

PetiteAppSARL

Page 8: Gilles Dubuc - Barcelona Facebook developer garage

Why create a non-profit ad network?

photo credit: khalid almasoud

Page 9: Gilles Dubuc - Barcelona Facebook developer garage

The idea

App

Donation pool

App

App

Text

X clicks donatedY clicks received

f(x-y) = priority

Page 10: Gilles Dubuc - Barcelona Facebook developer garage

The idea

App

Donation pool

App

Applications share userbase growth

App

Text

X clicks donatedY clicks received

f(x-y) = priority

Page 11: Gilles Dubuc - Barcelona Facebook developer garage

The idea

App

Donation pool

App

Applications share userbase growth

Developers distribute “growth credit” among their applications

App

Text

X clicks donatedY clicks received

f(x-y) = priority

Page 12: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

(daily active users)

Page 13: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

(daily active users)

• Open source

Page 14: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

(daily active users)

• Open source

• Non-profit

Page 15: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

(daily active users)

• Open source

• Non-profit

• Aimed at application cross-promotion

Page 16: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

(daily active users)

• Open source

• Non-profit

• Aimed at application cross-promotion

• Accessible through an API

Page 17: Gilles Dubuc - Barcelona Facebook developer garage

(daily active users)

(daily active users)

• Open source

• Non-profit

• Aimed at application cross-promotion

• Accessible through an API

• Started in October 07

Page 18: Gilles Dubuc - Barcelona Facebook developer garage

On average 100 applications are part of the cross-promotion pool

(daily active users)

(daily active users)

Page 19: Gilles Dubuc - Barcelona Facebook developer garage

CTR

(daily active users)

(daily active users)

Page 20: Gilles Dubuc - Barcelona Facebook developer garage

CTR

(daily active users)

(daily active users)

developercheating

Page 21: Gilles Dubuc - Barcelona Facebook developer garage

CTR

(daily active users)

(daily active users)

developercheating

averagearound 0.12 %

Page 22: Gilles Dubuc - Barcelona Facebook developer garage

A few lessons learned

(daily active users)

Page 23: Gilles Dubuc - Barcelona Facebook developer garage

A few lessons learned

(daily active users)

A cross-promotion network won’t make your app’s whole growth, but it’s a nice supplement

Page 24: Gilles Dubuc - Barcelona Facebook developer garage

A few lessons learned

(daily active users)

Making it open source doesn’t mean other developers will help

A cross-promotion network won’t make your app’s whole growth, but it’s a nice supplement

Page 25: Gilles Dubuc - Barcelona Facebook developer garage

A few lessons learned

(daily active users)

Making it open source doesn’t mean other developers will help

A cross-promotion network won’t make your app’s whole growth, but it’s a nice supplement

Be careful of people trying to take advantage

Page 26: Gilles Dubuc - Barcelona Facebook developer garage

A few lessons learned

(daily active users)

Making it open source doesn’t mean other developers will help

A cross-promotion network won’t make your app’s whole growth, but it’s a nice supplement

Be careful of people trying to take advantage

Planning scaling is important

Page 27: Gilles Dubuc - Barcelona Facebook developer garage

caching & scaling101

Page 28: Gilles Dubuc - Barcelona Facebook developer garage

caching & scaling101being prepared for overnight growth

Page 29: Gilles Dubuc - Barcelona Facebook developer garage

Distributed caches in a nutshell

Page 30: Gilles Dubuc - Barcelona Facebook developer garage

• Clustered caches let you store data in a server’s RAM

Distributed caches in a nutshell

Page 31: Gilles Dubuc - Barcelona Facebook developer garage

• Clustered caches let you store data in a server’s RAM

• The most popular ones act like hashmaps

Distributed caches in a nutshell

Page 32: Gilles Dubuc - Barcelona Facebook developer garage

• Clustered caches let you store data in a server’s RAM

• The most popular ones act like hashmaps

• Access is blazingly fast compared to a database, but you lose the advantage of advanced queries

Distributed caches in a nutshell

Page 33: Gilles Dubuc - Barcelona Facebook developer garage

• Clustered caches let you store data in a server’s RAM

• The most popular ones act like hashmaps

• Access is blazingly fast compared to a database, but you lose the advantage of advanced queries

• Deploying a cluster of distributed cache nodes is straightforward and requires minimal configuration

Distributed caches in a nutshell

Page 34: Gilles Dubuc - Barcelona Facebook developer garage

Distributed caches in a nutshell

Cache::set($key, $value, $expiry);

Cache::replace($key, $new_value, $expiry);

Cache::get($key);

Cache::delete($key);

Cache::increment($counter);

Page 35: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Identify the static (or mostly static) elements of your pagesi.e. the leaderboard of your game

Instead of pulling the leaderboard’s data from the database every time, make a cron job generate it into the cache

Then pull the data from the cache when end-users request it instead of querying the DB

Page 36: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Storing your objects into the distributed cache

class User {private $user_id;private $score;

[...]

private function saveIntoCache() {Cache::replace(“User-”.$user_id, $this);

}}

Page 37: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Common pitfalls

Be very careful of invalidating the cache at the right time

Page 38: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Common pitfalls

Be very careful of invalidating the cache at the right time

If counters are needed as part of some objects, these need to be stored in the cache in addition to the object

Page 39: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Common pitfalls

Be very careful of invalidating the cache at the right time

If counters are needed as part of some objects, these need to be stored in the cache in addition to the object

Concurrency issues

Page 40: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Common pitfalls

Be very careful of invalidating the cache at the right time

If counters are needed as part of some objects, these need to be stored in the cache in addition to the object

Concurrency issues

Always assume that the cache might fail

Page 41: Gilles Dubuc - Barcelona Facebook developer garage

Improve your application’s scalability with caching

Common pitfalls

Be very careful of invalidating the cache at the right time

If counters are needed as part of some objects, these need to be stored in the cache in addition to the object

Concurrency issues

Always assume that the cache might fail

Memcached crashes inexplicably from time to time, setup a mechanism to restart it automatically

Page 42: Gilles Dubuc - Barcelona Facebook developer garage

• Design your architecture with more than one server in mind

Page 43: Gilles Dubuc - Barcelona Facebook developer garage

• Design your architecture with more than one server in mind

• Use the right tools

Page 44: Gilles Dubuc - Barcelona Facebook developer garage

• Design your architecture with more than one server in mind

• Use the right tools

• Know these tools like the back of your hand

Page 45: Gilles Dubuc - Barcelona Facebook developer garage

• Design your architecture with more than one server in mind

• Use the right tools

• Know these tools like the back of your hand

• Caching is your swiss army knife

Page 46: Gilles Dubuc - Barcelona Facebook developer garage

an application’s karma

Page 47: Gilles Dubuc - Barcelona Facebook developer garage

an application’s karmabalancing between quality and “viral” growth

Page 48: Gilles Dubuc - Barcelona Facebook developer garage

source: adonomics.com

(daily active users)

(daily active users)

Page 49: Gilles Dubuc - Barcelona Facebook developer garage

Viral growth debunked

source: adonomics.com

(daily active users)

(daily active users)

Page 50: Gilles Dubuc - Barcelona Facebook developer garage

Viral growth debunked

source: adonomics.com

(daily active users on “mobile” application)

Page 51: Gilles Dubuc - Barcelona Facebook developer garage

Aiming at growth vs aiming at quality

source: adonomics.com

Page 52: Gilles Dubuc - Barcelona Facebook developer garage

Where to stand?

--------------------------------------------------Fear Love

Page 53: Gilles Dubuc - Barcelona Facebook developer garage

Where to stand?

--------------------------------------------------Quickgrowth

Qualityproduct

Page 54: Gilles Dubuc - Barcelona Facebook developer garage