/qewd-conduit

QEWD Implementation of the RealWorld Conduit REST Back-end

Primary LanguageJavaScript

QEWD Example App

Example QEWD Back-end codebase that adheres to the RealWorld spec and API.

This repo is functionality complete - PR's and issues welcome!


Rob Tweed rtweed@mgateway.com
25 January 2017, M/Gateway Developments Ltd http://www.mgateway.com

Updated: 1 October 2020

Twitter: @rtweed

Google Group for discussions, support, advice etc: http://groups.google.co.uk/group/enterprise-web-developer-community


About qewd-conduit

qewd-conduit is a full implementation of the REST back-end for the RealWorld Conduit application using QEWD.

qewd-conduit requires QEWD to be installed on your server. QEWD itself is a Node.js-based Web Application & REST run-time platform.

The QEWD installation and configuration process is very quick and almost completely automated. You'll find that you can install qewd-conduit and have it fully up and running in literally just a few minutes, so there are really no reasons not to try it out!

qewd-conduit can work with a number of so-called Global Storage databases, including:

QEWD applies an abstraction known as QEWD-JSdb to these databases, which makes them behave as a Document Database and Persistent JavaScript Objects

Read my article that explains the rationale and objectives of QEWD.

Since the back-end specification of the RealWorld Conduit application is fully documented and implemented using several other technologies and/or frameworks, it provides a great way of comparing and contrasting the different development approaches used for each option.

Although QEWD is a Node.js-based platform, you'll see that the way in which the back-end has been able to be developed is quite different from what you'd expect. Whilst it's all been written in JavaScript, there's no asynchronous logic, even for the database manipulation. That's possible due to QEWD's master process / queue / worker process-pool architecture.

The RealWorld Conduit initiative also allows direct comparisons to be made in terms of back-end performance. I think you'll be favourably impressed by the performance of qewd-conduit which is largely down to the lightning-fast performance of the underlying database (IRIS or Caché) and the in-process Node.js database interface used by QEWD.

What may be less easy to appreciate is the speed of development when using the different RealWorld Conduit back-end technologies. I can tell you that, in the case of qewd-conduit, the entire back-end was implemented from scratch in just 2 man-days, including the time taken to read up on and understand the application's objectives, requirements and APIs. Part of the speed of development comes from not having to worry about asynchronous logic, but it's also due to the very high-level database abstraction of QEWD-JSdb.

WebSocket Support

Uniquely amongst RealWorld Conduit back-end implementations, qewd-conduit not only implements the full suite of Conduit REST APIs, but also provides equivalent APIs that are accessed via WebSockets.

These make use of QEWD's built-in WebSocket support, and require specially-adapted versions of the RealWorld front-ends that use the QEWD-Client to communicate securely via WebSockets with the qewd-conduit back-end.

Ward De Backer has created a suitably-adapted version of the Vue.js RealWorld front-end application that you can use to try out the qewd-conduit WebSocket interfaces. For instructions, see later in this document.

Installing and Running the qewd-conduit Back-end

See the instructions for the following platforms:

Installing and Running the RealWorld Front-End

qewd-conduit implements the RealWorld REST API specification, so you can install and use any of the authorized client interfaces, the details and instructions for which can be seen here.

Just ensure you configure your chosen front-end to send its REST requests to the endpoints provided by your installed QEWD Conduit back-end.

As an example, Ward De Backer has provided:

His documentation also explains how to use his specially-adapted WebSocket-enabled version of this same Vue.js client. You'll then be able to compare and contrast the relative performance of the REST and WebSocket interfaces for the same set of APIs (which, within qewd-conduit, as you might expect, invoke the exact same underlying API handler logic modules).

Inspecting the qewd-conduit Database

qewd-conduit stores and maintains the Conduit data in three Globals:

  • conduitUsers
  • conduitArticles
  • conduitComments

You can use any of the utilities provided by IRIS or Caché to inspect these Globals.

You can also use the qewd-monitor or qewd-monitor-adminui applications to inspect them. In particular, check out the qewd-monitor-adminui QEWD JSdb Inspector option which provides a graphical representation of the hierarchy tree of each Global through which you can navigate.

License

Copyright (c) 2017-20 M/Gateway Developments Ltd,
Redhill, Surrey UK.
All rights reserved.

http://www.mgateway.com
Email: rtweed@mgateway.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0                           

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
limitations under the License.