Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qneyrat/web-pubsub-example
:rocket: Web pub/sub architecture example
https://github.com/qneyrat/web-pubsub-example
example go postgresql rabbitmq symfony websocket
Last synced: 2 months ago
JSON representation
:rocket: Web pub/sub architecture example
- Host: GitHub
- URL: https://github.com/qneyrat/web-pubsub-example
- Owner: qneyrat
- License: mit
- Created: 2018-01-12T13:19:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-13T23:03:17.000Z (almost 7 years ago)
- Last Synced: 2024-06-21T18:55:53.951Z (6 months ago)
- Topics: example, go, postgresql, rabbitmq, symfony, websocket
- Language: PHP
- Homepage:
- Size: 338 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web Pub/Sub Architecture
Example with simple chat## ARCHI:
![schema](docs/schema.png)## Start project:
* Copy env vars in wsb:
```
> $ cp wsb/.env.dist wsb/.env
```
* Setup wsb and client (download vendor files):
```
> $ go get -u github.com/golang/dep/cmd/dep # if dep is not already installed
> $ dep ensure
```
* Start containers:
```
> $ docker-compose up
```
* Create database and setup API:
```
> $ docker-compose exec php composer install
> $ docker-compose exec php bin/console doctrine:schema:create
> $ docker-compose exec php bin/console app:setup
```
* Setup RabbitMq:
```
> $ docker-compose exec rabbitmq sh /etc/rabbitmq/setup.sh
```* Restart containers:
```
> $ docker-compose up
```## Run CLI Client:
* Get dependencies:
```
> $ cd client
> $ go get .
```* Start Chat with user test1:
```
> $ go run main.go auth test1 test1 --api=symfony.dev --ws=localhost:4000
yo
```* Start Chat with user test2:
```
> $ go run main.go auth test1 test1 --api=symfony.dev --ws=localhost:4000```