Architecture problem
Hi!
I am struggling with an architecture of my solution so I am here to ask on forum. 🙂 Basically I want to create webAPI based interface which is connected with Blazor Server website.
And over here I have got client - RaspberryPi as data provider and client. Blazor server works as data dashboard and also doing stuff connected to adding new devices on RPi. Could you give me hints how I can program creation of new peripherals for RPi using REST?
20 Replies
you're combining a lot of different problems instead of focusing on one at a time
what exactly do you mean by "creation of new peripherals for RPi using REST?"
why do you need a web API if you're using blazor server?
Let me explain on drawing, wait a sec
do you use cpp on pi? if so you dont need a webapi, use RPC
still thinking about .net 8
why not run the whole thing as a single application on the pi?
are you trying to support multiple pis?
yes i want to have multiple support in the future
that is the reason, i can host everything on the pi, but i have limitation in db choice (cannot be mssql tho)
To be honest I am using oldest Pi (I have 100% chance to have performant code which can be installed on newest ones)
Rpi2
1GB of RAM is real threat and also connected users too
maybe... you got right to host blazor server and peripheral app on same device, but if I want to expand I will have a big trouble
I need an idea to make it run, I can write the code, but I have no idea to make it like on schema
tbh i'm still trying to understand which part of the project you need help with
it sounds like all of it
I need an confirmation, that I can create API client on Pi and API server on Blazor server.. Is it good idea? That's all I think I need I am not an architect
Sure can
blazor server isn't relevant to setting up a web API
I can set it up next to it too
i'm saying whether you want to use blazor server or not doesn't change how you design the API
Ok I will separate it
that's... not what i'm saying
the blazor server components and web api components can run as part of the same application but they don't really affect each other
Ok, now I understand.
Last question what I have - how you will solve adding new device via API form and send it to Rpi via API?
I want to pass an id, type, pin, description, pinmode and if something I missed I will add too
think about it and see what you can come up with
you're kind of asking me to figure out half your project for you :LUL:
i need just little advice, rest things I know how to code... 😛
I'd have a dashboard in your control panel app, the Blazor Server one I assume. You paste an address of a given RPi and add it to some database
Thank you - I will demonstrate demo here soon 🤩