All Questions
Tagged with architecture api-design
76
questions
1
vote
1
answer
149
views
REST API with swappable backends
What would be the best way to have a single REST API but with multiple "backends" (Not sure if this is the correct terminology)? Currently we have a basket/cart API that handles product ...
0
votes
1
answer
66
views
Designing a restful API for a desktop application to facilitate communication with other APIs
Just for some context, I am a CS student in my second-year who is working on a C++ desktop application (using the Qt framework) made by an engineering professor.
The application is an educational tool ...
1
vote
2
answers
63
views
Hierachy and API design for a CSS-selector-related Python library
I'm writing a Python CSS-selector library that allows one to write these kinds of expressions in Python as a pet project. The goal of the library is to represent selectors in a flat, intuitive and ...
0
votes
1
answer
475
views
Is it okay to combine bff and rest api?
I'm building an application related to donation on streams.
And I have such models as "alert" and "alert-template".
"alert" is a set of different parameters to understand ...
0
votes
1
answer
150
views
How to improve a monthly usage quota system for an API with growing number of users?
Couple of years ago, I designed an API service which has a limit on the number of requests per month per user. To track the monthly usage of each user, I used a table called monthly_usage. The table ...
0
votes
1
answer
140
views
Best practices to link, associate, or abstract similar but different entities together
What are the best practices that I can follow that can simplify or help abstract out entity modeling when there are many similar but different entities?
I have a large game system with different types ...
4
votes
1
answer
3k
views
What are the best practices in public API vs internal only API being on the same service
I wanted to understand what are the best industry practices and the pros-cons in the following 2 choices:
A single service that serves internal only API and public API, vs
2 separate services - one ...
0
votes
1
answer
105
views
Best way to calculate profit/loss with historical data
Problem
I need to build a profit/loss graph for a mobile app. The api from which I can get the historical price data only allows me to retrieve 1 item at a time. If the user has 500 items that would ...
1
vote
2
answers
415
views
MVC-like architecture: Model-Controller communication of results/status
I'm struggling on designing a solid architecture for my project.
In particular, I don't know how to handle the communication between the models and the controllers.
My goals are:
Following the ...
0
votes
3
answers
805
views
Should I separate the public and private portions of an application into two separate apps?
So I'm currently running an analysis task for my company. I won't go into too much detail but we are dealing with medical records and other confidential data. Previously this application was only used ...
0
votes
2
answers
211
views
Who to manage AAA , gateway or business service
In a debate with our solution architect, there were 2 proposed solutions to handle (illustrated below on the figure)
In the first, the API Gateway manages Authentication, Authorization and Accounting ...
3
votes
2
answers
2k
views
Communication between two apps
I am thinking of creating two applications, one of which (App 1) will be in Django (DRF) and other (App 2)might be Django but might be another more lightweight framework (maybe Flask or plain Django ...
0
votes
1
answer
608
views
Expose or consume API REST?
I am preparing the software architecture for my client project based on APIs REST
The idea is that any data exchange between my client and his partner will be via API REST call
The specification is ...
1
vote
1
answer
451
views
What design pattern to implement notifications for a .NET application?
I have an ASP .NET web application dashboard that is used to send notifications to several .NET desktop clients. The current implementation is that the web app writes the new notification to a ...
-1
votes
1
answer
285
views
How to design "define-by-run" API?
I am amazed by the way APIs of some machine learning packages are designed, namely Chainer's and Pytorch's "define-by-run" API. Even Optuna, a hyper parameter tuning library has "define-...
2
votes
0
answers
356
views
Drawing the boundary between high level API and low level API
Assume that were developing a cross platform graphics engine. Now we have quite a lot of low level APIs to choose from (OpenGL, Vulkan, DirectX 11, DirectX 12, ...). Now because of this, we are gonna ...
0
votes
0
answers
75
views
Is it a good idea to have separate instances for the public API Server and API Server used by the Web App?
I've built a React Web application with an Express REST API server and Firebase Auth. Also, Nginx is set up as a reverse proxy, so API calls from React to https://mydomain.com/api are routed to ...
0
votes
1
answer
260
views
What should we consider when designing a load balancer with minimum cost
Given a set of processes running on a cluster of hosts, I'm designing a system that load balances the hosts through live migrations (carried out by an external service) of the processes.
The goal of ...
2
votes
1
answer
181
views
Building a Microservices App -- Can you give feedback on architecture?
I did some googling, and I was directed to Software Engineering to ask architecture questions. If you know of a different forum that could help me, please direct me to it
I recently started learning ...
0
votes
2
answers
234
views
Structuring optional REST resource hierarchy
I am designing a REST service with multiple end points which will be servicing the following hierarchy:
Department has many Category Groups
Category Group has many Category(-ies)
Category has many Sub-...
1
vote
1
answer
385
views
Architecting multiple codebases calling our public API + private API for first-party applications
Currently, we have the issue where we have two codebases (API & Website) calling the same database (along with some duplicate business logic) and we want to streamline this so all requests are ...
1
vote
2
answers
131
views
Photo Library Service: What should be right way of photo library using AWS S3 and Java
I want to make a service that is supposed to upload Photos in S3 and make them available using a link.
I have few design plans for my service.
PLAN 1:
Upload photo to my REST API which will update ...
0
votes
2
answers
579
views
User-friendly parameter parsing from yaml
Problem
I have designed an evaluation tool (in python) and need some help to make it more user friendly. The tool requires ~100 (nested) parameters, which it gets from a yaml file and stores ...
0
votes
2
answers
236
views
API versioning at BackEnd - Declare the versioning(v1) at global level or at each controller/method level?
If I keep versioning at the global level then it would save the clutter at each controller level,
// main.js
main() {
registerGlobalRoutesPrefix("/api/v1");
}
// controller1.js
@Route("controller1-...
2
votes
0
answers
108
views
How to design job-handling for API
I am not sure if this is the correct place to ask, please direct me to the correct place if this is not it.
Context
I have written a do-all, keep-all, serve-all API (it started small, then grew out ...
3
votes
1
answer
873
views
Does it make sense to apply interface segregation to a facade?
In my project, we have a couple different back-end APIs/endpoints that are called by the same front-end page at different times. All of these endpoints are sort of related to the overall "theme" or "...
9
votes
2
answers
957
views
How to design microservices with large number of joint entities outside of the domain border?
I'm working on breaking down a monolith application in smaller applications or microservices. Like always, sometimes it's easy and sometimes it's harder to identify domains and split those into ...
0
votes
0
answers
155
views
Creating a webhook server / sender
I'm now working with an API project, where I'm developing new API endpoints and the final result at the end of the life cycle is as follows: a client should receive updated data out of what it sent to ...
2
votes
1
answer
110
views
Atomicty with two points of failure
Lets say we have an API that receives requests to commit a money transaction.
The API receives the requests from a certain client and calls for a certain 3rd party service (lets say provided by the ...
-2
votes
1
answer
48
views
Endpoint returning only new and updated records
let me state some items.
I have this endpoint that returns a list of objects, and I would like to return only the changed ones.
I have an App calling this endpoint that caches this list, and today it ...
1
vote
1
answer
292
views
mongodb queries architecture - resolving lots of nested referenced objects
I have an angular 8 application, with a Python + MongoDB API on the backend.
At present, I have 4 collections, namely: Users, Tasks, Companies and Groups.
All of these resource types are retrievable ...
1
vote
2
answers
2k
views
Incorporate a background job enqueue endpoint in a REST API
To exchange data between our standalone frontend application and the backend API, we currently have a REST API, with standard endpoint to list/create/update/destroy ressources with a consistent naming ...
0
votes
2
answers
70
views
Develop based on my current requirements only? [duplicate]
I've a service called Claims-Service which has following signature:
IClaimsService { EnsureClaim(claimType, userId) }
It queries database to see if the claim is present in any of my roles or not.
...
1
vote
2
answers
2k
views
REST API Client Library Design
I'm working on a reusable client library to abstract a REST endpoint that we use in many of our in-house applications. It is actually split into 3 APIs, and certain endpoints/resources require ...
0
votes
1
answer
2k
views
Exposing complex actions using http verbs in REST API
consider the following REST resource Account
{
number:"number-000",
name: "name",
customer : {},
type : {},
status : "status",
balance : 0,
rating : 0....
2
votes
1
answer
232
views
Keep Hitting 3rd party API or Store Commonly Queried Data In DB?
Colleague and I have begun a long (and hopefully fruitful) project. I've been building and have come to my first crux, and now I ask the experts of the Stack Exchange for their guidance.
I'll keep ...
3
votes
5
answers
2k
views
Which layer should have responsibility for rounding numbers?
I am developing a financial system and want to have a defined policy for rounding monetary values.
Given the following layers:
View
API
Entity Model
Persistence
If I am passing a monetary value ...
1
vote
1
answer
2k
views
Why read and write API are good or why not?
While designing a complex system some of my colleges came back with the idea of having two separates APIs, one that will perform the writes into de databases and another one that will only do the ...
0
votes
1
answer
277
views
How to Redesign and scale legacy MVC application
I’m working with legacy web app for managing an animal shelter which need to be rearchitected/redesign, so it can scale and be possible to deploy in a central location.
Currently it's physically ...
1
vote
1
answer
142
views
Board support driver for custom board - API design - MCU resource configuration
I have got to implement a board support package for a custom board, and I would like to know your opinion about the different approaches of designing board support drivers. My custom board pupulates ...
-1
votes
1
answer
80
views
APIs: Many minimal ones or a few bigger
I'm currently working on a project/product which consists of ~60 REST APIs and one client (Web app)
I find many downsides on this design, and not so many benefits, and I'd like to know if this is ...
-1
votes
1
answer
292
views
Should I use a strongly typed programming language for an integration with a JSON RPC 2.0 API?
I have to integrate with another company's API, which they unfortunately decided to write in JSON RPC 2.0.
If you're not familiar with JSON RPC, it's a lightweight RPC protocol that defines a ...
5
votes
1
answer
1k
views
API design and storing custom queries from Db to cache
I was thinking about how people actually implement utilising results from a cache before a doing database lookup. When designing an API, should there always be a manual check to the cache first before ...
2
votes
0
answers
83
views
API Architecture Decision on Authorization & Validation levels
We are designing an authorization mechanism for a Product API where users have their own claims.
The api has a patch request like this:
PATCH https://product-fcd.com/api/product -d {"Products": []} -...
2
votes
2
answers
217
views
Should a POST endpoint in a REST API allow the inclusion of related resources?
Given the following REST endpoints:
(GET, POST) /api/v2/employer
(GET) /api/v2/employer/{id}
(GET, POST) /api/v2/employer/{id}/employees
Should a consumer of this API have the ability to ...
1
vote
1
answer
479
views
B2B vs B2C services - are differences purely relates to business process and flow OR are there differences also in technical architecture?
I have some B2B services already exposed to customers who manufacture products and ships to end consumer.
These B2B services are implemented using asp.net web API and is performant enough to handle ...
10
votes
2
answers
4k
views
Alert System Architecture
I would like to create a system which handles alert messages from various programs and can process those alerts to down-wind consumers via email. This would all be contained over one internal network. ...
32
votes
4
answers
12k
views
Microservices and data storage
I'm considering moving a monolithic REST API to a microservice architecture, and I'm getting a bit confused about data storage.
As I see it, some of the benefits of microservices would be:
...
0
votes
1
answer
110
views
Where should I generate response for api?
I have multiple Models(Models in MVC), These models are injected into repositories and repositories are injected into Controllers. I need to create an api for several endpoints. The responses for ...
1
vote
3
answers
648
views
RESTful one or many
What's a good way to design a RESTful URL pattern to get one and many results by ID ?
One (Response: single item)
/invoices?id=a/b
Many (Response: array of items)
/invoices?id=a/b&id=bar
The ...