#trying to get a clear understanding on which architectural pattern to adopt for my app

12 messages · Page 1 of 1 (latest)

fossil osprey
#

hey there, i hope you're doing fine.i find myself in dispute when it comes to using vue & laravel seperately as like the frontend consumes the backend as an api or using vue & laravel simultaneously, meaning that vue is ssr & using laravel; what i wanna make is an uptime monitor, something like ohdear but just as a side project, to showcase my skills....

tell me what you think cause idk how was ohdear built specifically (just making a reference here) or like uptime kuma.

vocal kettle
#

Question is; does it really matter what those are built with? The frontend would just be displaying the data. I'd focus on the logic, the backend, how you'd do monitoring, how you'd scale that

fossil osprey
#

scale the app? to be honest no idea.

fossil osprey
vocal kettle
#

Okay, and how would that work? Jobs fired by crons? What if there's 50 sites to check and you have just a minutely ping check, that's 50 pings per minute. Add a content/status check, you're at 100, with 50 of them having potentially long response times. Then what would you do if one fails, when would you notify, would you keep checking etc.
I'd say, those are way more important things to figure out, that's the foundation of what you're trying to build, you want your checks to be reliable, not a fancy UI

fossil osprey
# vocal kettle Okay, and how would that work? Jobs fired by crons? What if there's 50 sites to ...

a content check is by itself a status check, if i check for content i indirectly check for status (the http code status might be 200 but if the content of the page doesn't include the wanted keyword i'd call it a failed check)

for the 50 websites getting pinged i kinda see the problem since the scheduler count for minute (it waits until a minute passes and calls the ping function 50 times for each website) ; idk if like i switched the checking to like a node instance; javascript has *setInterval* where it gives you the granularity to control even in milliseconds since cron jobs doesn't support seconds yet;

idk really maybe use the Ev php library

#

the events that the checks wouldn't be interactive if they were server-side-rendered, cause it send the generated template once and it should trigger a new window.reload or something to get the new value so i guess js would help here (vue) with websockets

vocal kettle
#

Is it the same tho? What if one has a cache, such as CloudFlare, in front of it? Then you're checking if the cache is valid, not pinging if the server is alive.
But yeah, that's what I mean, you asked which frontend to use, while that imho doesn't show skill (if you're looking for backend / full stack). Thinking out all those intricacies, the actual architecture of such an app. Why would frontend have a priority then? Your checks wouldn't work if the app is closed then

#

It's like wanting to build a house and the first thing focussing on are the curtains

fossil osprey
vocal kettle
fossil osprey
#

one last thing, here's why i was asking which to pick:

  • one blade file serves the vue app: it will be client side rendered but i wouldn't get the benefit of like middlewares & stuff like that that laravel provides with it's stack but the vue context will be shared like state and so on.
  • each blade file serves a different vue page: i will get the benefit of routing & also the interactivity that i need but the app wouldn't be sharing the same vue context, like i'll be making bunch of vues mini apps like .