tek12: php://memory and streams for scaling

25
php://memory and streams for scaling Neal Anders - https://joind.in/6514

Upload: nanderoo

Post on 29-Nov-2014

2.515 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Tek12: php://memory and streams for scaling

php://memory and streams for scaling

Neal Anders - https://joind.in/6514

Page 2: Tek12: php://memory and streams for scaling

wuzzat?

2607:f8b0:4006:801::1012

Page 3: Tek12: php://memory and streams for scaling

whoami

Neal AndersSenior Software Engineer at Infobloxhttp://github.com/nanderoohttp://neal-anders.com@nanderoo

Page 4: Tek12: php://memory and streams for scaling

shameless plug

Infoblox is working on some cool stuff...- DNS, DHCP, IPAM, NCCM- IPv6 Center of Excellence- IF-Map / DNSSec- Hiring (sales, services, support, engineering)

Page 5: Tek12: php://memory and streams for scaling

disclaimer

These thoughts and opinions are my own, and not of my employer, bla bla bla...

Page 6: Tek12: php://memory and streams for scaling

whois $USER

Quick poll:- Designers- Developers- Sys-Admins- Networking- Management- Other...?- Who is hiring? Looking?

Page 7: Tek12: php://memory and streams for scaling

overview

What we will cover:- What are streams?- Examples: memory / temp.- Scaling your app

Page 8: Tek12: php://memory and streams for scaling

inspiration

Page 9: Tek12: php://memory and streams for scaling

say what now?

php://memory  ...and temp... ...what is that? ...how can I use it?  

Page 10: Tek12: php://memory and streams for scaling

what are streams

- The flow of data..- Going in...- Coming out...- stdin, stderr, stdout- php://memory and temp.- Wrappers and php resources 

Page 11: Tek12: php://memory and streams for scaling

what are streams

- Written to, read from..- Seekable or sequential..- Give your app room to breath..- expect, phar, ssh2- Examples:

Page 12: Tek12: php://memory and streams for scaling

examples

Write, Read, Seek....

Page 13: Tek12: php://memory and streams for scaling

examples

Store in memory..

Page 14: Tek12: php://memory and streams for scaling

examples

Store somewhere besides in memory..

Page 15: Tek12: php://memory and streams for scaling

examples

Or until that becomes scarce..

Page 16: Tek12: php://memory and streams for scaling

scaling your app

Doesn't that mean....We need to use X or Y like

[hugely successful overnight start-up]?

Page 17: Tek12: php://memory and streams for scaling

scaling your app

Rethink how data flows..

Page 18: Tek12: php://memory and streams for scaling

scaling your app

Apply elastic charm..

Page 19: Tek12: php://memory and streams for scaling

scaling your app

Instrument ...everything!

Page 20: Tek12: php://memory and streams for scaling

scaling your app

What you know, you don't know..

Page 21: Tek12: php://memory and streams for scaling

scaling your app

Be prepared to change a few flat tires.. 

Page 22: Tek12: php://memory and streams for scaling

scaling your app

Learn from your own mistakes..

Page 23: Tek12: php://memory and streams for scaling

resources

http://php.net/wrappers.phphttp://php.net/function.memory-get-usage.phphttp://baconipsum.com/ 

Page 24: Tek12: php://memory and streams for scaling

feedback

joind.in - https://joind.in/6514email - [email protected] 

Page 25: Tek12: php://memory and streams for scaling

fin

Thank you.