Representational state transfer (computing)

Representational state transfer, or REST, is a type of computer system design, or architecture, that facilitates communication over the Internet. REST is a software-based system that applies a set of standards for how information and communications are identified and addressed. This allows information and requests for information passed over the Internet to go to a specific location. There are other formats used for programming websites, such as SOAP (Simple Object Access Protocol), JMS (Java Message Service), and XML-RPC (a Remote Procedure Protocol that uses Extensive Markup Language). However, the high degree to which REST and REST-style systems correspond with Internet design makes them very easy to use and more popular for Internet applications.

rssalemscience-20160829-185-144072.jpg

Background

In 2000, American computer scientist Roy Fielding first described the REST concept as part of his doctoral dissertation. Fielding taught himself computer languages to qualify for his first job out of high school and learned several more in the summer before he started college. He came into the field in the transitional time when computers went from being large mainframes programmed with punch cards to being interconnected through the World Wide Web.

Through projects for class assignments and his own growing interest in computer programming, Fielding became involved in the project to edit and refine the Hypertext Transfer Protocol (HTTP) that is used for communication on the Internet. He helped to standardize the syntax, or format, used by computer languages accessing the Internet. Fielding was also involved in several other initiatives to improve how the Internet functioned.

In 2000, Fielding put his experience to use in writing his doctoral dissertation, "Architectural Styles and the Design of Network-Based Software Architectures." In it, he described the REST concept for standardizing the design of websites to make them function as smoothly as possible with the Internet. Fielding did not invent a system so much as he described and categorized a style for creating computer software so that it would have the characteristics it needed to interact with the Internet in the best possible way.

Just as architectural styles for buildings have certain characteristics that define and identify them as colonial or art deco, computer architecture includes guidelines and formats that define the type of program that will be created. Fielding identified and described the characteristics of software architecture that would most readily identify software as "Internet-friendly." These characteristics have come to be known as representational state transfer—REST.

Overview

In 1993, when Fielding first started working on the World Wide Web, there were somewhere between fifty and one hundred websites. By 1994, that number had climbed to close to three thousand. During the summer of 1999, just before Fielding wrote his dissertation, Google, the large Internet search engine that helps users find the information they seek, handled more than three million search requests a day. A year later, that number had grown to eighteen million daily searches. By 2024, the number of sites had grown to 1.1 billion. However, only about 400 million of these websites were active. With so many sites being developed, designers needed a way to determine how to build a program that would work well on the Internet.

Fielding's REST concept provided this. A programmer using the principles of REST to design software would automatically find it compatible with the architecture of the Internet. The REST principles set up a program to send and receive the minimum amount of data needed to make a request of a website while using request terms that are easily understood and handled by the website even when it is processed by computers of different memory capacities and over Internet connections with different speeds.

There are six main constraints, or rules, applied in using a REST architecture. Programs will have a uniform interface that is compatible between the program and the other servers with which it will interact. It is also stateless, which means that all of the information needed by the server to fulfill any request sent through the program must be in the request. Another principle is that the program be cacheable. Computer systems store requests—a procedure known as caching—to enable future requests to be answered more quickly. This is why suggested search possibilities pop up when a request is typed into a search engine. Software using REST architecture will specify whether it can be cached or not. The program should also maintain client-server separation, meaning that the only information shared is what is related to the request being transmitted. REST also uses a layered system; this allows for multiple levels of servers to process requests, improving the security of the system without any perceived difference to the person making the request. A system may also incorporate another characteristic called code on demand, which transfers some of the processing of a request to the sending client. For example, when a client accesses a website and fills out a form, a program using code on demand may automatically notify the client that some information, such as a date of birth, is not in the proper format. This is an example of code on demand being in place in the software.

Other advantages of REST include the ease with which the principles can be applied, making it simple for developers to create software that works on a majority of web platforms, including free or low-cost platforms. The ease with which they can be applied provides cost savings as well. In addition, the protocols used in REST send small messages, which leads to fast message responses and saves both time and money.

As a result, developers often use REST principles when designing websites to be accessible from the growing number of mobile devices, such as tablets and cell phones. It also makes it useful for social media sites and "mash-up" programs that allow a user to take data from two sources—such as a photo and an animated background—and combine them into a new data source. They are also particularly useful for automated business processes, where one activity triggers an entire chain of events. For example, a customer may place an online order, which starts a chain that includes debiting the customer's credit card or other payment method, sending the order to a warehouse for processing, adjusting inventory, and sending a confirmation email to the customer. REST allows programs to be simple, reliable, and modifiable.

Bibliography

Amundsen, Mike. "Roy Fielding on Versioning, Hypermedia, and REST." InfoQ, 17 Dec. 2014, www.infoq.com/articles/roy-fielding-on-versioning. Accessed 30 Jan. 2017.

Fielding, Roy Thomas. "Architectural Styles and the Design of Network-Based Software Architectures." University of California, Irvine,2000, www.ics.uci.edu/~fielding/pubs/dissertation/top.htm. Accessed 30 Jan. 2017.

George, Ann. "REST—Representational State Transfer." University of Texas, Dallas,11 July 2005, www.utdallas.edu/~chung/SA/term-paper-SU05/George‗Ann‗REST.ppt. Accessed 30 Jan. 2017.

Jones, M. Tim. "Understand Representational State Transfer (REST) in Ruby." IBM Developer Works, 17 Aug. 2012, www.ibm.com/developerworks/library/os-understand-rest-ruby/. Accessed 30 Jan. 2017.

LaFrance, Adrienne. "How Many Websites Are There?" The Atlantic, 30 Sept. 2015, www.theatlantic.com/technology/archive/2015/09/how-many-websites-are-there/408151/. Accessed 30 Jan. 2017.

Lawi, Armin, Benny L.E. Panggabean, and Takaichi Yoshida. "Evaluating GraphQL and REST API Services Performance in a Massive and Intensive Accessible Information System." Computers, vol. 10, no. 11, p. 138, 27 Oct. 2021, doi.org/10.3390/computers10110138. Accessed 4 Nov. 2022.

Morris, Richard. "Roy Fielding: Geek of the Week." Simple Talk, 2 Aug. 2010, www.simple-talk.com/opinion/geek-of-the-week/roy-fielding-geek-of-the-week/. Accessed 30 Jan. 2017.

Plesky, Elvis. "REST--All You Have to Know About Representational State Transfer." Plesk, 14 Apr. 2020, www.plesk.com/blog/various/rest-representational-state-transfer/. Accessed 4 Nov. 2024.

"Representational State Transfer (REST)." Service Architecture,www.service-architecture.com/articles/web-services/representational‗state‗transfer‗rest.html. Accessed 30 Jan. 2017.