the-algorithm/recos-injector
twitter-team bb095608b7 [minor] Fix grammar + typo issues
Closes #557, closes #678, closes #748, closes #806, closes #818, closes #842, closes #866, closes #948, closes #1024, closes #1313, closes #1458, closes #1461, closes #1465, closes #1491, closes #1503, closes #1539, closes #1611
2023-04-04 16:13:24 -05:00
..
server Twitter Recommendation Algorithm 2023-03-31 17:36:31 -05:00
BUILD.bazel Twitter Recommendation Algorithm 2023-03-31 17:36:31 -05:00
CONFIG.ini Twitter Recommendation Algorithm 2023-03-31 17:36:31 -05:00
README.md [minor] Fix grammar + typo issues 2023-04-04 16:13:24 -05:00

README.md

Recos-Injector

Recos-Injector is a streaming event processor used to build input streams for GraphJet-based services. It is a general-purpose tool that consumes arbitrary incoming event streams (e.g., Fav, RT, Follow, client_events, etc.), applies filtering, and combines and publishes cleaned up events to corresponding GraphJet services. Each GraphJet-based service subscribes to a dedicated Kafka topic, and Recos-Injector enables GraphJet-based services to consume any event they want.

How to run Recos-Injector server tests

You can run tests by using the following command from your project's root directory:

$ bazel build recos-injector/...
$ bazel test recos-injector/...

How to run recos-injector-server in development on a local machine

The simplest way to stand up a service is to run it locally. To run recos-injector-server in development mode, compile the project and then execute it with bazel run:

$ bazel build recos-injector/server:bin
$ bazel run recos-injector/server:bin

A tunnel can be set up in order for downstream queries to work properly. Upon successful server startup, try to curl its admin endpoint in another terminal:

$ curl -s localhost:9990/admin/ping
pong

Run curl -s localhost:9990/admin to see a list of all available admin endpoints.

Querying Recos-Injector server from a Scala console

Recos-Injector does not have a Thrift endpoint. Instead, it reads Event Bus and Kafka queues and writes to the Recos-Injector Kafka.

Generating a package for deployment

To package your service into a zip file for deployment, run:

$ bazel bundle recos-injector/server:bin --bundle-jvm-archive=zip

If the command is successful, a file named dist/recos-injector-server.zip will be created.