The official WebSphere eXtreme Scale KeyValue connector for LoopBack.
While it is possible to use this connector as a standalone module, we recommended using it in your application via the LoopBack command-line tools.
The command line tool will prompt you to install the connector (if not already installed):
cd your-loopback-app
lb datasource
? Enter the data-source name: xs
? Select the connector for xs: IBM WebSphere eXtreme Scale key-value connector (supported by StrongLoop)
Connector-specific configuration:
? Connection String url to override other settings (eg: https://user:pass@host:port/wxsdata/v1/grids/$GRID_NAME): https://username:password@localhost:9444/wxsdata/v1/grids/your-grid-name
? Use SSL for connections to the grid: Yes
? Install loopback-connector-kv-extreme-scale@^1.0.0 (Y/n) Yes
extreme-scale-lb3x@1.0.0 $HOME/your-project-name
└── loopback-connector-kv-extreme-scale@1.0.0The test suite requires a running WebSphere eXtreme Scale server. We recommend Docker for the easiest set up experience.
Important note for Mac users
The XSLD image does not work in the virtual environment provided by
Docker for Mac. You need to create a new docker-machine using
the virtualbox driver, see docker-machine
docs for
instructions.
The instructions
-
Follow the instructions at https://hub.docker.com/r/ibmcom/xsld/ to setup a Docker version of WebSphere eXtreme Scale server.
-
Create your test grid:
-
Open the administration web interface (
https://your-ip:9443/), replaceyour-ipwith the hostname or IP address of your (docker) machine.Use
docker-machine lsto find the IP address used by your docker machine. -
Login using credentials created in step one, usually
xsadminandxsadmin4Me! -
Select "Data Grids"
-
Click on the plus-in-circle button in the top-right corner
-
Use
simpleTemplate, fill in Nametestgrid
- Verify your configuration
- Open the REST API explorer at
https://your-ip:9444/ibm/api/explorer - Expand
gridssection - Expand
POSTendpoint - Fill in gridname
testgrid, mapnametestmap.LUT.O, keytest, body{ "name": "test" } - Click "Try it out!"
- You should receive Response Code
200
-
Setup environment variable
EXTREME_SCALE_URLpointing to the grid created. Replacexsadmin,xsadmin4Me!andyour-ipwith admin username, admin password and your hostname/IP address.On Linux and Mac:
$ export EXTREME_SCALE_URL=https://xsadmin:xsadmin4Me!@your-ip:9444/wxsdata/v1/grids/testgrid/testmapOn Windows:
% SET EXTREME_SCALE_URL=https://xsadmin:xsadmin4Me!@your-ip:9444/wxsdata/v1/grids/testgrid/testmap -
Congratulations, you can run
npm testnow!