Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(serverless,dashboard): add Cron Functions #920

Merged
merged 8 commits into from
Jun 3, 2023

Conversation

QuiiBz
Copy link
Member

@QuiiBz QuiiBz commented Jun 3, 2023

About

Support back Cron functions!

@changeset-bot
Copy link

changeset-bot bot commented Jun 3, 2023

🦋 Changeset detected

Latest commit: c42af27

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@lagon/dashboard Patch
@lagon/serverless Patch
@lagon/docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ❌ Failed (Inspect) Jun 3, 2023 2:02pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2023 2:02pm
storybook ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2023 2:02pm
www ⬜️ Ignored (Inspect) Visit Preview Jun 3, 2023 2:02pm

@QuiiBz QuiiBz marked this pull request as ready for review June 3, 2023 14:02
@QuiiBz QuiiBz merged commit 10d4086 into main Jun 3, 2023
@QuiiBz QuiiBz deleted the feat/serverless-dashboard-cron branch June 3, 2023 14:10
@QuiiBz QuiiBz mentioned this pull request Jun 3, 2023
@akitaSummer
Copy link
Contributor

@QuiiBz
Has our Cron Functions taken into account the distributed scenario of single-region multiple instances? I took a quick look at the code and it seems to be implemented using the Cronjob functionality provided by Tokio on the host machine. But in a distributed scenario, each instance will execute the Cron Functions, which may not be correct. Shouldn't we use RabbitMQ's delayed queue to implement Cron Functions?

@QuiiBz
Copy link
Member Author

QuiiBz commented Jun 4, 2023

Has our Cron Functions taken into account the distributed scenario of single-region multiple instances?

No, for a few reasons:

  • each region currently has a single instance running (yes, this isn't ideal, but I don't have the funds to do more than that, considering that Lagon doesn't have yet paying customers)
  • it was a lot simpler and easier to do it using the simple way
  • it works well for the current needs, the goal isn't to make every feature future-proof for growth

Shouldn't we use RabbitMQ's delayed queue to implement Cron Functions?

I'm not too familiar with RabbitMQ, but yeah there are a lot of ways to make this system "better" (more scalable, in the exchange of complexity). This isn't the priority at all right now but would be interesting to compare different solutions to find what we could use later to improve this system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants