Five RESTful Friends
Dan McCreary, O'Reilly Technical
Resource orientation asks the web application developer to think about
creating consistent and precise URLs (URIs) for things that you want
to manage. If you manage customers, invoices, purchase orders or products,
think about how you identify these items and the data they contain.
After you do this you will find that you have some new friends to help
your web application fly. (1) Your first friend is the resource your
local computer's local memory or RAM. Local memory is very fast and you
can usually transform resources in memory to the screen in fractions of
a millisecond... (2) Your second friend is your local hard drive or what
is known as your web browser cache. Although the local cache is much,
much slower then your local hard drive (by about three orders of
magnitude) it still is a great resource to put your data items into...
(3) Your third friend is your regional web cache, or corporate cache.
If you manage IT within your organization you may know that a corporate
proxy cache dramatically reduces your Internet bandwidth needs and
improves response times for your users by caching and reusing frequently-
requested web resource including static pages, images and XML resources...
(4) A fourth friend is the web cache in your own web application server
cluster. Web application servers frequently are not a single web server
but cluster of multiple web servers that have a load-balancing device
in front of it.. (5) And lastly, consider that databases servers
themselves also may have a cache of information that they hold before
they decide to do additional work. Many new databases have an innovative
column store structure that pre-calculate sums and averages for you...
if you design your URIs correctly your five friends will be standing by
to help. This is one reason why the XRX web application architectures
are becoming so popular. They try to leverage the infrastructure of the
web and they don't try to short-circuit a system that is already in
place to help you. Before you bother your database server to do a huge
number of SELECTs with joins on dozens of tables, considering asking
your five friends for some help. You might just find your web application
runs a little faster. And remember that native XML databases like
MarkLogic are usually inherently faster then RDBMS systems since they
may already store the information in the appropriate hierarchical
structures.
http://broadcast.oreilly.com/ 2008/11/five-restful-friends. html
Dan McCreary, O'Reilly Technical
Resource orientation asks the web application developer to think about
creating consistent and precise URLs (URIs) for things that you want
to manage. If you manage customers, invoices, purchase orders or products,
think about how you identify these items and the data they contain.
After you do this you will find that you have some new friends to help
your web application fly. (1) Your first friend is the resource your
local computer's local memory or RAM. Local memory is very fast and you
can usually transform resources in memory to the screen in fractions of
a millisecond... (2) Your second friend is your local hard drive or what
is known as your web browser cache. Although the local cache is much,
much slower then your local hard drive (by about three orders of
magnitude) it still is a great resource to put your data items into...
(3) Your third friend is your regional web cache, or corporate cache.
If you manage IT within your organization you may know that a corporate
proxy cache dramatically reduces your Internet bandwidth needs and
improves response times for your users by caching and reusing frequently-
requested web resource including static pages, images and XML resources...
(4) A fourth friend is the web cache in your own web application server
cluster. Web application servers frequently are not a single web server
but cluster of multiple web servers that have a load-balancing device
in front of it.. (5) And lastly, consider that databases servers
themselves also may have a cache of information that they hold before
they decide to do additional work. Many new databases have an innovative
column store structure that pre-calculate sums and averages for you...
if you design your URIs correctly your five friends will be standing by
to help. This is one reason why the XRX web application architectures
are becoming so popular. They try to leverage the infrastructure of the
web and they don't try to short-circuit a system that is already in
place to help you. Before you bother your database server to do a huge
number of SELECTs with joins on dozens of tables, considering asking
your five friends for some help. You might just find your web application
runs a little faster. And remember that native XML databases like
MarkLogic are usually inherently faster then RDBMS systems since they
may already store the information in the appropriate hierarchical
structures.
http://broadcast.oreilly.com/
No hay comentarios:
Publicar un comentario