Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with resilient mode and gtm #32

Open
killmenot opened this issue Nov 27, 2017 · 4 comments
Open

bug with resilient mode and gtm #32

killmenot opened this issue Nov 27, 2017 · 4 comments

Comments

@killmenot
Copy link

killmenot commented Nov 27, 2017

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:
screenshot 2017-11-28 02 44 44

QEWD configuration:

  • express
  • redis
  • resilientMode

screenshot 2017-11-28 02 45 14

@killmenot
Copy link
Author

To be honest have no idea why...

@killmenot
Copy link
Author

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

@killmenot
Copy link
Author

@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?

@killmenot killmenot reopened this Nov 28, 2017
@dlwicksell
Copy link

dlwicksell commented Oct 11, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants