Installing EWD

96 views
Skip to first unread message

Mike

unread,
Mar 25, 2013, 11:34:09 AM3/25/13
to Enterprise Web Developer Community
I'm installing EWD on a server that has to drives. The C drive is a
small drive for system management. The D drive is much larger and is
to be used for applications and data. The EWD installation
instructions specifies installing everything in the C drive: C:
\ewdapps, C:\ewdapps\ewdMGR, C:\node, C:\node\www....etc, etc.

Is it absolutely necessary that everything be setup in the C drive, or
can I substitute setting up the system in the D drive?

Thanks in advance,

Mike

Rob Tweed

unread,
Mar 25, 2013, 11:36:03 AM3/25/13
to enterprise-web-de...@googlegroups.com
No what I wrote was just an example of a typical "testing" environment on a Windows PC or laptop.  You can install it anywhere you like - just make sure you define the path configurations to match your setup

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.
To post to this group, send an email to enterprise-web-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/enterprise-web-developer-community?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.





--
Rob Tweed
Director, M/Gateway Developments Ltd
http://www.mgateway.com
------------------
EWD Mobile: Build mobile applications faster
http://www.mgateway.com/ewd.html

Mike

unread,
Mar 25, 2013, 11:45:01 AM3/25/13
to Enterprise Web Developer Community
Thanks for the quick response Rob.

Mike

On Mar 25, 11:36 am, Rob Tweed <rob.tw...@gmail.com> wrote:
> No what I wrote was just an example of a typical "testing" environment on a
> Windows PC or laptop.  You can install it anywhere you like - just make
> sure you define the path configurations to match your setup
>
> Rob
>
> On 25 March 2013 15:34, Mike <mminor...@earthlink.net> wrote:
>
>
>
>
>
>
>
>
>
> > I'm installing EWD on a server that has to drives. The C drive is a
> > small drive for system management. The D drive is much larger and is
> > to be used for applications and data. The EWD installation
> > instructions specifies installing everything in the C drive: C:
> > \ewdapps, C:\ewdapps\ewdMGR, C:\node, C:\node\www....etc, etc.
>
> > Is it absolutely necessary that everything be setup in the C drive, or
> > can I substitute setting up the system in the D drive?
>
> > Thanks in advance,
>
> > Mike
>
> > --
> > 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 post to this group, send an email to
> > enterprise-web-de...@googlegroups.com.
> > Visit this group at
> >http://groups.google.com/group/enterprise-web-developer-community?hl=...
> > .
> > For more options, visithttps://groups.google.com/groups/opt_out.
>
> --
> Rob Tweed
> Director, M/Gateway Developments Ltdhttp://www.mgateway.com

Mike

unread,
Mar 25, 2013, 1:11:15 PM3/25/13
to Enterprise Web Developer Community
If I want to setup m EWD application in a namespace other than USER,
do I need to configure Node.js in the new namespace as well as the
USER namespace, or just the namspace where my application will reside?

Mike

Rob Tweed

unread,
Mar 25, 2013, 1:27:56 PM3/25/13
to enterprise-web-de...@googlegroups.com
If you're using the Node.js ewdGateway2 platform for EWD, then you need to set up the namespace in the configuration startup params for ewdGateway2 - ie in the Node.js process.  This tells the Node.js child processes how to start up the Cache Node.js interface when they are initially spawned.

Note that with the Node.js-based gateway, it's rather more tricky than with WebLink to have multiple applications that use different Cache namespaces.  There would be two ways you could do it:

1) Do namespace switching within your onBeforeRender methods.....it would be up to you to ensure that you always switch the namespace correctly for each invocation of an onBeforeRender method.  Probably not the best technique as it would be potentially prone to programmer error.

2) Have different instances of ewdGateway2 running, each listening on a different port.  So, for example, URLs to port 8080 might go to USER, while URLs to 8082 might go to WORK.  You could also use a web server such as Apache in front to proxy to these ports depending on a URL structure rule.

It might be possible, in future, to figure out a way to have multiple namespaces configured from a single instance, but it would need some thinking how to do it in a way that would integrate easily with ewdGateway2's current internal design.  As always, sponsoring development is a way to push up the priority of such a modification.

Hope this helps

Rob

 

For more options, visit https://groups.google.com/groups/opt_out.


Mike

unread,
Mar 25, 2013, 1:48:21 PM3/25/13
to Enterprise Web Developer Community
I don't necessary want to have multiple applications in multiple
databases. I just don't want to create my application in the USER
namespace. So, if I understand correctly, with only one application in
one namespace, I should "d configure^%zewdNode" in the namespace in
which I want to develop.

Mike

