r/androiddev • u/amranya • Aug 17 '26
Discussion Architectural patterns in large scale apps.
in our mid sized startup, we have over 100 android engineers on one app, divided by squads, so we have a lot of squads, each one is working on a feature, a library needed, design system and custom components libraries etc, all these modules/libraries are published to maven and added as dependencies on the core app repo, my squad works on an isolated feature so it's easy to integrate into core app repo, but i attended guild meetings and saw RFCs mentioning circular dependencies, hexagonal, onion, plugin etc architectures because some modules/libraries depend on each other, communicate with each other, initialization order problems of modules etc etc etc, i feel stupid tbh and i'm glad i'm working on an isolated feature library in which we use usual architecture stuff. anyone has resources: talks, books, articles etc that cover this kind of topics and architectures and engineering problems in big scale apps with big scale teams and modules/libraries?
81
u/AbbadonTiberius Aug 17 '26
by any metric I would say that's a large company
17
u/Zhuinden Aug 17 '26 edited Aug 17 '26
mid-size is like 15 devs at most per platform lol
13
u/zvika82 Aug 17 '26
That's a huge group. Some squads should be assigned just for infra work, and if another squad needs a new infra, it should be done or guided by the infra team. I don't like distributed squads based on features, because the application structure tends to become a mirror of the teams. I'm expecting in such a large group to have a ui infra team, performance, network, etc.
21
u/kokeroulis Aug 17 '26
Literally this is why every big tech is dividing the code into api/imp and thats why someone who is/was working for amazon has open sourced an example about this https://vrallev.github.io/app-platform/module-structure/.
When you have 100+ ppl you cannot coordinate all of those changes.
The only solution is to write your own code and when you need something from someone else, just create a repository with a dummy implmenetation on your side and on the main app, you can implement that dependency and inject.
Dependency inversion is the only way to go, even in common things, like UI components etc. Making 1 api breaking changes, it might mean the consumers might have 1k of changes.
The only option is to provide backwards compatibility for x amount of time.Thats why you need api/impl modules
5
u/Spare_Phone_5225 Aug 17 '26
what about api/impl submodules for each feature? DTO, interfaces in :api, implementations in :impl
Other features import only :api module of the specific feature they need. Avoids circular dependencies
7
u/JaysonthePirate Aug 17 '26
Best resource I've found so far is called Building Mobile Apps at Scale: 39 Engineering Challenges. It's a super concise breakdown of challenges faced by large mobile engineering groups and how different companies (think uber, chase, doordash) handle their teams and architecture.
https://www.mobileatscale.com/
2
u/enigma-i-am Aug 17 '26
This read like an app built with the Micro application architecture. Takes inspiration from microservices. There needs to be a platform team that handles what feature teams use and provide them with the functionality eg component library based on apps design system.
Best way to handle circular dependencies would be to forbid feature teams from importing 3rd party libs and have all the libs that are shared across team being import from one package where the functionality is properly exposed.
In all honesty I might be wrong but it seems to me like the problem might be the platform team not being strict on certain things.
0
u/Upset_Efficiency799 Aug 17 '26
Interesting
-14
u/Bright_Aside_6827 Aug 17 '26
Its not a backend. How complicated should it be