View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
“ Greek columns and their entablatures were at first entirely of timber, with terra-cotta decorations in the upper trabeation, but were converted into stone quite early in the [Hellenic] period, about 600 BC. The translation was quite direct, timber forms being imitated in stonework with remarkable exactness. For this reason, Greek architecture sometimes has been called a ‘carpentry in marble’… Banister Fletcher A History of Architecture
SkeuomorphA skeuomorph is a design feature found on animitation, pastiche or homage that was necessaryonly to the original. Often used for the sake offamiliarity, they are details that have moved fromfunction to form. Tom Petty hipstercheerleaders.com
MetaphorIn cognitive linguistics, conceptual metaphor, orcognitive metaphor, refers to the understandingof one idea, or conceptual domain, in terms ofanother, for example, understanding quantity interms of directionality (e.g. "prices are rising"). Wikipedia.org Conceptual Metaphors
“ The concepts that govern our thought are not just matters of the intellect. They also govern our everyday functioning, down to the most mundane details. Our concepts structure what we perceive, how we get around in the world, and how we relate to other people. Our conceptual system thus plays a central role in defining our everyday realities. If we are right in suggesting that our conceptual system is largely metaphorical, then the way we thinks what we experience, and what we do every day is very much a matter of metaphor. George Lakoff and Mark Johnson Metaphors We Live By
application What should you be caching locally? Security credentials or tokens Last user session data MRU (Most recently used) MFU (Most frequently used) LFC (Least frequently changed) API write operations Graceful fallbacks for failed API calls
application Issues do remain Can’t hit local cache on first use of app Receiving the right shape of data
database What were our old database optimization tricks that we can apply to Internet data?
database Stored Procedures Queueing Denormalization Result Sets
database What is a Stored Procedure in this world? Server-side code that executes complex operations Ones that should happen right next to the data Where you need high compute and low latency Could be written in node.js, ruby, java, python, c#
database Where does a Stored Procedure run in this world?
database Where does a Stored Procedure run in this world? Probably in a cloud
database Once you’ve built this architectural layer you gain a lot of control
database You can deal with queueing, denormalization, and manage result sets properly.
database Queueing enables you to break the request/response pair into separate pieces You may even be able to tell the client when to call you back for the result Making your requests to this queueing layer also lets you serve from a cloud-side cache if you have one
database Denormalization refers to writing multiple indexes in order to optimize query performance Where your app relies on your own data, don’t make it wait for slow queries Remember, in the cloud, storage is cheap and easy to obtain – write data as often as needed to improve query speeds.
database Managing result sets to save bandwidth and response time means limiting cursor size by default This can be complementary to the caches you keep around, since a massive API result is cheap to manage in the cloud and can be trickled back to the app in bite-size chunks.
database Managing result sets to save processor time for the client is an option as well. What would happen if you could focus on app-shaped data?