/r/softwarearchitecture

Photograph via snooOG

Dive into discussions on designing, structuring, and optimizing software systems. Share insights on architectural patterns, best practices, and real-world experiences.

/r/softwarearchitecture

53,294 Subscribers

1

API & Integration Digest for January 2025

0 Comments
2025/02/02
10:45 UTC

3

How to handle required unnecessary fields in a component/repository's ask object?

Hi all!

I'm working on a project that is leaning hard into craftsmanship/clean architecture. It's my first time truly architecting something that people are really being anal about the architecture for and any help would be appreciated. (It's a rare case where there's not much to do and timelines keep getting pushed back due to outside forces)

The main problematic area takes a list of ids and, - queries a service for the objects by id.

  • backs them up to an internal data store.
  • change one attribute in each object to a static value
  • saves the new object to the original service

The original service has their own SDK, which includes a proprietary version of the object I'm manipulating. I have two repositories/component classes, one for the main data store, one for the backup. The main data store's repo also includes a translation function to go from my version of the object to the SDK version and back again.

I got a prototype that looks fine, but upon actually having it interact with the service, it turns out that there's an undocumented requirement that the service doesn't do updates, it only does overwrites. Since my object only has the attributes we need, it fails when trying to save, since the extraneous attributes are lost returning my version of the object to the use case. My object only has the ID and the attribute.

My initial thought would be either to add those attributes to either a serialized/json string attribute in my object or to add them all to the object, since repositories are staeless.

After talking it over with a coworker, I'm thinking of making a wrapper object that just fits an interface.

I'm just putting it out there to see if there was a better way that I can't see or if there's a better way. I'm thinking we don't need to add that extraneous data to the back up data store.

Thanks for any help in advance.

2 Comments
2025/02/01
20:20 UTC

0

🚀 Just Launched: PullSense – AI-Powered PR Reviews!

Hey developers! 👋

Tired of slow pull request reviews?

PullSense automates PR feedback with AI-driven insights, helping you ship better code faster.

🚨 Not a replacement for human reviews!
PullSense acts as a starting point to streamline feedback and increase PR review speed, making manual reviews more efficient.

🔥 Why PullSense?

Instant AI Reviews – Actionable feedback in seconds.
Seamless GitHub Integration – Just connect and start reviewing.
Customizable AI Models – Use OpenAI or your preferred provider.
Bring Your Own Key (BYOK) – Use your own API keys for AI models.
Privacy-Focused – No unnecessary data storage.

🚀 Try it free at pullsense.com
Would love to hear your feedback!

3 Comments
2025/02/01
12:05 UTC

5

Need some help figuring out the next steps at an architecture level

Hey folks,

I would appreciate some help with a problem I'm facing at work. I recently joined a new position, and it's quite a ramp-up from my previous role at a startup. Any help or advice would be greatly appreciated.

We have Service A, which sends requests to a downstream Service B. Service A is written in PHP, and from what I understand so far, for every event triggered by a user in the system, we send a request to the client. This was a crude system, and as a result, our downstream clients started experiencing what was essentially a DDoS from Service A requests. However, we need these requests to verify various things like status and uptime.

To address this, Service B was introduced as a "throttling" service. Every request that Service A sends includes a retryLimit and a timeout property. We use these to manage retry attempts to the client, and if the timeout is exceeded, Service B informs Service A that the request has failed. Initially, Service B was a simple Node.js application that handled everything in memory.

At some point, a rewrite was done, and the new Service B was built in Golang using channels and Redis as a state store. Now, whenever Service A wants to contact a client, it first sends a lock request to Service B. If the request is in a locked state, only that specific request is forwarded to the client, while all other requests fail. Once Service A gets the confirmation it needs, it sends a release request to Service B, allowing other requests to go through.

Needless to say, the new Service B isn't handling traffic very well. We are experiencing a lot of race conditions, and many of Service A's requests are being rejected. The rewrite attempts to use Redis for locking, but the system has been a firefighting mission ever since. I've been tasked with figuring out how to fix this.

I don’t even know where to start. As of now, I can only confirm that Service A is using this throttling mechanism, but I haven't been able to verify if other services are also relying on it.

Since we are using AWS, I was thinking of utilizing SQS to manage requests and then polling the queue to process them one by one.

Any suggestions would be greatly appreciated.

15 Comments
2025/02/01
11:29 UTC

23

I am an IT Project Manager committed to deepening my understanding of systems design and architecture

