+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Develop JavaScript adapter code

Learn about implementing JavaScript adapters.


JavaScript adapters and global variables

The IBM MobileFirst™ Platform Server does not rely on HTTP sessions. In a deployment that involves multiple nodes, a client request can be processed by one server in a cluster and the next request by another. You should not rely on global variables to keep data from one request to the next.


Adapter response threshold

Adapter calls are not designed to return huge chunks of data because the adapter response is stored in MobileFirst Server memory as a string. Thus, data that exceeds the amount of available memory might cause an out-of-memory exception and the failure of the adapter invocation. To prevent such failure, you configure a threshold value from which the MobileFirst Server returns gzipped HTTP responses. The HTTP protocol has standard headers to support gzip compression. The client application must also be able to support gzip content in HTTP.

Parent topic: MobileFirst JavaScript adapters