C
C#•8mo ago
Pete.

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
Jimmacle
Jimmacle•8mo ago
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?
Pete.
Pete.OP•8mo ago
Let me explain on drawing, wait a sec
Pete.
Pete.OP•8mo ago
No description
Lukaa
Lukaa•8mo ago
do you use cpp on pi? if so you dont need a webapi, use RPC
Pete.
Pete.OP•8mo ago
still thinking about .net 8
Jimmacle
Jimmacle•8mo ago
why not run the whole thing as a single application on the pi? are you trying to support multiple pis?
Pete.
Pete.OP•8mo ago
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
Jimmacle
Jimmacle•8mo ago
tbh i'm still trying to understand which part of the project you need help with it sounds like all of it
Pete.
Pete.OP•8mo ago
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
Angius
Angius•8mo ago
Sure can
Jimmacle
Jimmacle•8mo ago
blazor server isn't relevant to setting up a web API
Pete.
Pete.OP•8mo ago
I can set it up next to it too
Jimmacle
Jimmacle•8mo ago
i'm saying whether you want to use blazor server or not doesn't change how you design the API
Pete.
Pete.OP•8mo ago
Ok I will separate it
Jimmacle
Jimmacle•8mo ago
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
Pete.
Pete.OP•8mo ago
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
Jimmacle
Jimmacle•8mo ago
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:
Pete.
Pete.OP•8mo ago
i need just little advice, rest things I know how to code... 😛
Angius
Angius•8mo ago
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
Pete.
Pete.OP•8mo ago
Thank you - I will demonstrate demo here soon 🤩
Want results from more Discord servers?
Add your server