Hey guys, need some advice

I am currently the project manager of a complex healthcare technology program and I am using this as an opportunity to really deepen my technical knowledge

I don’t want to learn how to code, I just want to know what technology stacks will be needed and what strategies will be implemented to build a solution on the basis of requirements- basically like what a solutions architect does.

I feel like that will be extremely valuable knowledge for a project manager to have (ideally, I want to eventually transition into a Technical Program Manager).

Here are the current efforts I am making -

Currently having a good grasp of IAM frameworks and APIs but still doing my research and asking devs questions, then I will go into databases and networking next - then understanding some other cybersecurity concepts then progress like that

I also plan to do the AWS Solutions Architect Professional (after studying the AWS SAA of course)

I also want to read this book: Designing Data-Intensive Applications

What do you advise? Please note I wasn’t a dev before.

22 Comments
2025/01/31
05:00 UTC

18

Why Aren't You Idempotent?

https://lightfoot.dev/why-arent-you-idempotent/

An insight into the many benefits of building idempotent APIs.

6 Comments
2025/01/30
20:34 UTC

23

How do you measure your value to your employer?

Hi all

This topic is something i’ve struggled with a lot in my career. Mostly as a developer, I have never had an access to the big enough picture to be able to connect my code to any monetary changes for the company. Sure, we might make our daily work easier and faster and for internal tools, implement stuff that makes its users’ work more efficient, but still hard to put in numbers.

Now as an architect I do have more responsibility and i have more authority over a larger scale but i still find it hard to measure the impact.

I help with figuring out auth solutions, data models, db schemas, api design, integrations, dev practices, ci and devops flows and automation, code boilerplates, code reviews, enforcing better rules and standards, all that stuff.

But overall, transparency and monitorability of our systems is low and we don’t really measure KPIs in terms of development. I do want to change that but not sure how to start.

I would like to see if any rules or standards i’ve introduced actually have a good impact. If i’ve made people do code reviews and follow some rules and best practices, at first it created some pushback and confusion and blockers and reduced time for a ticket to get done, but all in all it helps us produce better code, share knowledge, hopefully introduce less tech debt and less bugs.

But i don’t really know how to measure and prove that.

What KPIs or measuring tools you use to prove to yourself and your employer that your decisions actually have a positive impact not only create the illusion of it?

12 Comments
2025/01/30
14:04 UTC

0

Architecture for an Student management system

Please help me i am student and I have to develope a system for student management for a school. The main requirements of the system is that it can take student attendance through a mobile android app,create marksheets,create attendance sheets and see and share student data/profiles.

Following is the architecture I thought of please review it and suggest problems solutions or even better alternatives:

I dont just have to develope the application but actually a local school wants to implement it so it needs to be robust.

Database : as we have a client i thought a database as a service would be better fit so the options were firebase or supabase. I went with supabase as I thought SQL database would be more fit a system which is required to handle marksheets and attendance sheets.

Website for admininstration : a website to enter the student data so that management is easy think of this as a place for clerks from the school to enter the data of students into or even for teachers to use their laptops to take attendace from.
For techstack of website I want to use Java Spring boot and thymeleaf the reason because we have that in our curriculum

Mobile Application : The client requested the mobile application to make it quicker and easier to take attendance. Mostly teacher would be using this application on daily basis.
For mobile application Kotlin with jetpack compose would help me create the application quicker and better without spending lot of time on looks but focus on functionality.

so that is how I think of the system in my head
Database : supabase
Website : Java spring boot
Mobile app : Kotlin with jetpack compose

But as I started to look into it I found out there are literally no resources for integrating supabase with java spring boot. I tried but I couldn't even set up connection to the database.

So should I change the stack from Spring boot to MERN for website?? or change from Supabase to firebase since there are some resources for it ??

Please help me I am not that experienced developer or even coder just a student trying to learn and finish my project. Any kind of help is appreciated.

4 Comments
2025/01/30
10:46 UTC

2

Best Way to Integrate Partner Marketplaces with My RNPL API Using Keycloak?

Hey everyone,

I’m integrating my Rent Now, Pay Later (RNPL) service with partner marketplaces. Users will apply for financing without leaving the partner’s platform. My stack: • Keycloak for authentication • Express.js backend • OAuth 2.0 Client Credentials for partner authentication

