{"id":19069053,"url":"https://github.com/mihaitodor/knative-benthos","last_synced_at":"2025-04-28T14:09:42.003Z","repository":{"id":90356822,"uuid":"493047960","full_name":"mihaitodor/knative-benthos","owner":"mihaitodor","description":"Batch sentiment analysis with benthos and Knative","archived":false,"fork":false,"pushed_at":"2022-05-27T22:54:23.000Z","size":1107,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T14:09:35.868Z","etag":null,"topics":["batching","benthos","knative","kubernetes","sentiment-analysis"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mihaitodor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-17T01:01:17.000Z","updated_at":"2025-02-19T01:03:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"67ba5f8a-0bde-4637-8473-03be4542bd90","html_url":"https://github.com/mihaitodor/knative-benthos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaitodor%2Fknative-benthos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaitodor%2Fknative-benthos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaitodor%2Fknative-benthos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mihaitodor%2Fknative-benthos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mihaitodor","download_url":"https://codeload.github.com/mihaitodor/knative-benthos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326848,"owners_count":21571636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batching","benthos","knative","kubernetes","sentiment-analysis"],"created_at":"2024-11-09T01:13:07.514Z","updated_at":"2025-04-28T14:09:41.982Z","avatar_url":"https://github.com/mihaitodor.png","language":"Shell","readme":"# Scalable sentiment analysis on Twitter data using Benthos and Knative\n\nDemo project for the KnativeCon Europe 2022 KubeCon EU co-located event.\n\nThe talk recording is [here](https://www.youtube.com/watch?v=3OaRXwcRJJk\u0026list=PLj6h78yzYM2Mv__LXlfzAAw5WMUTzIvS8) and the slides are [here](https://github.com/mihaitodor/Presentations/tree/master/knativecon_europe/2022-05-17).\n\nBased on Carlos Santana's Knative on Kind (KonK): https://github.com/csantanapr/knative-kind\n\nBenthos with sentiment analysis support: https://github.com/mihaitodor/benthos-vader\n\nTwitter dataset source: https://www.kaggle.com/datasets/crowdflower/twitter-airline-sentiment\n\n## Start Kind cluster and install Knative Serving\n\n```shell\n\u003e ./install_serving.sh\n\u003e kubectl get pods -A\n\u003e watch kubectl get pods\n```\n\n## Deploy the benthos-vader lambda\n\n```shell\n\u003e kubectl create configmap benthos-vader-config --from-file=benthos.yaml=./benthos/benthos_vader.yaml\n\u003e ./deploy_benthos_vader.sh\n```\n\n## Test sentiment analysis\n\n```shell\n\u003e curl -v -X POST -d '{\"text\": \"I love Benthos!\"}' http://benthos-vader.default.127.0.0.1.sslip.io/post\n```\n\n## Run Postgres and populate the SOURCE table\n\n```shell\n\u003e docker run --rm -it -p 5432:5432 -e POSTGRES_PASSWORD=password postgres\n\u003e # Populate SOURCE table in DB\n\u003e ./populate_db.sh\n\u003e # Connect to DB\n\u003e pgcli postgres://postgres:password@localhost:5432/postgres\n\u003e\u003e SELECT COUNT(*) FROM SOURCE\n```\n\n## Run Prometheus\n\n```shell\n\u003e prometheus --config.file=prometheus.yaml\n\u003e http://localhost:9090/graph?g0.expr=rate(output_sent{}[10s])\u0026g0.tab=0\u0026g0.range_input=5m\n```\n\n## Run Benthos batch workflow\n\n```shell\n\u003e time benthos -c ./benthos/benthos_batch.yaml\n```\n\n## Teardown\n\n```shell\n\u003e kind delete cluster --name knative\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihaitodor%2Fknative-benthos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmihaitodor%2Fknative-benthos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmihaitodor%2Fknative-benthos/lists"}