Coder Social home page Coder Social logo

dsha256 / plfa Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 131 KB

Pragmatic Live Feed Aggregator aggregates all available live tables and delivers to web clients on demand in one big batch.

License: MIT License

Go 96.12% Dockerfile 1.28% Makefile 2.60%
docker go golang gorilla-websocket goroutines mock mockgen pusher unittesting websocket

plfa's Introduction

Welcome to David's profile!

πŸ™‹β€β™‚οΈ Connect with me

Github Discord Buy Me a Coffee

πŸ“Š Github stats

dsha256's Github Stats dsha256's Top Languages

πŸ› οΈ My favorite tools

πŸ‘¨β€πŸ’» Languages

Go Python C Solidity JS HTML5 CSS3 SQL

🧰 Frameworks and libraries

Selenium NumPy Pandas Django GORM EntGo GIN OpenCV Selenium Selenium Selenium

πŸ—„οΈ Databases & Message Brokers

PostgreSQL SQLite Oracle MySQL REDIS RabbitMQ MOngoDB

☁ Cloud hosting

Google Cloud Heroku Repl.it Digital Ocean

πŸ’» Software and tools

Docker GIT Jupyter Conda PyCharm CLion GoLand Postman NGINX JWT Markdown PYPi Swagger GNU Bsh Jira

πŸ’» My favorite operating systems

Linux Ubuntu Debian Windows

πŸ’» Interests

BTC ETH

πŸ”₯ Streak stats

DenverCoder1's streak

plfa's People

Contributors

dsha256 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

xyzgeforce

plfa's Issues

Fix `RunAndListenClient`

Problem

RunAndListenClient: multiple goroutines across multiple runs of RunAndListenClient are reading from the β€œdone” channel, and which one will receive something from that channel – completely random. As a result, in case of a lost connection, some random goroutine will exit and its graceful shutdown functionality will be lost.


Solution

To avoid such problems, the code should be simple. It’s hard to figure out how this method works because of multiple goroutines
and channels, thus it’s more error-prone. The easier the code, the harder a bug to find a place to hide. This functionality across all the methods and their goroutines can be done with a single context passed from the main. All the goroutines will read from ctx.Done() in select to shutdown gracefully.

Avoid the `env` file baked into the image

Problem

The env file is baked into the image. It’s an arguable topic, but here’s my other opinion: such an approach is ok when a configuration file changes the app’s logic, and the config itself is changed rarely. For example PostgreSQL config file. But the feed aggregator’s config is just URLs, IDs, credentials, and other dynamic data, which do not change app logic, and are changed pretty often. With the current approach, we have to build a new image on every change in configuration, which complicates the delivery workflow.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update alpine docker tag to v3.19
  • fix(deps): update module github.com/stretchr/testify to v1.9.0
  • πŸ” Create all rate-limited PRs at once πŸ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
docker-compose.yml
dockerfile
Dockerfile
  • golang 1.20-alpine
  • alpine 3.18
github-actions
.github/workflows/audit.yml
  • actions/checkout v3
  • actions/setup-go v4
  • ubuntu 20.04
gomod
go.mod
  • go 1.20
  • github.com/felixge/httpsnoop v1.0.3
  • github.com/golang/mock v1.6.0
  • github.com/gorilla/websocket v1.5.0
  • github.com/julienschmidt/httprouter v1.3.0
  • github.com/pusher/pusher-http-go/v5 v5.1.1
  • github.com/spf13/viper v1.15.0
  • github.com/stretchr/testify v1.8.4
  • github.com/swaggo/http-swagger/v2 v2.0.1
  • github.com/swaggo/swag v1.16.1
  • golang.org/x/time v0.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.