Editorials

Open Wide for Chunky

I’ve been reading about using chunky calls for REST based applications. This technique has been around for quite a while, and is growing in popularity. Chunky applications often implement MVC in the browser, using libraries based on Java Script. This kind of application allows you to scale, by taking advantage of the client computer browser to performa lot of heavy lifting.

In this scenario, instead of making many calls to the persistence layer, the application returns large amounts of data, known as chunky, and interacts with the large set in memory. The data resides in the client in the form of JSON, which is hosted in the HTML DOM, and accessible through Java Script for binding to controls where the data is presented or maintained.

Even though large amounts of data are retrieved to get things going, it doesn’t mean you have to submit the whole thing back for Inserts, Updates or Deletions. As objects are modified in the DOM they can be submitted back to the Persistence layer, usually through a REST call, and the level of granularity necessary based on what modifications were made.

In a system with few users, or little overlap of work, chunky can really improve application performance by reducing the number of round trips to your REST service. With chunky you have one hit to get things initialized. After that you have small REST calls for CRUD transactions, at a much smaller level.

Have you used Chunky calls? Are there situations where you find they perform well, or where it is a really bad fit? Share your experience in our comments or by email to btaylor@sswug.org.

Cheers,

Ben