From 4f816318b6672d40f23b22ca44cc06b77cadf961 Mon Sep 17 00:00:00 2001 From: mjkwiatkowski Date: Mon, 23 Feb 2026 12:05:58 +0100 Subject: feat: added a working connection to Redis, and a scaffolding for the RESTful API --- README.md | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 55448b73..429af1d7 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,21 @@ ### Dependencies -Paths are hardcoded. Be aware the project will only work with this OpenDC as there are hidden Maven dependencies. Kafka topic should be named `postgres_topic`. Confluent local (see https://www.confluent.io/installation/): -```bash -export CONFLUENT_HOME=/opt/confluent -export PATH=/opt/confluent/bin:$PATH -cd /opt/confluent -kafka-storage random-uuid -kafka-storage format -t 2vi2WtHxQAOPyXb1Bj1Jvw -c $CONFLUENT_HOME/etc/kafka/server.properties --standalone -kafka-server-start $CONFLUENT_HOME/etc/kafka/server.properties -schema-registry-start $CONFLUENT_HOME/etc/schema-registry/schema-registry.properties -connect-standalone $CONFLUENT_HOME/etc/kafka/connect-standalone.properties $CONFLUENT_HOME/share/confluent-common/connectors/sink-jdbc.properties -``` +PostgreSQL (see https://www.postgresql.org/) Confluent JDBC sink and source (includes Postgres connector) (see https://www.confluent.io/hub/confluentinc/kafka-connect-jdbc) Be mindful to configure the right `plugin.path` in `etc/kafka/connect-standalone.properties` -```bash -ln -s /home/matt/git/opendc/resources/experiments/sink-jdbc.properties /opt/confluent/share/confluent-common/connectors -``` - -Protobuf: -extra/protobuf 33.1-3 +Protobuf (see https://archlinux.org/packages/extra/x86_64/protobuf/) You need to run this each time you change `schema.proto` ```bash cd resources/experiments/ protoc --java_out=/home/matt/git/opendc/opendc-common/src/main/java/ schema.proto curl -X DELETE http://localhost:8081/subjects/postgres-topic-value -``` - -Postgresql: - -extra/postgresql 18.1-2 - -```bash -initdb -D /var/lib/postgres/data -mkdir /run/postgresql/ -cd /run/postgresql/ -touch .s.PGSQL.5432.lock -chown -R postgres:postgres /run/postgresql -``` - -Random -```bash -bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic postgres_topic -bin/kafka-topics.sh --create --topic postgres_topic --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1 -bin/kafka-topics.sh --list --bootstrap-server localhost:9092 -bin/kafka-console-consumer.sh --bootstrap-server :9092 --topic postgres_topic --from-beginning -``` +``` \ No newline at end of file -- cgit v1.2.3