OBP-API/Akka.README.md

72 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2017-03-06 14:34:56 +00:00
# Intro
Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.
See http://akka.io
To use Akka, you want to have two different machines:
- One considered `remote` which stores the data
- One considered `local` which is the public facing side of the API, where your users will connect
Both run current versions of the Open Bank Project API, but configured and run differently.
## Remote models
Not all models have been ported yet to be retrieved via Akka. See `modelsRemotedata` in `src/main/scala/bootstrap/liftweb/Boot.scala` to get a current list.
2017-03-06 14:34:56 +00:00
# Remote side
- Configure `src/main/resources/default.props`:
```ini
# Remote end gets data 'locally'
remotedata.enable=false
# Your remote's external IP address
remotedata.hostname=10.0.0.19
# Arbitrary port of your choosing
remotedata.port=5448
2017-04-19 13:21:28 +00:00
# Arbitrary value used in order to assure us that remote and local sides are paired well
2017-04-20 08:40:32 +00:00
remotedata.secret=CHANGE_ME
2017-03-06 14:34:56 +00:00
# Optionally configure postgres, otherwise file-based H2 will be used
remotedata.db.driver=org.postgresql.Driver
remotedata.db.url=jdbc:postgresql://localhost:5432/dbname?user=user&password=password
```
## Run
```bash
#!/bin/sh
cd ${HOME}/OBP-API/ && /usr/bin/nohup /usr/bin/mvn compile exec:java -Dexec.mainClass="code.remotedata.RemotedataActors" -Dexec.args="standalone" > ${HOME}/akka_remote_api.log &
```
# Local OBP API side
- Configure `src/main/resources/default.props`:
```ini
2017-07-07 14:03:38 +00:00
# Define is Akka transport layer used by OBP-API
# In case that property is not defined default value is set to false
use_akka=false
2017-03-06 14:34:56 +00:00
# Local end gets data remotely
remotedata.enable=true
# Your remote's public IP address
remotedata.hostname=10.0.0.19
# Arbitrary port of your choosing, has to match remote above
remotedata.port=5448
```
# Run
```bash
#!/bin/sh
cd ${HOME}/OBP-API/ && /usr/bin/nohup /usr/bin/mvn jetty:run -Djetty.port=8080 -DskipTests > ${HOME}/akka_local_api.log &
```