C
C#11mo ago
quintendc

internal API

I need the same concept as a web API, but it should not be accessible to other applications. Is using a web API still a good idea or what can I use?
14 Replies
Pobiega
Pobiega11mo ago
How do you define the boundrary between internal and external in this case?
Sossenbinder
Sossenbinder11mo ago
That sounds like a problem to be solved on the network boundary / permission level
Sir Rufo
Sir Rufo11mo ago
"other applications" could also mean applications running locally on the host. We do not know for now
Pobiega
Pobiega11mo ago
Yeah needs more details on what should be able to access the API and what shouldnt and what purpose it serves
quintendc
quintendcOP11mo ago
i have different class libraries that should communicate to each other but i don't want project reference between them, if a class library needs information from another is can access it by the API and handle the response the problem here it will always has to send http requests.
Pobiega
Pobiega11mo ago
That seems really backwards tbh.
quintendc
quintendcOP11mo ago
i was looking to mediatr but it i come to the same problem is you have to reference libraries to each other
Pobiega
Pobiega11mo ago
Having to run an entire webserver just so you can avoid a project reference...
quintendc
quintendcOP11mo ago
i try to make a modular monolith where each module have their own frontend an backend, but not every instance of the application will have all the modules this will break the references
Sossenbinder
Sossenbinder11mo ago
If you have a modular monolith, it would still be a single combined application, so what would be so bad about sharing a "contract" assembly? When you go the other route of sharing data via IPC, your modular monolith turns into a distributed application with all the drawbacks
Pobiega
Pobiega11mo ago
that sounds like a locally distributed monolith :d
Sossenbinder
Sossenbinder11mo ago
If you go the IPC route you also need to make sure every participant is familiar with message contracts for request and response types, and if you don't want to share a common definition assembly, you will also run into versioning problems
quintendc
quintendcOP11mo ago
XD ok i get it, maybe is should indeed go for mediatr instead and accept the reference between the different class libraries
jacobm2778
jacobm277811mo ago
Client Credential Flow
Want results from more Discord servers?
Add your server