poundifdef / smoothmq

An improved drop-in replacement for SQS
https://www.smoothmq.com
GNU Affero General Public License v3.0
2.04k stars 35 forks source link

Please add tests, also check out my fork which greatly improves this repo and has a python/js test suite #16

Open zackees opened 2 months ago

zackees commented 2 months ago

This is my fork of your repo.

https://github.com/zackees/SmoothMQ

While your repo kinda works but is not really tested and doesn't work on Render/DigitalOcean, mine does. Additionally, I have added nginx and added auth so that the codebase can be put on the public web. I've also implemented persistent storage of the sqlite data at /var/data so a disk/volume can be attached so that the queue can survive reboots/redeploys

Here is a change list:

// const AWS = require('aws-sdk');  // this is replaced by sqs-legacy-adapter
const AWS = require('sqs-legacy-adapter');
poundifdef commented 2 months ago

Thanks for spending so much time looking through the code. Are you okay with me picking and choosing bits to copy in?

For example, I wouldn’t use nginx for basic auth, instead keeping that code in go, but deletes are looking good and I’d love to add that.

zackees commented 2 months ago

Yeah absolutely. I made this fork public to give back to you. Notice that I massively speed up the docker rebuild by putting the incremental building of the go project as different cache layers.

testing

The install stuff at the root of the project is to install the python dependencies for testing. I originally tried to put this stuff in the test/py directory, but VSCode refuses to invoke the debugger unless it's at the root, for some reason.

By the way, the speed of these improvements was made possible because of my advanced ai coding assistant. You should check it out:

pip install advanced-aicode

poundifdef commented 1 month ago

Thought you'd be interested in some updates that are now in the main branch:

Here's a working render.yaml:

services:
  - type: web
    runtime: docker
    name: smoothmq
    repo: https://github.com/poundifdef/smoothmq.git
    healthCheckPath: /
    envVars:
      - key: PORT
        value: 8080
      - key: Q_SERVER_USE_SINGLE_PORT
        value: true
      - key: Q_SQLITE_PATH
        value: '/data/smoothmq.sqlite'
    disk:
      name: smoothmq-data
      mountPath: /data
      sizeGB: 1
zackees commented 1 month ago

This is amazing!

Did you see my code samples for testing the api? This is something you might want to include since a lot of people are using javascript and your solution was only tested in python.