Thin Server Architecture

41
Extreme Scale: Thin Server Architecture Mitch Pirtle codeworks new york city 2009

Transcript of Thin Server Architecture

Page 1: Thin Server Architecture

Extreme Scale: Thin Server ArchitectureMitch Pirtle

codeworks new york city 2009

Page 2: Thin Server Architecture

Wha?

As website interactivity demands put a bigger strain on your beautiful code, faster internet connections and more website visitors don't make it any easier. There is a way to dramatically drop the overhead of rendering a page, by asking the browser to do all the work. Learn how to scale your applications to absurd extremes with this simple, ingenious concept.

Page 3: Thin Server Architecture

Before we begin

Coffee?

Breakfast?

Page 4: Thin Server Architecture

How it all started

Page 5: Thin Server Architecture

Data Center

Web server

Data server

Internet

Page 6: Thin Server Architecture

Hey, this thing is taking off

Page 7: Thin Server Architecture

Data Center

Web server

Data server

Internet

Page 8: Thin Server Architecture

Ok, we can handle that

Page 9: Thin Server Architecture

Data Center

Web server

Data server

Internet

Page 10: Thin Server Architecture

See the pattern?

Page 11: Thin Server Architecture

Problems with this approach

Ties computation with display

Significantly increases load

Significantly reduces opportunity to cache

IT DOESN’T SCALE

Page 12: Thin Server Architecture

But wait, there’s more

Most developers suck at design

Most designers suck at code

We just mixed a huge load of markup and code together in a big, amorphous glop

Page 13: Thin Server Architecture

There’s got to be a better way.

Page 14: Thin Server Architecture
Page 15: Thin Server Architecture
Page 16: Thin Server Architecture
Page 17: Thin Server Architecture

Thin Server Architecture

Page 18: Thin Server Architecture

Wha?

Keeps display and logic separate

Pulls unique information separately

Cache is simpler to implement

Cache reused objects separately from dynamic

Page 19: Thin Server Architecture
Page 20: Thin Server Architecture
Page 21: Thin Server Architecture

What it looks like

Page 22: Thin Server Architecture

BrowserPHPPHP

TSA to PHP developers

MV

C

M

CV

Page 23: Thin Server Architecture

Problems solved

Seperates display from computational work

Simplifies cache implementation

Lowers network latency, bandwidth usage

Users perceive fast, snappy response

Opens the door to rich internet applications (RIA)

Page 24: Thin Server Architecture
Page 25: Thin Server Architecture
Page 26: Thin Server Architecture
Page 27: Thin Server Architecture

Great example: Dojo

Page 28: Thin Server Architecture

Dojo Toolkithttp://www.dojotoolkit.org/

Page 29: Thin Server Architecture

TSA is platform agnostic

CODE: You can use Perl, Ruby, Python, PHP, etc.

CLIENT: You can use Dojo, jQuery, MooTools, etc.

DATA: The simpler the better...(next slide, Mitch)

Page 30: Thin Server Architecture

Why develop in an object language, just to stuff mismatched chunks of your objects in a non-object data store?

Page 31: Thin Server Architecture

MongoDBDocument store with speed, scale of key/value and creature comforts of relational systems

Page 32: Thin Server Architecture

What MongoDB can do

Simplifies development

Stores in binary JSON objects

Return data directly to browser in JSON

Store data, binary objects, whatevah!

Page 33: Thin Server Architecture
Page 34: Thin Server Architecture
Page 35: Thin Server Architecture
Page 36: Thin Server Architecture

Time for my favorite gameStump the Nerd™

Page 37: Thin Server Architecture

Great resources

Page 39: Thin Server Architecture

Rich Internet Applications

http://en.wikipedia.org/wiki/Rich_Internet_application

Page 40: Thin Server Architecture

Thanks!http://www.spacemonkeylabs.comhttp://www.mitchitized.com

Page 41: Thin Server Architecture

Photo credits

Bulldog Frances (stock photo by jaimo)

Cat (stock photo by klsa12)

Sleepy zoo lioness (stock photo by Meeshoo)