On Mar 25, 1:27 pm, Rob Tweed <rob.tw...@gmail.com> wrote:
> If you're using the Node.js ewdGateway2 platform for EWD, then you need to
> set up the namespace in the configuration startup params for ewdGateway2 -
> ie in the Node.js process.  This tells the Node.js child processes how to
> start up the Cache Node.js interface when they are initially spawned.
>
> Note that with the Node.js-based gateway, it's rather more tricky than with
> WebLink to have multiple applications that use different Cache namespaces.
>  There would be two ways you could do it:
>
> 1) Do namespace switching within your onBeforeRender methods.....it would
> be up to you to ensure that you always switch the namespace correctly for
> each invocation of an onBeforeRender method.  Probably not the best
> technique as it would be potentially prone to programmer error.
>
> 2) Have different instances of ewdGateway2 running, each listening on a
> different port.  So, for example, URLs to port 8080 might go to USER, while
> URLs to 8082 might go to WORK.  You could also use a web server such as
> Apache in front to proxy to these ports depending on a URL structure rule.
>
> It might be possible, in future, to figure out a way to have multiple
> namespaces configured from a single instance, but it would need some
> thinking how to do it in a way that would integrate easily with
> ewdGateway2's current internal design.  As always, sponsoring development
> is a way to push up the priority of such a modification.
>
> Hope this helps
>
> Rob
>

Rob Tweed

unread,
Mar 25, 2013, 2:00:13 PM3/25/13
to enterprise-web-de...@googlegroups.com
No - configure^%zewdNode has nothing to do with it - that just configures the compiler and the path to physical locations in the run-time.

The namespace is configured in the .js file you run to start up ewdGateway2 - my documented example suggests you use the pre-built one named ewdStart-cache.js.  Just edit it, eg:

var params = {
      poolSize: 2,
      httpPort: 8080,
...etc....

      database: {
        type: 'cache',
        nodePath: "c:\\Program Files (x86)\\nodejs\\cache",
        path:"c:\\InterSystems\\Cache\\Mgr",
        username: "_SYSTEM",
        password: "SYS",
**** -> namespace: "WORK",
        outputFilePath:"c:\\node\\",
      },

....etc....
};

You'll probably want to change the username and password too.

Rob


For more options, visit https://groups.google.com/groups/opt_out.


Mike

unread,
Mar 25, 2013, 2:28:58 PM3/25/13
to Enterprise Web Developer Community
When I did the following:

cd \node
node ewdStart-cache

I got the following error.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>d:

D:\>cd \node

D:\node>node ewdStart-cache
********************************************
*** ewdGateway Build 37 (11 March 2013) ***
********************************************
********************************************
*** ewdQ Build 8 (11 March 2013) ***
********************************************
2 child Node processes running
Trace mode is off

module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'c:\node\node_modules\ewdgateway2\lib
\ewdQWorker.js'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)

module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'c:\node\node_modules\ewdgateway2\lib
\ewdQWorker.js'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)

I suspect it is because I set up everything on the D drive instead of
the C drive. I tried "node d:\node\ewdStart-cache" as well and it
gave the same output.

What do I need to do?

Mike

On Mar 25, 2:00 pm, Rob Tweed <rob.tw...@gmail.com> wrote:
> No - configure^%zewdNode has nothing to do with it - that just configures
> the compiler and the path to physical locations in the run-time.
>
> The namespace is configured in the .js file you run to start up ewdGateway2
> - my documented example suggests you use the pre-built one named
> ewdStart-cache.js.  Just edit it, eg:
>
> var params = {
>       poolSize: 2,
>       httpPort: 8080,
>       ...etc....
>
>       database: {
>         type: 'cache',
>         nodePath: "c:\\Program Files (x86)\\nodejs\\cache",
>         path:"c:\\InterSystems\\Cache\\Mgr",
>         username: "_SYSTEM",
>         password: "SYS",
> **** -> namespace: "WORK",
>         outputFilePath:"c:\\node\\",
>       },
>
>     ....etc....
>
> };
>
> You'll probably want to change the username and password too.
>
> Rob
>

Rob Tweed

unread,
Mar 25, 2013, 3:01:48 PM3/25/13
to enterprise-web-de...@googlegroups.com
Adjust the child process path which currently points to c:in the startup .js file:

  childProcessPath: 'c:\\node\\node_modules\\ewdgateway2\\\\lib\\ewdQWorker.js',

While you're at it, check and adjust any other path that points to c:

Rob

For more options, visit https://groups.google.com/groups/opt_out.


Mike

unread,
Mar 25, 2013, 4:12:48 PM3/25/13
to Enterprise Web Developer Community
OK.....I changed the .js file to the following:

var ewd = require('ewdgateway2');

