Representational state transfer

From WikiMD's Wellness Encyclopedia

Representational State Transfer (REST) is an architectural style that defines a set of constraints to be used for creating Web services. RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources using a uniform and predefined set of stateless operations. Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.

Principles[edit | edit source]

The underlying principles of REST involve the use of resources identified by their Uniform Resource Identifiers (URIs). These principles are outlined as follows:

  • Resource Identification: In REST, every important concept or entity is considered a resource, which can be accessed using a unique URI.
  • Uniform Interface: REST dictates that resources should be manipulated using a specific set of operations, which are typically HTTP methods such as GET, POST, PUT, DELETE, and PATCH.
  • Statelessness: Each request from a client to a server must contain all the information the server needs to fulfill the request. The server does not store any session information about the client.
  • Cacheability: Responses must explicitly state whether they are cacheable or not, which helps improve network efficiency and client responsiveness.
  • Layered System: A client cannot ordinarily tell whether it is connected directly to the end server or to an intermediary along the way.

Advantages[edit | edit source]

RESTful Web services offer several advantages over more complex services such as SOAP:

  • Simplicity: Using HTTP for what it's designed for (CRUD operations: Create, Read, Update, Delete) makes REST simpler to use.
  • Scalability: Stateless interactions improve scalability and independence among various components of the system.
  • Performance: REST can use caching of resources to improve performance by reducing the need to interact with the server.
  • Portability: By separating the UI from the data storage, REST allows for easier deployment of applications across various platforms.

Disadvantages[edit | edit source]

Despite its advantages, REST also has some limitations:

  • Security: RESTful services are inherently less secure than SOAP, as they use standard HTTP without additional protocols such as WS-Security.
  • Statelessness: While statelessness improves scalability, it can also increase the complexity of performing certain operations that require maintaining state.

Use Cases[edit | edit source]

REST is well-suited for basic CRUD operations on resources. It is commonly used for building public HTTP APIs, where simplicity and performance are key considerations. Examples include APIs for web applications, mobile applications, and IoT (Internet of Things) devices.

See Also[edit | edit source]

WikiMD
Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD

Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD

WikiMD's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Prab R. Tumpati, MD