QEWD-Conduit: A Great Demonstration of QEWD in Action

98 views
Skip to first unread message

rtweed

unread,
Oct 28, 2020, 11:24:32 AM10/28/20
to Enterprise Web Developer Community
A few weeks ago I put out an IRIS/Windows-only version of the QEWD-Conduit application, specifically for the InterSystems Full-stack competition.  This implements the full set of so-called RealWorld Conduit REST APIs which have been also implemented in a host of other different technologies, so it's a great way to compare and contrast different technologies doing the exact same job.  For more info on RealWorld Conduit, see:

https://github.com/gothinkster/realworld

With the competition now out of the way, I've extended the QEWD-Conduit repository to include the following additional platforms/options:

- Dockerised QEWD Container (available for Linux and Raspberry Pi).
- Non-Dockerised QEWD installation with YottaDB and Node.js on Linux or Raspberry Pi
- Non-Dockerised QEWD installation with IRIS and Node.js on Linux or OSX

Note that the Dockerised QEWD Container comes pre-installed with YottaDB

All the QEWD installations including the Dockerised version use the super-fast mg-dbx interface between Node.js and IRIS/Cache/YottaDB, and the exact same JavaScript code is used regardless of the database you use.

As an added bonus, the repository also includes a pre-installed, pre-configured copy of the wc-conduit ReaWorld front-end, which is built using our WebComponents-based framework known as mg-webComponents.  wc-conduit looks and runs identically to all the other available RealWorld front-ends, but I think you'll find that it's very lightweight and fast by comparison, and doesn't need any tiresome messing about with build chains and WebPack bundling etc.  If you want to see how mg-webComponents can be used to build the front-end for an application, take a look at the source code that is all included in the repository.

Of course you can use any other RealWorld front-end for your QEWD-Conduit back-end if you wish.

So check out qewd-conduit - regardless of the platform option you choose, you'll have it up and running in just a few minutes, so there's really no excuse not to try it out!



rtweed

unread,
Oct 28, 2020, 11:27:06 AM10/28/20
to Enterprise Web Developer Community
Forgot to add the link to the qewd-conduit repository!

Arthur Ingram

unread,
Oct 28, 2020, 2:44:02 PM10/28/20
to Enterprise Web Developer Community
As always Thank you Rob for this great work 

rtweed

unread,
Oct 29, 2020, 6:39:29 AM10/29/20
to Enterprise Web Developer Community
 Further news: I've now modified the wc-conduit RealWorld Client to optionally use the alternative WebSocket API interfaces supported by the qewd-conduit back-end.  The copy of the wc-conduit front-end that I've integrated into the qewd-conduit repository has been updated to this new version, and I've updated the documentation to explain how to use the WebSocket version if you want to try it out.  It's very simple - just load a different URL to launch the wc-conduit front-end and it will automatically do the rest (no pun intended!).

  http:xx.xx.xx.xx:8080/conduit-wc  (REST)
  http:xx.xx.xx.xx:8080/conduit-wc/index-ws.html  (WebSockets)

See if you notice any performance difference between the WebSocket and REST APIs.  The back-end literally runs the same handler code regardless of the interface you choose, and the front-end WebComponents operate identically, so any difference in performance you see is network overheads of HTTP versus WebSockets, and the back-end interface overheads of HTTP (handled by the Node.js Express module) versus WebSockets (handled by the Node.js socket.io module).

Enjoy!

Rob 

Arthur Ingram

unread,
Nov 3, 2020, 8:13:39 AM11/3/20
to Enterprise Web Developer Community
Hello Rob,


I have Conduit running using .start_p .... when docker is shut down and restarted I find all of the info was not saved
is there something that is missing in the setup ? ... Followed directions on github

thanks again

arthur

Rob Tweed

unread,
Nov 3, 2020, 10:43:12 AM11/3/20
to Enterprise Web Developer Community
Hi Arthur

My mistake - the script that generated the start and start_p scripts was still assuming YottaDB 1.28 and pointing to the wrong files.  I also realised I'd not created pre-initialised 1.30 files for the container when in persistent mode.

I've updated the qewd-conduit repository and containers.  The easiest thing to do if possible is to start from scratch and re-clone qewd-conduit into your Linux system.  Otherwise you'll need to get the new install.js file from the qewd-conduit repo and delete your /qewd-conduit/yottadb folder which will force it to import the new 1.30 initialised files.  It should then work with start_p

Let me know how you get on.

Rob





Arthur Ingram

unread,
Nov 3, 2020, 4:37:21 PM11/3/20
to Enterprise Web Developer Community
Hello Rob,


I have remove and install current still have the same issue want docker is restarted all save data is gone 



arthur

Rob Tweed

unread,
Nov 3, 2020, 4:39:47 PM11/3/20
to Enterprise Web Developer Community
Can you paste the text from your start_p file here please?


--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/enterprise-web-developer-community/0683cac0-6754-415e-b4c4-47590deaffdao%40googlegroups.com.


--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com

Arthur Ingram

unread,
Nov 3, 2020, 5:07:47 PM11/3/20
to Enterprise Web Developer Community

#!/bin/bash

# This script will correctly start the QEWD-Conduit Container

#

#

#  Run this startup script from the QEWD-Conduit folder using:

#

#     - with persistence:    ./start_p

#     - without persistence: ./start

#

echo 'Starting conduit container'

docker run -d --name conduit --rm --network qewd-conduit -p 8090:8080 -v /Users/aezbiz/qewd-conduit:/opt/qewd/mapped -v /Users/aezbiz/qewd-conduit/yottadb:/root/.yottadb/r1.28_x86_64/g rtweed/qewd-server

echo 'conduit Container has been started'


dir was deleted and I used the git clone of the qewd-conduit for the directory I noticed not 1.30 so should I git clone QEWD-JSdb  first then qewd-conduit 


art



On Tuesday, November 3, 2020 at 3:39:47 PM UTC-6, rtweed wrote:
Can you paste the text from your start_p file here please?


On Tue, 3 Nov 2020 at 21:37, Arthur Ingram <kg9...@aezbiz.com> wrote:
Hello Rob,


I have remove and install current still have the same issue want docker is restarted all save data is gone 



arthur



On Tuesday, November 3, 2020 at 9:43:12 AM UTC-6, rtweed wrote:
Hi Arthur

My mistake - the script that generated the start and start_p scripts was still assuming YottaDB 1.28 and pointing to the wrong files.  I also realised I'd not created pre-initialised 1.30 files for the container when in persistent mode.

I've updated the qewd-conduit repository and containers.  The easiest thing to do if possible is to start from scratch and re-clone qewd-conduit into your Linux system.  Otherwise you'll need to get the new install.js file from the qewd-conduit repo and delete your /qewd-conduit/yottadb folder which will force it to import the new 1.30 initialised files.  It should then work with start_p

Let me know how you get on.

Rob





--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-developer-community+unsubscribe@googlegroups.com.

Rob Tweed

unread,
Nov 4, 2020, 4:08:11 AM11/4/20
to Enterprise Web Developer Community
Apologies - although I'd updated my local repo source files, the one I'd not actually updated on Github was qewd-conduit!  Trying to do too much in one go (I updated quite a few other repos yesterday with the same/equivalent fix)!

That's done now, so qewd-conduit ought to work.

BTW you should treat qewd-conduit and qewd-jsdb as two separate entities.  Although they both work with the QEWD Docker Container, they shouldn't be merged together (in theory they could, but it could get confusing).  By all means have them as two separate directories on your system and run separate instances of the QEWD Container (listening on different ports) - running multiple QEWD Containers is no problem: I've had as many as 5 or 6 running concurrently on a Raspberry Pi!

Rob



To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.


--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com

--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/enterprise-web-developer-community/bfec0466-58c3-4218-a316-f834fb52ddcbo%40googlegroups.com.

Arthur Ingram

unread,
Nov 4, 2020, 7:15:15 AM11/4/20
to Enterprise Web Developer Community
Thank you for update, start_p shows 1.30 still conduit is not working correctly the issue has changed to not displaying posted information not even in qewd monitor 
thanks

art
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-developer-community+unsubscribe@googlegroups.com.


--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com

--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-developer-community+unsubscribe@googlegroups.com.

Rob Tweed

unread,
Nov 4, 2020, 7:18:31 AM11/4/20
to Enterprise Web Developer Community
Did you pull the latest Docker container build?

docker pull rtweed/qewd-server



To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.


--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com

--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.


--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com

--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/enterprise-web-developer-community/34917258-b830-4dc8-82fe-cedcbd10f920o%40googlegroups.com.

Arthur Ingram

unread,
Nov 4, 2020, 7:19:41 AM11/4/20
to Enterprise Web Developer Community
Ignore last entry browser cash issues Now  all appears to be working !!!, Thank you for this !!!

art

Rob Tweed

unread,
Nov 4, 2020, 7:48:34 AM11/4/20
to Enterprise Web Developer Community
That's good news, Arthur

I tried going through the complete installation process as documented for the QEWD Docker container with qewd-conduit in a new Ubuntu VM - it all worked perfectly now for me also.  ./start_p comes back with the database intact each time you restart the container.

Rob


--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.

Arthur Ingram

unread,
Nov 4, 2020, 9:57:19 AM11/4/20
to Enterprise Web Developer Community
I think the issue is laptop and macos and I am noticing time out the app is working having issue possible because laptop going to sleep lid close
etc, I have not tested on server yet will though thanks again and will keep posted


art
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-developer-community+unsubscribe@googlegroups.com.

Arthur Ingram

unread,
Nov 13, 2020, 7:23:16 AM11/13/20
to Enterprise Web Developer Community
Rob your latest update changed start_p script  the cd command and mapping of global 

invalid mode: /root/.yottadb/r1.30_x86_64/g



art


To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.

Rob Tweed

unread,
Nov 13, 2020, 9:22:48 AM11/13/20
to Enterprise Web Developer Community
I've updated the container to use YottaDB 1.30

You can edit the qewd.js startup script file to temporarily change the internal paths for YottaDB to 1.28 if you wish.

I'm afraid this is one of those things that is tricky to provide a generic upgrade path for - what I've provided *should* convert what's already there if you used the previous container with YottaDB 1.28

Rob



Arthur Ingram

unread,
Nov 13, 2020, 12:11:59 PM11/13/20
to Enterprise Web Developer Community
Forgive for not being more clear, I saw the update and ran install.sh.and updated  the docker container .. and found when I ran the start_p script the 
container would not start and gave the mapping invalid mode: /root/.yottadb/r1.30_x86_64/g error when running the start_p script

art

Arthur Ingram

unread,
Nov 13, 2020, 12:37:04 PM11/13/20
to Enterprise Web Developer Community
resolved issue thanks for direction


art
Reply all
Reply to author
Forward
0 new messages