{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,1,21]],"date-time":"2026-01-21T13:50:18Z","timestamp":1769003418524,"version":"3.49.0"},"reference-count":36,"publisher":"MDPI AG","issue":"5","license":[{"start":{"date-parts":[[2022,4,27]],"date-time":"2022-04-27T00:00:00Z","timestamp":1651017600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Business Finland","award":["3508\/31\/2019 and ITEA 3 Call 5 MACHINAIDE"],"award-info":[{"award-number":["3508\/31\/2019 and ITEA 3 Call 5 MACHINAIDE"]}]},{"name":"Business Finland","award":["ITEA 3 Call 5 MACHINAIDE"],"award-info":[{"award-number":["ITEA 3 Call 5 MACHINAIDE"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Computers"],"abstract":"<jats:p>Industry 4.0 and Cyber-physical systems require easy access to shop-floor data, which allows the monitoring and optimization of the manufacturing process. To achieve this, several papers have proposed various ways to make OPC UA (Open Platform Communications Unified Architecture), a standard protocol for industrial communication, RESTful (Representational State Transfer). As an alternative to REST, GraphQL has recently gained popularity amongst web developers. This paper compares the characteristics of the REST and GraphQL interfaces for OPC UA and conducts measurements on reading and writing data. The measurements show that GraphQL offers better performance than REST when multiple values are read or written, whereas REST is faster with single values. However, using OPC UA directly outperforms both REST and GraphQL interfaces. As a conclusion, this paper recommends using a GraphQL interface alongside an OPC UA server in smart factories to simultaneously yield easy data access, the best performance, and maximum interoperability.<\/jats:p>","DOI":"10.3390\/computers11050065","type":"journal-article","created":{"date-parts":[[2022,4,27]],"date-time":"2022-04-27T13:40:57Z","timestamp":1651066857000},"page":"65","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":8,"title":["Comparison of REST and GraphQL Interfaces for OPC UA"],"prefix":"10.3390","volume":"11","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-3246-8199","authenticated-orcid":false,"given":"Riku","family":"Ala-Laurinaho","sequence":"first","affiliation":[{"name":"Department of Mechanical Engineering, Aalto University, 02150 Espoo, Finland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8319-1903","authenticated-orcid":false,"given":"Joel","family":"Mattila","sequence":"additional","affiliation":[{"name":"Department of Mechanical Engineering, Aalto University, 02150 Espoo, Finland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3714-748X","authenticated-orcid":false,"given":"Juuso","family":"Autiosalo","sequence":"additional","affiliation":[{"name":"Department of Mechanical Engineering, Aalto University, 02150 Espoo, Finland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-2014-9393","authenticated-orcid":false,"given":"Jani","family":"Hietala","sequence":"additional","affiliation":[{"name":"VTT Technical Research Centre of Finland Ltd., 02044 Espoo, Finland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-4294-3499","authenticated-orcid":false,"given":"Heikki","family":"Laaki","sequence":"additional","affiliation":[{"name":"Department of Mechanical Engineering, Aalto University, 02150 Espoo, Finland"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9376-2386","authenticated-orcid":false,"given":"Kari","family":"Tammi","sequence":"additional","affiliation":[{"name":"Department of Mechanical Engineering, Aalto University, 02150 Espoo, Finland"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2022,4,27]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"45","DOI":"10.1016\/j.csi.2018.04.004","article-title":"Integrating OPC UA with web technologies to enhance interoperability","volume":"61","author":"Cavalieri","year":"2019","journal-title":"Comput. Standards Interfaces"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"1832","DOI":"10.1109\/TII.2016.2530404","article-title":"RESTful Industrial Communication With OPC UA","volume":"12","author":"Gruner","year":"2016","journal-title":"IEEE Trans. Ind. Inform."},{"key":"ref_3","unstructured":"OPC Foundation (2017). OPC Unified Architecture Specification Part 1: Overview and Concepts Release 1.04, OPC UA Foundation. Available online: https:\/\/reference.opcfoundation.org\/v104\/Core\/docs\/Part1\/."},{"key":"ref_4","doi-asserted-by":"crossref","unstructured":"Tu, X., Autiosalo, J., Jadid, A., Tammi, K., and Klinker, G. (2021). A Mixed Reality Interface for a Digital Twin Based Crane. Appl. Sci., 11.","DOI":"10.3390\/app11209480"},{"key":"ref_5","unstructured":"Paronen, T. (2015). A Web-Based Monitoring System for the Industrial Internet. [Master\u2019s Thesis, Aalto University]."},{"key":"ref_6","doi-asserted-by":"crossref","unstructured":"Schiekofer, R., Scholz, A., and Weyrich, M. (2018, January 4\u20137). REST based OPC UA for the IIoT. Proceedings of the 2018 IEEE 23rd International Conference on Emerging Technologies and Factory Automation (ETFA), Turin, Italy.","DOI":"10.1109\/ETFA.2018.8502516"},{"key":"ref_7","unstructured":"Hietala, J. (2020). Real-Time Two-Way Data Transfer with a Digital Twin via Web Interface. [Master\u2019s Thesis, School of Engineering, Aalto University]."},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Hietala, J., Ala-Laurinaho, R., Autiosalo, J., and Laaki, H. (2020, January 10\u201312). GraphQL Interface for OPC UA. Proceedings of the 2020 IEEE Conference on Industrial Cyberphysical Systems (ICPS), Tampere, Finland.","DOI":"10.1109\/ICPS48405.2020.9274754"},{"key":"ref_9","unstructured":"OPC Foundation (2022, March 11). Unified Architecture. Available online: https:\/\/opcfoundation.org\/about\/opc-technologies\/opc-ua."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Imtiaz, J., and Jasperneite, J. (2013, January 29\u201331). Scalability of OPC-UA down to the chip level enables \u201cInternet of Things\u201d. Proceedings of the 2013 11th IEEE International Conference on Industrial Informatics (INDIN), Bochum, Germany.","DOI":"10.1109\/INDIN.2013.6622935"},{"key":"ref_11","unstructured":"OPC Foundation (2017). OPC Unified Architecture Part 5: Information Model, Release 1.04, OPC UA Foundation. Available online: https:\/\/reference.opcfoundation.org\/v104\/Core\/docs\/Part5\/."},{"key":"ref_12","unstructured":"Fielding, R.T. (2000). Architectural Styles and the Design of Network-Based Software Architectures. [Ph.D. Thesis, University of California]."},{"key":"ref_13","doi-asserted-by":"crossref","unstructured":"Bozzon, A., Cudre-Maroux, P., and Pautasso, C. (2016). REST APIs: A Large-Scale Analysis of Compliance with Principles and Best Practices. Web Engineering, Springer International Publishing.","DOI":"10.1007\/978-3-319-38791-8"},{"key":"ref_14","unstructured":"Microsoft (2022, March 11). Web API Design. Available online: https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/best-practices\/api-design."},{"key":"ref_15","unstructured":"Webber, J., Parastatidis, S., and Robinson, I. (2010). REST in Practice: Hypermedia and Systems Architecture, O\u2019Reilly Media, Inc."},{"key":"ref_16","unstructured":"OPC Foundation (2017). OPC Unified Architecture Part 4: Services, Release 1.04, OPC UA Foundation. Available online: https:\/\/reference.opcfoundation.org\/v104\/Core\/docs\/Part4\/."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Schiekofer, R., and Weyrich, M. (2019, January 10\u201313). Introduction of Group-Subscriptions for RESTful OPC UA clients in IIoT environments. Proceedings of the 2019 24th IEEE International Conference on Emerging Technologies and Factory Automation (ETFA), Zaragoza, Spain.","DOI":"10.1109\/ETFA.2019.8869282"},{"key":"ref_18","unstructured":"Cavalieri, S., Salafia, M., and Scroppo, M. (2022, April 14). OPC UA Web Platform. Available online: https:\/\/github.com\/OPCUAUniCT\/OPCUAWebPlatformUniCT."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Derhamy, H., Ronnholm, J., Delsing, J., Eliasson, J., and van Deventer, J. (2017, January 24\u201326). Protocol interoperability of OPC UA in service oriented architectures. Proceedings of the 2017 IEEE 15th International Conference on Industrial Informatics (INDIN), Emden, Germany.","DOI":"10.1109\/INDIN.2017.8104744"},{"key":"ref_20","unstructured":"GraphQL Foundation (2022, March 11). Introduction to GraphQL. Available online: https:\/\/graphql.org\/learn\/."},{"key":"ref_21","unstructured":"Lee, B. (2022, March 11). GraphQL: A Data Query Language. Available online: https:\/\/engineering.fb.com\/2015\/09\/14\/core-data\/graphql-a-data-query-language\/."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Brito, G., and Valente, M.T. (2020, January 16\u201320). REST vs GraphQL: A Controlled Experiment. Proceedings of the 2020 IEEE International Conference on Software Architecture (ICSA), Salvador, Brazil.","DOI":"10.1109\/ICSA47634.2020.00016"},{"key":"ref_23","unstructured":"Porcello, E., and Banks, A. (2018). Learning GraphQL: Decalarative Data Fetching for Modern Web Apps, O\u2019Reilly Media, Inc."},{"key":"ref_24","first-page":"283","article-title":"Experiences on Migrating RESTful Web Services to GraphQL","volume":"Volume 10797","author":"Vogel","year":"2018","journal-title":"Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)"},{"key":"ref_25","first-page":"65","article-title":"Generating GraphQL-Wrappers for REST(-like) APIs","volume":"Volume 10845","author":"Mikkonen","year":"2018","journal-title":"Web Engineering. ICWE 2018. Lecture Notes in Computer Science"},{"key":"ref_26","unstructured":"GraphQL Contributors (2022, March 13). GraphQL Specification October 2021. Available online: http:\/\/spec.graphql.org\/October2021\/."},{"key":"ref_27","unstructured":"Hietala, J., Autiosalo, J., Ala-Laurinaho, R., and Laaki, H. (2022, April 14). GraphQL API for OPC UA Servers. Available online: https:\/\/github.com\/AaltoIIC\/OPC-UA-GraphQL-Wrapper."},{"key":"ref_28","unstructured":"Bradshaw, G. (2022, April 14). GraphQL schema for OPC UA. Available online: https:\/\/github.com\/gilesbradshaw\/uaQL."},{"key":"ref_29","unstructured":"Vogler, A. (2022, April 14). Frankenstein Automation Gateway. Available online: https:\/\/github.com\/vogler75\/automation-gateway."},{"key":"ref_30","doi-asserted-by":"crossref","unstructured":"Naik, N. (2017, January 11\u201313). Choice of effective messaging protocols for IoT systems: MQTT, CoAP, AMQP and HTTP. Proceedings of the 2017 IEEE International Systems Engineering Symposium (ISSE), Vienna, Austria.","DOI":"10.1109\/SysEng.2017.8088251"},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Loreto, S., Ericsson, Saint-Andre, P., Cisco, Salsano, S., University of Rome \u201cTor Vergata\u201d, Wilkins, G., and Webtide (2022, March 13). Known Issues and Best Practices for the Use of Long Polling and Streaming in Bidirectional HTTP. Internet Engineering Task Force Request Comments, 2011. RFC 6202, Available online: https:\/\/www.rfc-editor.org\/rfc\/rfc6202.","DOI":"10.17487\/rfc6202"},{"key":"ref_32","unstructured":"GraphQL Foundation (2022, March 11). Caching. Available online: https:\/\/graphql.org\/learn\/caching\/."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"286","DOI":"10.1007\/978-3-030-42517-3_22","article-title":"Comparative Analysis Between Standards Oriented to Web Services: SOAP, REST and GRAPHQL","volume":"Volume 1193","author":"Solano","year":"2020","journal-title":"Communications in Computer and Information Science"},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Brito, G., Mombach, T., and Valente, M.T. (2019, January 24\u201327). Migrating to GraphQL: A Practical Assessment. Proceedings of the 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER), Hangzhou, China.","DOI":"10.1109\/SANER.2019.8667986"},{"key":"ref_35","unstructured":"Amundsen, M. (2022, March 11). Roy Fielding on Versioning, Hypermedia, and REST. Available online: https:\/\/www.infoq.com\/articles\/roy-fielding-on-versioning\/."},{"key":"ref_36","unstructured":"FreeOpcUA (2022, April 14). FreeOpcUa Library. Available online: https:\/\/github.com\/FreeOpcUa\/python-opcua."}],"container-title":["Computers"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2073-431X\/11\/5\/65\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T23:01:50Z","timestamp":1760137310000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2073-431X\/11\/5\/65"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,4,27]]},"references-count":36,"journal-issue":{"issue":"5","published-online":{"date-parts":[[2022,5]]}},"alternative-id":["computers11050065"],"URL":"https:\/\/doi.org\/10.3390\/computers11050065","relation":{},"ISSN":["2073-431X"],"issn-type":[{"value":"2073-431X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,4,27]]}}}