var params = {
poolSize: 2,
httpPort: 8080,
https: {
enabled: false,
keyPath: "d:\\node\\ssl\\ssl.key",
certificatePath: "d:\\node\\ssl\\ssl.crt",
},
ewdPath: '/ewd/',
webSockets: {
enabled: true,
path: '/ewdWebSocket/',
host: '127.0.0.1',
socketIoPath: 'd:\\node\\node_modules\\socket.io\\lib\
\socket.io'
},
database: {
type: 'cache',
nodePath: "c:\\Program Files (x86)\\nodejs\\cache",
path:"c:\\InterSystems\\TryCache\\Mgr",
username: "_SYSTEM",
password: "SYS",
namespace: "USER",
outputFilePath:"d:\\node\\",
},
childProcessPath: 'd:\\node\\node_modules\\ewdgateway2\\\\lib\
\ewdQWorker.js',
traceLevel: 2,
silentStart: false,
webServerRootPath: 'd:\\node\\www',
logTo: 'console',
logFile: 'd:\\node\\ewdLog.txt',
logHTTP: true,
monitorInterval: 30000,
ewdQPath: './ewdQ',
management: {
password: 'keepThisSecret!'
}
};

ewd.start(params,function(gateway) {
//console.log("version = " + gateway.version());

gateway.messageHandler.testit = function(request) {
console.log("*!*!*!*!*! Processing the testit message " +
request.message + "; User's EWD token:" + request.token);
gateway.sendSocketMsg({token: request.token, type: "alert", message:
"Node.js handled your request"});
};

});


and I'm getting the following when I try to start it:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Administrator>d:

D:\>cd node

D:\node>node ewdStart-cache
********************************************
*** ewdGateway Build 37 (11 March 2013) ***
********************************************
********************************************
*** ewdQ Build 8 (11 March 2013) ***
********************************************
2 child Node processes running
Trace mode is off
Memory usage after startup: rss: 12.20Mb; heapTotal: 5.61Mb; heapUsed:
2.84Mb
ewdQ is ready!
HTTP is enabled; listening on port 8080

module.js:337
throw new Error("Cannot find module '" + request + "'");
^
Error: Cannot find module 'c:\node\node_modules\socket.io\lib
\socket.io'
at Function._resolveFilename (module.js:337:11)
at Function._load (module.js:279:25)
at Module.require (module.js:359:17)
at require (module.js:375:17)
at D:\node\node_modules\ewdgateway2\lib\ewdgateway2.js:820:25
at ChildProcess.<anonymous> (D:\node\node_modules\ewdgateway2\lib
\ewdQ.js:29
6:15)
at ChildProcess.emit (events.js:70:17)
at Pipe.onread (child_process.js:102:16)
<LICENSE LIMIT EXCEEDED>
D:\node><LICENSE LIMIT EXCEEDED>^A<LICENSE LIMIT EXCEEDED><LICENSE
LIMIT EXCEEDE
D>


I'm sure I missed something, but not sure what....

Mike

On Mar 25, 3:01 pm, Rob Tweed <rob.tw...@gmail.com> wrote:
> Adjust the child process path which currently points to c:in the startup
> .js file:
>
>   childProcessPath:
> 'c:\\node\\node_modules\\ewdgateway2\\\\lib\\ewdQWorker.js',
>
> While you're at it, check and adjust any other path that points to c:
>
> Rob
>
> ...
>
> read more »

Rob Tweed

unread,
Mar 26, 2013, 3:30:20 AM3/26/13
to enterprise-web-de...@googlegroups.com
I assume from the License errors that you'r attempting to use the Cache evaluation copy.  It isn't going to work because each child process consumes a license (just like WebLink would too) + Cache requires an additional background job consuming another license. 

Sounds like you could do with some one to one support to get started...

Rob


For more options, visit https://groups.google.com/groups/opt_out.





--
Rob Tweed
Director, M/Gateway Developments Ltd

Mike Minor

unread,
Mar 26, 2013, 8:36:33 AM3/26/13
to enterprise-web-de...@googlegroups.com

Rob,

 

What is the minimum version of Cache required to run EWD and node.js?

 

Thank you,

 

Mike Minor

mmin...@earthlink.net

mmi...@zcodesystems.com

407-656-4990

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Rob Tweed

unread,
Mar 26, 2013, 8:44:58 AM3/26/13
to enterprise-web-de...@googlegroups.com
The Node.js interface has only been packaged up with Cache since 2012.2, but actually you'll find that you can take the cache.node interface file from the 2012.2 build and put it together with most versions of Cache.  I've certainly been able to use it with 2008.x.  Not sure, but it might even work with 5.x!

Rob
Reply all
Reply to author
Forward
0 new messages