-
Notifications
You must be signed in to change notification settings - Fork 11
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
Improvement: Migrate WebAPI from REST to WebSocket #64
Comments
Huh, I wasn't aware that this was available in Frigate, since I don't think it's actually noted in their docs. But that's a good find! I'll definitely look into switching over. This should be a lot better than what I'm doing now, especially if the event payload matches MQTT. Also, just a quick note to say I do appreciate all of your suggestions for improvement. I wrote this a year ago, mostly for my own benefit - but of course I would love if other people found value in this as well. So it's helpful to have feedback & ideas for improvements that aren't things I otherwise might not have thought about. It may take me a while to get to everything, since I don't always have a lot of time to dedicate to this project. So if there's ever something that is more important & would provide an immediate benefit to you - please let me know & I'll do my best to prioritize those. Thanks again!! |
Hi @0x2142,
Yep, because this is the internal Interface Agreement for the Internal API. And that's why I highlighted the pros and cons in advance.
If you agree to stick with WebSocket approach, then in the frigate-notify documentation it will be a good sign to mention the Frigate version what is supported and compatible.
It's ok, every day we battle with ourselves between what we must to do and what we want to do :)
I look at this like to any other product development. You don't have a lot of feedback from users today. For an open source product, it's also a bit of a challenge since you don't even know all your users. Some statistics may help here, such as counting number of downloads for docker images. This issue is not the best place to discuss all these thoughts (seems like the Discussions tab is already required?), but let's categorize the roadmap features (won't let them become links to avoid backlinks):
Now we can decide where this product is and what's most important about it. So, my thoughts are:
Therefore, today it has a good room to make the internal business logic more robust before going to make any UI/user-end-side features as you are not in hurry to put it to market. |
Alongside with the existing public REST API, Frigate has internal WebSocket API mostly used by the UI as
/ws
path.Perhaps, the Interface Agreement of internal WebSocket API might be changed more often than public REST API. But since the same type of event serialization is used here as for the MQTT payload, the Event information model of frigate-notify can be unified.
Here are several WebSocket messages when the camera caught the 2nd person, while the event for the 1st person had already been alerted:
In most cases, WebSocket integration allows getting rid of the MQTT bus while keeping the same pace of event notifications.
This can also help overcome the trouble with different data format that was shown at #54 (comment).
The text was updated successfully, but these errors were encountered: