https://github.com/meandor/transporter
Scala and Akka based library to export incoming data to locations
https://github.com/meandor/transporter
actors akka export parallel-computing star-trek transport
Last synced: 3 months ago
JSON representation
Scala and Akka based library to export incoming data to locations
- Host: GitHub
- URL: https://github.com/meandor/transporter
- Owner: meandor
- License: mit
- Created: 2017-10-19T12:15:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-04T08:13:26.000Z (over 8 years ago)
- Last Synced: 2024-12-20T00:02:09.980Z (over 1 year ago)
- Topics: actors, akka, export, parallel-computing, star-trek, transport
- Language: Scala
- Homepage:
- Size: 124 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Transporter
[](https://travis-ci.org/meandor/transporter) [](https://github.com/meandor/transporter/blob/master/LICENSE) [](https://maven-badges.herokuapp.com/maven-central/com.github.meandor/transporter)
A _Scala-Library_ that transports matter to locations using [Akka](https://akka.io/)
and [Prometheus](https://prometheus.io) metrics.
> "Transporting really is the safest way to travel."
>
> -- Geordi La Forge, 2369 ("Realm of Fear"), Star Trek
In other words it exports data to other locations. It can be used to export data to APIs.

## Testing
Execute the tests with gradle:
```bash
./bin/go check
```
## Building
To build with gradle:
```bash
./bin/go clean build
```
This will create a jar file in `./build/libs` without the dependencies.
## Releasing and Publishing
```bash
./bin/go release
```
Will release a newer version with semantic versioning
```bash
./bin/go publish
```
will publish the artifact to maven central.
## Outgoing Data
Register an Akka-Actor with the system for each location you want to transport to.
For that just add new `com.github.meandor.transporter.platform.Platform`s.
Each Platform consists of a `PhaseTransitionCoil` and a `TargetingScanner`.
The `PhaseTransitionCoil` is responsible for transforming matter to energy or in other
words transform incoming data (e.g. entity) into data that can be exported (e.g. DTO).
The `TargetingScanner` is responsible to lock onto the target depending on the given location.
In other words find the proper API abstraction to export to (adapter), which is called `Target`.
To add an Export you have to add a new `Platform` actor with an implementation of
`PhaseTransitionCoil` and `TargetingScanner` which define how to export incoming data.
```scala
...
system.actorOf(Platform.props(SpecificPlatformPTC, SpecificPlatformTS), "SpecificPlatformName")
...
```
where `SpecificPlatformTS` and `SpecificPlatformPTC` tell the Platform how to beam Matter and `system` is an Akka Actor System.
```scala
object SpecificPlatformTS extends TargetingScanner {
...
}
object SpecificPlatformPTC extends PhaseTransitionCoil {
...
}
```
## Example
https://github.com/meandor/voyage-transporter
## Metrics
Prometheus metrics are registered and available.
## Links
* http://memory-alpha.wikia.com/wiki/Transporter