Application development: Give it a REST

In the era of “doing more with less,” you may need to implement manufacturing applications that consist of a database and a set of user interface screens and reports. A software architecture style for these environments is highly recommended and widely used. It is called REST, short for Representational State Transfer, and describes a collection of network architecture principles for building scaleable and robust distributed applications.

02/01/2009


In the era of “doing more with less,” you may need to implement manufacturing applications that consist of a database and a set of user interface screens and reports. There is a software architecture style for these environments that is both highly recommended and widely used. It is called REST, short for Representational State Transfer, and describes a collection of network architecture principles for building scaleable and robust distributed applications.

REST is an alternative to the older Remote Procedure Call (RPC) model for distributed applications. It is also an alternative to the SOAP (Simple Object Access Protocol) model when a lightweight and easy to maintain interface can be used. The REST model was defined in the 2000 doctoral dissertation of Roy Fielding ( www.ics.uci.edu/~fielding/pubs/dissertation/top.htm ), one of the principle authors of the HTTP specification, and has become the common model used for new Web based applications.

Powerful applications fast

The REST model lets you rapidly build powerful applications. It is taught in modern college programming classes where a typical one-week project may be the re-creation of a FaceBook or Amazon-like application using a MySQL database and a CGI (Common Gateway Interface) compatible scripting language. The simplicity of the model makes it a good choice for lightweight manufacturing applications, such as equipment and personnel tracking, maintenance logs, time and material use logs, order tracking, and test results tracking.

The REST model is based on the concept of uniquely identifiable resources, usually identified through a URI. For example, a URI in a manufacturing application may identify a specific piece of equipment like this: example.com/equipment/ProductionLine12/WidgetCounter.php . There is also a uniform interface for operations on the resource and a standard method for exchanging information associated with the operations. The most commonly implemented operations are the HTTP POST and GET methods. HTML links provide a GET method; HTML forms provide the GET and POST methods, allowing the user interface to be based on standard Web browsers. Specific commands to the resource are passed as arguments on the URI using standard HTTP syntax.

This method of communications means that intermediate proxies, caches, gateways or firewalls are not visible to either the Web browser or the application, significantly simplifying the application code. The application code resides on the Web server and is not visible to the client, so it is relatively secure and requires no client-side software installation.

The preferred application language is a CGI compatible Web-centric scripting language, such as PHP ( www.php.net ), Python ( www.python.org ), Perl ( www.perl.org ), or Ruby ( www.ruby-lang.org ). CGI is the standard for interfacing external applications with Web servers so that the application script is run whenever a page request (GET or POST) to the URI is made. All of the scripting languages have built in methods to obtain the arguments from the URI. The scripts then execute the requested function, often using information from an SQL database, and return a new Web page with new information and new links for further commands.

The hardest part of this method is usually the generation of the new Web page, which is why Web-centric scripting languages are used. These languages are designed to quickly parse the URI arguments, access databases, build DOM (Document Object Model) representations, and generate Web pages.

You can solve a wide range of manufacturing application problems without resorting to expensive new hardware and software licenses, at the cost of a small amount of development time. The REST application model, recycled hardware, UBUNTU operating system, MySQL database, and PHP, Python or Perl software provide the low cost and high productivity toolkit for “doing more with less.”


Author Information

Dennis Brandl is president of BR&L Consulting in Cary, NC, dbrandl@brlconsulting.com .




No comments
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2013 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
The true cost of lubrication: Three keys to consider when evaluating oils; Plant Engineering Lubrication Guide; 11 ways to protect bearing assets; Is lubrication part of your KPIs?
Contract maintenance: 5 ways to keep things humming while keeping an eye on costs; Pneumatic systems; Energy monitoring; The sixth 'S' is safety
Transport your data: Supply chain information critical to operational excellence; High-voltage faults; Portable cooling; Safety automation isn't automatic
Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Plant Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.

Maintaining low data center PUE; Using eco mode in UPS systems; Commissioning electrical and power systems; Exploring dc power distribution alternatives
Synchronizing industrial Ethernet networks; Selecting protocol conversion gateways; Integrating HMIs with PLCs and PACs
Why manufacturers need to see energy in a different light: Current approaches to energy management yield quick savings, but leave plant managers searching for ways of improving on those early gains.

Annual Salary Survey

Participate in the 2013 Salary Survey

In a year when manufacturing continued to lead the economic rebound, it makes sense that plant manager bonuses rebounded. Plant Engineering’s annual Salary Survey shows both wages and bonuses rose in 2012 after a retreat the year before.

Average salary across all job titles for plant floor management rose 3.5% to $95,446, and bonus compensation jumped to $15,162, a 4.2% increase from the 2010 level and double the 2011 total, which showed a sharp drop in bonus.

2012 Salary Survey Analysis

2012 Salary Survey Results

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.