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] user interface #18

Open
kalutheo opened this issue Jul 30, 2020 · 14 comments
Open

[feat] user interface #18

kalutheo opened this issue Jul 30, 2020 · 14 comments
Labels
enhancement New feature or request

Comments

@kalutheo
Copy link

Hello, this library looks great :) . I'am currently using agenda which provides a UI that helps to monitor jobs , retry them etc... Does Bree provides a User Interface like that ? What is the best practice or recommendation you have to connect a UI with this job scheduler ?

@niftylettuce
Copy link
Contributor

Since we recommend using Cabin, and Cabin will soon have a dashboard (with free plans), you could use the Cabin dashboard to monitor your jobs. It will all be open-source, and this would not only be a helpful real-time dashboard for jobs/bree, but also your entire app in general.

https://cabinjs.com

I will comment here again when it is released publicly (the dashboard/website that is).

@niftylettuce niftylettuce changed the title User interface [feat] user interface Aug 18, 2020
@alexander-mart
Copy link

@niftylettuce Where is can watch any updates about Cabin Dashboard?
Official site cabinjs.com has no mention about it yet.

@niftylettuce
Copy link
Contributor

If you shoot me an email [email protected] I will notify you, or you can go to https://github.com/cabinjs/cabin and click on subscribe:

Screen Shot 2020-09-15 at 3 50 02 AM

@naz
Copy link
Member

naz commented Dec 2, 2020

Although Cabin can provide a UI to somehow monitor job execution I think it would be to a great benefit for bree to expose an API to build a custom UI on top of it (sidekiq and resque UIs come to mind)

The main benefit of having a custom UI would be allowing to quickly answer questions around current overall state of jobs in the system, examples are:

  • how many jobs are in the queue awaiting execution?
  • which jobs are scheduled for future execution?
  • which jobs have failed and why?
  • allow to retry jobs through an interface

Many more questions come to mind.

Cabin is a logger which is just that - a log of events that already happened. It takes a considerable effort to make sense out of such data.

@shadowgate15 shadowgate15 added the enhancement New feature or request label Mar 20, 2021
@mpmartins
Copy link

Do you guys have any updates about this? I feel like a nice ui to monitor jobs and maybe change some scheduling rules at runtime would be perfect.

@shadowgate15
Copy link
Member

No updates. However, I have been thinking on this.

One of the core pieces of bree is that it is designed to be a job scheduler not a manger. Hence, why it does not use a database layer like agenda, bull, etc...

In order to build a ui/api that would persist changes at runtime across server shutdown, we would need to drop this agnostic approach. Perhaps it makes sense to provide the ui/api like agenda does with agendash and agenda-rest. This would then allow us to add specific supports for persistence.
Or does persistence even matter?

Thoughts are welcome.

@niftylettuce @naz

@mpmartins
Copy link

mpmartins commented Jun 7, 2021

Here are my 2 cents.
Hope it helps you guys.

On my project, I was thinking on running a simple express server in parallel that serves the state of the bree object in memory in an endpoint.
The UI could just render that and shows the current state.

Also, this express server could accept websocket connections to listen to all events generated by the bree object and the UI could show the current behavior of the scheduler.

My point is, I really like how simple and elegant Bree is. I does really well what it does. No unnecessary features. I recommend keeping it that way. No separate state management.

Btw, my jobs need to connect to my backend and I manage their state myself. Even if my bree instance goes down, I can just restart it and the jobs will pick it up from where they left off.

@shadowgate15
Copy link
Member

@mpmartins the backend handling the state of the job is the way Bree is designed and is how it remains state management agnostic.

This is also how I for see a dashboard being created for Bree. Which to me seems as though it would be better for the user to generate instead of the Bree team providing one, even as a separate optional package.

Bree provides complete access to the module all the user needs to do is attach it in a way that the instance of Bree is accessible within the context.

One thing that might be beneficial is to provide some getter/setter helpers for things such as filtering jobs, getting active workers, etc.

@shadowgate15
Copy link
Member

Alright everyone. been working on an api for bree, so checkout the implementation give me feedback. Will work on a TUI, CLI, and GUI soon.

@nikosgpet
Copy link

The API doesn't seem to be available in the npm store as its documentation suggests. Is it still supported ?

@shadowgate15
Copy link
Member

So sorry about that v1 is now pushed. Let us know of any issues or feature requests over there! And PR are always welcome!

@mihai-vlc
Copy link

Here is a small dashboard I built on top of bree: https://github.com/ionutvmi/bree-dashboard

It's not packaged as a plugin but I am posting it here in case someone else might find it useful.

@niftylettuce
Copy link
Contributor

This is impressive @ionutvmi - can you email me at [email protected]?

@mgara
Copy link

mgara commented Feb 8, 2022

@ionutvmi clean dashboard :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants