As QEWD makes use of the InterSystems Node.js connector which is available for both Cache and IRIS, the answer is yes.
- Log in to post comments
As QEWD makes use of the InterSystems Node.js connector which is available for both Cache and IRIS, the answer is yes.
If you can provide me access to an IRIS system on GCP Cloud, then sure.
What functionality would you like to see, and what would the target audience be?
Note: I'm not around to do anything until early September
Rob
Can you provide me with an IRIS license and cover the cost of the GCP Cloud Hosting for the purpose of a demo?
Thanks Ward for raising awareness of the QEWD / IRIS demo while I'm away!
Evgeny - I'm on holiday right now and quickly integrated IRIS with the Conduit / RealWorld back-end code before I left - I didn't have much time and hadn't tested the demo out. It's actually an interesting "hybrid" version of the back end that works with both WebSockets (the version you see in this demo) and REST (which you would see if you pointed a "vanilla" Conduit front-end at it.
I pushed out a new version of QEWD to formally integrate IRIS, and also a new supporting module:
https://github.com/robtweed/ewd-qoper8-iris
Just specify the database type as "iris" in your QEWD startup file, and provide the other parameters (username, password, namespace etc) just as for Cache.
Needless to say, the demo you see works identically, with exactly the same Node.js code, for all supported databases, so you'll just have to take my word, for now, that it really is working with IRIS! :-) Actually the performance will indicate that it's hooked up to a pretty fast DB (and yes, it really is IRIS, running on an AWS EC2 Ubuntu machine): see the response time recorded in the raw response messages that you'll see if you enable your browser's JavaScript console. All the data is being stored in IRIS as persistent JSON - see Slide decks (part 17 onwards) here:
http://docs.qewdjs.com/qewd_training.html
When I get back from holiday, time-permitting, I intend to put together some proper, updated source code for the Conduit app that people can try for themselves, using pure REST (which is probably what many / most want to see) and also (again time-permitting) do a MicroService-based version.
However, the code base you've found will give you an initial idea how a QEWD / IRIS application would be written (though there have been some enhancements that have simplified some of the coding still further since I wrote the Conduit app). This slide deck is up to date and explains the way you write REST apps these days:
https://www.slideshare.net/robtweed/ewd-3-training-course-part-31-ewdxp…
I'll also check out the Comments asap to see if / why they aren't working as you report.
In the meantime, enjoy!
Rob
No, I won't be there, sorry
Rob
OK I fixed the comments bug
Also I've started a separate posting about QEWD and IRIS - https://community.intersystems.com/post/using-qewdjs-create-rest-apis-iris
Yes, InterSystems dropped the idea of implementing JavaScript as an integrated language. Never mind, for those who haven't seen this, here's how (and why) it's been achieved anyway:
https://www.slideshare.net/robtweed/data-persistence-as-a-language-feat…
Alternatively you could use proper JavaScript via Node.js and the cache.node / iris.node interface :-)
Since QEWD is a JavaScript / Node.js project, GraphQL is pretty much automatically supported via the standard Node.js GraphQL module that has been provided by Facebook.
When I get some time I'll write some notes on how to integrate it with Cache using QEWD
That's a code sequencing issue. Change the end of Ward's qewd-start.js file to this:
let qewd = require('qewd').master;
// define the internal QEWD Express module instance
// start the QEWD server now ...
qewd.start(config);
let xp = qewd.intercept();
// define a basic test path to test if our QEWD server is up- and running
xp.app.get('/testme', function(req, res) {
console.log('*** /testme query: ', req.query);
res.send({
hello: 'world',
query: req.query
});
});
and it should work for you
Hi Evgeny
Yes - In a previous article I described how QEWD works with IRIS - it simply uses the iris.node connector instead of the cache.node one:
https://community.intersystems.com/post/using-qewdjs-create-rest-apis-i…
Similarly, you can use the new QEWD-Up technology with IRIS. Just make two changes:
1) In your QEWD-Up application's config.json file, where the Cache version specifies this:
"database": {
"type": "cache",
"params": {
"path": "/opt/cachesys/mgr",
"username": "_SYSTEM",
"password": "SYS",
"namespace": "USER"
}
}
Just change the database type to "iris", eg:
"database": {
"type": "iris", // <====== ****** change this *****
"params": {
"path": "/opt/cachesys/mgr",
"username": "_SYSTEM",
"password": "SYS",
"namespace": "USER"
}
}
Change the other IRIS connection parameters if needed and as required for your IRIS system (ie path, username, password, namespace)
2) Replace the cache.node connector with the appropriate iris.node version for your operating system and Node.js version.
When you use QEWD, anything you can do in Cache or IRIS is available to you from within Node.js, and being a Node.js platform, you also have access to the huge ecosystem of OpenSource Node.js modules in NPM to save you re-inventing wheels for pretty much anything you can imagine doing.
Of course, since neither Cache nor IRIS are Open Source products, and since, for whatever reason, neither the cache.node nor iris.node modules are distributed via NPM (which is what Node.js developers would expect), you need to figure out how to manually construct your own licensed Cache or IRIS QEWD-Up Containers. If you're wanting a native implementation, for the same reasons I'm unable to provide the kind of pre-constructed installation scripts that I otherwise provide for other supported QEWD environments that make life easier for developers. IMO these kind of issues are a real barrier to wider uptake of Cache and IRIS in the current world of IT, but there we go.
Anyway, if you're interested in using QEWD with IRIS, the best I can suggest is to take a look at the Dockerfile I've created and figure out how to adapt it for use with IRIS using my notes above...or figure out how to adapt an InterSystems-provided IRIS container to make use of QEWD-Up. IRIS certainly works very well with QEWD-Up when you do get it working, so it's worth the effort!
As to Open Exchange - I'll look into it as time permits. However, everything I create is Open Source and I publish everything I do on Github for anyone in this community to look at and use.
Everyone else makes Node.js modules such as these available via NPM.
Ward is correct - ewd-document-store is the way to go.
For background on this module, the thinking behind it and some of the considerations you need to be aware of when using it (which ultimately explain what QEWD.js is all about and why it is what it is), see this presentation that I gave a couple of years ago at the UK Symposium:
https://www.slideshare.net/robtweed/data-persistence-as-a-language-feat…
Also see here for pointers to further info on the persistent JSON / Document Database abstraction provided by ewd-document-store:
https://github.com/robtweed/qewd/blob/master/up/docs/InteractiveApps.md…
Note that ewd-document store will work with any version/build of Cache, Ensemble or Iris
Rob
BTW you can further simplify and optimise the performance of Ward's forEachChild() logic like this:
customerNode.forEachChild(function (customerId, childNode) {
if (childNode.$(['Address', '1']).value === 'London') {
// do what's needed with a London customer ...
}
});ie by using the childNode argument of the forEach() and using the $ array feature
Rob
Fabian
You misunderstand: ewd-document-store is an abstraction built on top of the InterSystems Node.js client, NOT an alternative to it. QEWD uses the InterSystems Node.js client via ewd-document-store, so once again, QEWD isn't an alternative to the Node.js client, but makes it a lot easier to use with IRIS or Cache.
You can't directly filter objects with IRIS NoSQL storage (aka Global Storage) - instead the trick it to maintain indices to optimise iteration - see Ward's follow-up comment., and study those slide decks I've created that describe how to use QEWD's abstraction of Global Storage.
I've spent quite a number of hours trying to figure out a way to modify the IRIS Container within the AWS Community version so that I can get it to run QEWD.js. I've been able to build a new Container derived from the one provided in the AWS EC2 instance into which I install Node.js and the QEWD modules, etc.
However, using the --after parameter in the docker run command, it looks like iris-main is blocking something - the QEWD Node.js startup code appears to just hang, I think because console.log is unable to write to STDOUT - presumably because of something iris-main is doing. It looks like running iris-main and Node.js together doesn't want to work
I've hit a brick wall with this now and don't know if there's any way to get QEWD working in this AWS EC2 instance, which is disappointing
OK some further digging reveals that the main problem is that QEWD is freezing at the point where it tries to start the Node.js Express web server.
I'd guess the reason is either:
- something to do with the way Express works internally that clashes with iris-main; or
- port 8080 (which is the port I'm telling Express to listen on) being unavailable because of something IRIS has done
Anyone have any clues?
There's a second problem which is that the Node.js setInterval() function appears to freeze iris-main - something that is pretty critical to have working in QEWD
I don't have accounts on GCP or Azure and am not familiar with their use. I use AWS EC2 all the time so I know how to work with it. The problem is unlikely to be AWS-specific, however
One further observation: setInterval() definitely hangs everything. However setTimeout() works just fine
Ok forget all that - I've figured out how to make it work and will report back later with the solution :-)
OK Two steps forward, one step back.
When I try to connect to IRIS via the iris.node file and use the db.open() function (from within the container) I get this error
{"ErrorMessage":"Authentication: IRISSecureStart() : Access Denied : Check the audit log for the real authentication error (-15)\n","ErrorCode":-15,"ok":0}
Any ideas what's causing it and how to fix this?
Rob
OK I seem to be on my own sorting this out...but I seem to have figured it all out. I had to first adapt the changePassword utility to work on my derived Container, and once that was done I could use the System Management Portal - which showed me that the Callin Interface wasn't enabled. Once I enabled that, QEWD burst into life :-)
So a question (if anyone out there is listening) - is there a configuration setting somewhere to enable the callin interface automatically when you start up the container, ie to avoid the need to manually enable it via the System Management Portal?
I now have QEWD working in the IRIS Community Edition for AWS environment. To get it running I've had to create a new Container that is derived from the one provided in the Community Edition EC2 platform.
I've done all the hard work for you, and It's all documented here:
https://github.com/robtweed/qewd/tree/master/docker-server-iris-ce-aws
Please give it a try!
Since its earliest days, QEWD.js has supported WebSocket-based applications - with the WebSocket side of things all taken care of by Node.js (specifically using the socket.io module) rather than Cache/IRIS.
Now that it's quick and easy to try out QEWD with IRIS (by using my extensions for the IRIS Community Edition for AWS), you can see QEWD's Web-Sockets based applications for yourself - the QEWD-Monitor application is one that comes "out of the box" for you. However, QEWD makes it very easy to create interactive browser/mobile Web-Socket based applications that integrate with IRIS. See:
https://github.com/robtweed/qewd/blob/master/up/docs/InteractiveApps.md
For information on getting QEWD running wih the IRIS Community Edition for AWS, see:
https://github.com/robtweed/qewd/tree/master/docker-server-iris-ce-aws
You might want to take a look at QEWD? See my recent posting in the article on the IRIS Community Edition for AWS
See also
https://github.com/robtweed/qewd
https://github.com/robtweed/qewd/tree/master/docker-server-iris-ce-aws
https://github.com/robtweed/qewd/tree/master/up/docs
For an example where it's being used in the NHS (in a pilot) with both desktop and mobile devices: https://ripple.foundation/
Rob
Submitted now, awaiting approval
I provided an external article link. What do you suggest I use instead.
I entered the version number of QEWD as 2.44.23 which is what it is set to on NPM - why has this been queried?
Evgeny
I seem to be stuck in "awaiting approval" status, so am unable to make the change you're wanting
Why aren't they made available using NPM, which is where a Node.js developer would expect to find such modules?
One limitation I can see straight away is that this version only includes outdated files for Node.js (ie the iris*.node files). All I see is iris610.node and iris700.node. Is there a reason why the Node.js version 8 and version 10 interface files haven't been included?