Code Monkey home page Code Monkey logo

goserver-demo's Introduction

YACA (Yet Another Chat App)

Example messaging application that can be easily scaled to high traffic.

Instructions

  1. Install Docker.

  2. Set HOST_IP environment variable with:

    export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 \
        | awk '{print $2}' | cut -f2 -d: |head -n1)
  3. Bring up the containers with docker-compose up -d.

  4. Wait about 10 seconds or so while Kafka and Zookeeper start up.

  5. Create the Debezium Connector for the Postgres database:

    curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" \
         localhost:9090/connectors/ -d @connectors/postgres-connector.json
  6. Run docker-compose up -d again, since the pusher service depends on the Debezium Connector.

  7. Navigate to localhost:3000.

  8. Type messages into the message box and hit the Send button. You should observe messages return to the browser. If you open multiple tabs, then you should each message on each tab.

Technologies

  • Postgres database
  • Debezium Postgres Connector for events using the Postgres WAL
  • Kafka for message passing
  • Redis for session management
  • Golang for the web server and Kafka consumer

goserver-demo's People

Contributors

ritmatter avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.