JavaScript Mapping
Supported Features of the JavaScript Mapping
Ice for JavaScript does not support the entire set of Ice features that are found in the C++, Java, and C# language mappings, primarily due to platform and API limitations. Furthermore, there are some differences between using Ice for JavaScript in a browser and in Node.js.
The table below provides more details on the Ice for JavaScript feature set:
Feature | Browser | Node.js | Notes |
---|---|---|---|
Synchronous invocations | Blocking RPCs are not compatible with JavaScript's execution model. | ||
Asynchronous invocations | Also see Asynchronous APIs in JavaScript | ||
Synchronous dispatch | |||
Asynchronous dispatch | |||
Outgoing TCP connections | |||
Incoming TCP connections | Applications must use bidirectional connections to receive callbacks. | ||
Outgoing WS connections |
| WebSocket connections require the server to use the IceWS transport. | |
Outgoing WSS connections |
| Secure WebSocket (WSS) connections require the server to use the IceWS transport. | |
Outgoing SSL connections | Browser applications can use WSS. | ||
Datagrams | |||
DNS queries | The lack of support for DNS queries affects fault tolerance. | ||
File logging | |||
Property files | |||
Flow control API | "Sent" callbacks are not supported. | ||
Thread pools | Threads are not supported in JavaScript. | ||
| Threads are not supported in JavaScript. | ||
Protocol compression | Ice uses the bzip2 algorithm, which is not natively supported in JavaScript. | ||
Communicator plug-ins | |||
| |||
| |||
Collocated invocations | |||
Streaming API | |||
Admin facility |
DNS limitations
In most language mappings, the Ice run time performs a DNS query to resolve an endpoint's host name into one or more IP addresses. Specifying a multi-homed host name in an endpoint provides the client with a simple form of fault tolerance because Ice has multiple addresses to use during connection establishment.
This form of fault tolerance is not available when using Ice for JavaScript because the DNS API is not supported.
Topics
- Asynchronous APIs in JavaScript
- Client-Side Slice-to-JavaScript Mapping
- Server-Side Slice-to-JavaScript Mapping