My Questions:

  1. Do I send both a partner token and a user token in API headers? • Example: • Authorization: Bearer {partner_access_token} • User-Authorization: Bearer {user_access_token} (custom header) 2. Any best practices for handling token validation & session management at scale?

Would love to hear from anyone who has done third-party API integrations with Keycloak & OAuth. Thanks!

0 Comments
2025/01/30
07:40 UTC

21

Need architecture suggestion

We are building a new app for offline deals and promotions for merchants. This is not an e-commerce app—there is no product catalog, payment gateway, etc.

User Flows:

  1. We partner with merchants across cities.
  2. Merchants use our platform to post local deals and promotions.
  3. Customers can check local deals on Android/iPhone.
  4. Customers visit stores to avail the deals.
  5. Customers earn loyalty coupons.
  6. These coupons can be redeemed at any other partner store.

Key Points:

  • After login, all functionality is city-specific.
  • The first step for a user is to select a city.
  • Everything—coupons, searches, merchants, etc.—stays within the selected city.
  • Selecting a new city is like a fresh start.
  • Expected total transactions across cities: ~1M per month.
  • Backend Tech: Planning to build it in Node.js / Java.
  • Architecture Consideration: Since the customer-facing side only has 3-4 key pages with actual load, we are planning to keep the app monolithic rather than using microservices. Splitting into microservices doesn’t seem necessary at this stage.

My Question:

I am considering an architecture where each city has a separate database schema (or tenant), while the API gateway remains common. Data will be fetched/pushed to the respective schema based on the selected city.

Pros: Queries will be fast, as each city will have a smaller dataset.
Cons: Maintenance will be higher—any schema change (e.g., adding a new field) must be updated across all schemas.

Is this the right approach, or is there a better solution? will it impact caching? How do apps like UrbanClap or BookMyShow handle this?

16 Comments
2025/01/30
01:56 UTC

0

Stop building React backends in Java, Python or Go

12 Comments
2025/01/29
12:46 UTC

0

Building a blog

When you build a blog into your web site. Does each blog represent a new page? And do you have a Blog home page so to speak? Does the blog home page include links to all your blog pages? How’s this all work. Want this to ensure SEO remains paramount.

3 Comments
2025/01/28
20:16 UTC

2

Accessing AWS resources from outside of AWS ecosystem

Hello,

I have a SpringBoot application that is running on EC2 as a docker container and it is accessing S3, Postgres and Kafka (MSK). The app is doing video processing and using GPUs. I am planning to migrate the app the some GPU rental platform because it is cheaper. From what I understand there I will have a VM where I can run my app. There is another springboot app running on ECS that receives kafka events from the video processing app, that one will remain on ECS, and the video app should be able to connect securely to AWS kafka and to send messages to the other app inside ECS.

There are 2 questions in regards of this migration:

1: How should I manage the deployments? Should I login to ECR from the VM and pull the image and then run the container or clone the repository on the VM and build & run there? In the first scenario I assume I would have to configure the AWS CLI on that VM to log in to ECR. Would this be safe to do?

2: What would be the best and most secure way of connecting to AWS resources from that platform? On EC2 I use IAM but I think this will not work anymore from that VM. The only idea I have is to configure AWS CLI there and then to have some Environment Variables Credentials Provider that does the login logic (using AWS SDK).

I am pretty new to this kind of work, so any advice is well appreciated, thank you!

4 Comments
2025/01/28
09:39 UTC

23

How to design the aggregation side of a News App?

Assuming all publishers have an API to get latest articles, how would one efficiently pull news articles from thousands of sources at scale, deduplicate them, and store them?

Would it make sense to use some sort of message queue and pop and append the news sources cyclically, then store them in dynamo or blob storage?

Open to all suggestions

16 Comments
2025/01/28
02:46 UTC

0

Using draw.io vs writing by hand

Hi, I was just wondering if drawing by hand (using an ipad to export to png) is similar to draw.io. Is their something I am missing that makes draw.io superior?

10 Comments
2025/01/27
18:42 UTC

2

Building Multi-Tenant SaaS Architectures • Tod Golding & Bill Tarr

1 Comment
2025/01/27
16:35 UTC

13

How do you estimate the size of the project?

In my role as an architect in my organization, I've to frequently provide estimates for different projects.
We don't work on single project. We gather high level requirements, provide estimates, technical architecture, and move on..,

I understand how to provide estimates via story points for user stories. However, the requirements are not as fine-grained as user stories at the very beginning.

