Open kalutheo opened 4 years ago
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.
I will comment here again when it is released publicly (the dashboard/website that is).
@niftylettuce Where is can watch any updates about Cabin Dashboard? Official site cabinjs.com has no mention about it yet.
If you shoot me an email niftylettuce@gmail.com I will notify you, or you can go to https://github.com/cabinjs/cabin and click on subscribe:
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:
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.
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.
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
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.
@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.
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.
The API doesn't seem to be available in the npm store as its documentation suggests. Is it still supported ?
So sorry about that v1 is now pushed. Let us know of any issues or feature requests over there! And PR are always welcome!
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.
This is impressive @ionutvmi - can you email me at niftylettuce@gmail.com?
@ionutvmi clean dashboard :D
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 ?