qewd
qewd copied to clipboard
bug with resilient mode and gtm
Hey @robtweed
Simple test should be able to send message using websockets
:
describe('custom message', () => {
let data;
beforeEach((done) => {
request.
post('/ajax').
send({
type: 'ewd-register',
application: 'test-app'
}).
end((err, res) => {
if (err) return done.fail(err);
data = {
type: 'test',
token: res.body.token,
params: {
text: 'Hello world'
}
};
done();
});
});
it('should be able to send message using websockets', (done) => {
const socket = io.connect('ws://localhost:8080');
socket.on('connect', () => socket.emit('ewdjs', data));
socket.on('ewdjs', (responseObj) => {
socket.disconnect();
expect(responseObj).toEqual({
type: 'test',
finished: true,
message: {
text: 'You sent: Hello world via express'
},
responseTime: jasmine.stringMatching(/^\d*ms$/)
});
done();
});
});
});
QEWD configuration:
- express
- gtm
- resilientMode
Output:
QEWD configuration:
- express
- redis
- resilientMode
To be honest have no idea why...
Rob:
currently GT.M /Yotta can't be used in resilient mode, because The asynchronous API versions needed by the master process aren't yet available in NodeM. David Wicksell (the author of NodeM) is supposed to be working on them. My guess would be that this is why things go wrong in that mode
@robtweed Maybe we need to see if database is gtm
and resilient mode is ON
to throw some error during start QEWD in master.js?
I just came across this issue, and wanted to mention that this should now be fixed. I implemented the asynchronous versions of all APIs needed for resilient mode to work in QEWD, as of NodeM version 0.12.0. The current version of NodeM is 0.12.1, and has optimized performance when using YottaDB r1.20 or newer, as well as the aforementioned asynchronous APIs, needed to work with QEWD's resilient mode.
So, unless I'm missing something, this issue should be able to be closed, and marked as resolved.