Author |
Message
|
tksharma |
Posted: Tue Oct 10, 2017 6:04 pm Post subject: Invoking JavaScript SDK from IIB |
|
|
Newbie
Joined: 19 Dec 2013 Posts: 6
|
Folks,
I am interested to know, if we can invoke JavaScript SDK from IIB .
Considering that JS would need an Engine and an appropriate runtime. Wanted to know if we can use JCN to invoke JS SDK , are there any limitations or other possible options ?
I don't see any supporting information with regards to the same in IIB documentation. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 10, 2017 8:13 pm Post subject: Re: Invoking JavaScript SDK from IIB |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tksharma wrote: |
Folks,
I am interested to know, if we can invoke JavaScript SDK from IIB .
Considering that JS would need an Engine and an appropriate runtime. Wanted to know if we can use JCN to invoke JS SDK , are there any limitations or other possible options ?
I don't see any supporting information with regards to the same in IIB documentation. |
You can surely invoke it, assuming it is a rest or soap call. However the Java Script Engine needs to be outside of IIB.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tksharma |
Posted: Tue Oct 10, 2017 8:18 pm Post subject: |
|
|
Newbie
Joined: 19 Dec 2013 Posts: 6
|
when i meant JS SDK , its invoking java script function that is implemented on the server ,there are not REST/ SOAP API involved. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 10, 2017 8:24 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tksharma wrote: |
when i meant JS SDK , its invoking java script function that is implemented on the server ,there are not REST/ SOAP API involved. |
So how would you invoke the script function if IIB has no reference to the JS server ? And again how would you invoke that function if IIB would have a reference to that JS Server.
Don't expect the script to run in IIB.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tksharma |
Posted: Tue Oct 10, 2017 8:29 pm Post subject: |
|
|
Newbie
Joined: 19 Dec 2013 Posts: 6
|
if a browser can run the java script sdk and access functions on the server , iib should be able to do it as well, but i dont see any documentation what so ever. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 10, 2017 8:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
tksharma wrote: |
if a browser can run the java script sdk and access functions on the server , iib should be able to do it as well, but i don't see any documentation what so ever. |
IIB is not a browser! (if it were a browser it would be way cheaper, but then it would not do a tenth of the things it does.... )  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tksharma |
Posted: Tue Oct 10, 2017 8:45 pm Post subject: |
|
|
Newbie
Joined: 19 Dec 2013 Posts: 6
|
well , i agree. So there is no way what so ever for IIB to invoke Java script.  |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 11, 2017 5:03 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
tksharma wrote: |
well , i agree. So there is no way what so ever for IIB to invoke Java script.  |
Anything you can do from Java, you can do from a JavaCompute node.
There is reasonably good documentation on how to create your own IIB node - so if you really felt like it, you could write a JS node.
IIB is not a browser. You can think of IIB best as an HTTP client - ala curl or wget or etc. So you can do PUT, POST, GET, DELETE, etc, but not get the full experience of a browser.
Solve this problem however you choose. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
tksharma |
Posted: Wed Oct 11, 2017 5:40 am Post subject: |
|
|
Newbie
Joined: 19 Dec 2013 Posts: 6
|
does JCN provide the engine and run time to support java script execution ? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 11, 2017 6:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
tksharma wrote: |
does JCN provide the engine and run time to support java script execution ? |
The JCN, as my most worthy associate points out, allows anything to be done that you could do from a standard JVM. If it was me (and it's obviously isn't) I'd create a Java-based user defined node rather than a JCN for what you're suggesting (following the instructions here).
IIB (in terms of the IBM software) doesn't supply any of the engine, runtime or other infrastructure needed to run JavaScript. You'd need to instantiate such things from your user code.
I also agree with him that it's wrong to think of IIB as a browser but better to think of it as an HTTP client. So consider what you'd need to do to run JavaScript from curl and that's what you're taking on. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|