So, what techniques and tools do you use to estimate high level requirements? Could you suggest some books on this matter?

My colleagues use t-shirt sizing a lot. However, me being a new architect I would like to get a thorough understanding of all estimation techniques.

21 Comments
2025/01/27
08:42 UTC

4

API Management vs Logic

Hi, I’m looking for some guidance on whether APIs can take action based on information being available, or whether a logic app/integrator is required to fulfil this task.

An example of the situation.

Your company has ServiceNow, Workday and Azure API Management.

SNow and Workday are currently not integrated. SNow provides workflow to the team that uses Workday, which means they then have to manually create a ticket in Workday to action the SNow instruction.

Would Azure API Management allow for identification of that specific SNow workflow action and the associated automatic creation of a new ticket in Workday?

Or is that function the role of a Logic App/Integrator?

We need to automate actions between different applications and while I am being told it can be done with API Management, I don’t understand how it can be achieved without a Logic engine existing.

Thanks.

1 Comment
2025/01/27
01:45 UTC

8

Why are Python packages seemingly very rarely diagrammed?

Hi all. I am a data scientist working (in industry) on some increasingly complex applications of machine learning. I often need to design deployment strategies for ML models (the "MLOps" process) and I tend to create ad hoc diagrams to document these designs. Everything we build typically comes back to Python packages, though the internals of the packages and how they're used differs greatly.

Example

One pattern I typically follow is

  • At a low level, I design a simple Python package to perform ML modeling --- including data processing, model training, I/O, evaluation, etc. This is typically object-oriented, comprised of classes.
  • At a high level, I deploy a prediction service on Kubernetes. This is a Docker container that is internally running a web server that returns responses from a trained ML model; this container has my aforementioned Python package installed, and uses it to make the predictions.

My SWEs are historically unfamiliar with Python, and not being an engineer I am not versed in architectural documentation standards, so I usually end up sharing some really rough sketches with them, or, worse, try to verbally explain what I'm doing. I'm looking for a more standardized, systematic approach to documentation.

Research

I've browsed around quite a bit, and I am surprised to never see examples of architecture diagrams involving Python packages at either of the two granularities:

  • Low-level code documentation (e.g., C4 Code diagrams). I don't think I've ever seen Python code documented like this in a popular package's public repo.
  • High-level systems documentation (e.g., C4 Systems Context or Container diagrams). This would help clarify to my business and engineering partners how data science team uses Python packages (everyone else uses Java, etc.).

More generally I don't see Python mentioned much in any intro docs around software architecture documentation. Any ideas why these are so rare? Is it that Python is less commonly used by SWEs interested in arch docs?

7 Comments
2025/01/26
20:53 UTC

50

Do you prefer domain objects with behavior, or do you keep them as simple data containers? Why?

I’ve been thinking about how to design domain objects in code and wanted to get your take: Do you prefer domain objects to have behavior (methods, business logic, etc.), or do you keep them as simple data containers and handle logic elsewhere?

Some people argue that adding behavior makes the code more encapsulated and aligns better with domain-driven design. Others prefer keeping domain objects simple and focusing on separation of concerns.

What’s your approach, and why? Have you found one method works better in certain types of projects? Would love to hear your thoughts!

56 Comments
2025/01/26
17:17 UTC

6

Modularizing Legacy Apps Using Microapps

Hey everyone, At the company I work for, we currently have two legacy mobile apps that serve similar purposes. The plan is to refactor these apps into a single superapp.

My initial approach is to break down each app by features to analyze and identify synergies between them.

To achieve this, I’m exploring the idea of modularizing the existing codebases into smaller, more manageable modules that can eventually be integrated into the superapp as independent microapps. However, I’m not entirely sure if this is the best approach for our situation.

With that in mind, I’d like to request guidance on books, articles, or other resources that cover this subject. If you believe microapps might not be the best fit for this scenario, I’d also appreciate suggestions for alternative approaches.

Thanks in advance for your help!

6 Comments
2025/01/25
23:45 UTC

3

Installing Kong API Gateway on GKE and deploying an application with OIDC authentication.

Comprehensive guide for setting up a GKE cluster with Terraform, installing Kong API Gateway, and deploying an application with OIDC authentication.

Kong API is widely used because it provides a scalable and flexible solution for managing and securing APIs https://medium.com/@rasvihostings/kong-api-gateway-on-gke-8c8d500fe3f3

5 Comments
2025/01/25
20:42 UTC

Back To Top