Replies: 1 comment 2 replies
-
|
Just for clarification I have not implemented a full production ready event bus system with serverless. I am just pretty sure it is possible in theory and with some experimentation I have done. It is not desirable to take that approach for high performance workloads and the ideas in that writeup are more so that blitz could theoretically use them as a non vendor stopgap during development until apps were ready to substitute for proper systems such as sqs, rabbitmq, kafka, redpanda etc. So you should use a proper vendored serverless message queue and a websocket provider(Eg. Pusher). It will be quick it will work and it will scale. If you just want to see what is possible with serverless functions only as an experiment you can create a naive event bus using polling on the frontend to read ordered events from a db in a serverless function. I prefer portable architectures and I have written a system that calls various vercel serverless functions from an eventdispatcher function all over http so I don't need to use any proprietary systems. It worked although you have to be careful to implement security so that only your event dispatcher can call your listeners (you can use jwt to authenticate) some systems like aws allow you to colocate serverless functions in private networks so you would not need to authenticate. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Probably you have heard this question many times, however, I too am at a point where I need to implement notification system to update user. However, I am not sure where to even begin.
Some of my questions are:
I imagine, the backend is purely for notifications and sits on the side. Otherwise, the existing way of BlitzJs will continue as it is, i.e, the front-end communites with the serverless for data.
While searching, I came across this interesting link where ryardley, the author, discussed they initially implemented an event bus system with serverless. I would love to hear how that can be done, it is possible to have some kind of polling / web-socket implementation to notify user without a backend server?
Beta Was this translation helpful? Give feedback.
All reactions