Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on What software architecture are available for developing an application with multiple business domains that only share some common aspects?

Post

What software architecture are available for developing an application with multiple business domains that only share some common aspects?

+1
−1

NOTE
The meaning of the word "program" below is

(PROGRAM) A federal or state initiative that offers grants for non-profits so that they can provide service at low cost or free of charge.

and not a software application or online service. When I mean software, I use "application".

(Thank you @matthewsnyder‭ for pointing this out!)

For example, a non-profit provides services for people with disabilities that has multiple departments where each department can offer multiple "programs". A program is funded by a federal or state grant, and only accepts clients of a certain demographics, such as 55 and older. Each program has its own budget, reporting requirements, scheduling rules, etc.

Usually, the only things these federal/state programs have in common are:

  • the employees providing the services (e.g., one instructor can help out different federal/state programs; a manager can overview multiple departments / federal/state programs; a department can run multiple federal/stateprograms; etc.)

  • the clients receiving the services

These are the architectural options I can think of:

1. Monolith

One application operating on one huge database schema that have all the info from all federal/state programs. Perhaps table names reflect which federal/state program they belong to.

Pros:

  • Easy.

Cons:

  • I haven't seen one solution yet that wasn't messy (or downright disastrous).

2. One application, but more granular database structure

PostgreSQL has schemas, so one could design a database schema for federal/state programs A, B, and C, and the application would hide this detail. (It is also possible to make cross-database queries with PostgreSQL.)

  • How would one share the clients and employees though? (Using an extra schema just for this data?)

Pros:

  • Less cognitive load when trying to understand the organization.
  • Easier to document.

Cons:

  • More involved design process.
  • App framework should support schemas (otherwise it can be challenging to do queries).

3. One app and one database per federal/state program

I guess this is what microservices are? There could still be one unified frontend.

Pros:

  • ???

Cons:

  • Complexity.
  • Many points of failure.
  • Deep knowledge about managing all the infrastructure.

4 - N. What else?

What haven't I thought of? Did I get some of the ones above totally wrong?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

3 comment threads

"Program" a bit confusing (2 comments)
Modular Monolithic Architecture (2 comments)
The structure of this question is kind of awkward. For example, let's say these *were* all the option... (4 comments)
Modular Monolithic Architecture
Alexei‭ wrote 7 months ago

Is Modular Monolithic Architecture an option? Do you have at least a basic idea about the performance requirements? Example: programs will be added/changed at a max of 100s/day, clients served in the 1000s.

toraritte‭ wrote 7 months ago · edited 7 months ago

Never heard of it, but by the sound of it I would say yes:) Thank you also for your question regarding performance, because I should have foreseen how this would be an important aspect. The answer is that performance is not an important factor:

There are only a couple hundred clients a year, less than 50 employees, and 5 programs at the moment. The current (broken) version of our system has been in production since 2021, and the size of a pg_dump is 350 MB.What matters though is that it should be relatively easy to reason about it, which is why I'm obsessing about trying to find the "right" structure, pattern, etc. Both the current and previous iteration was handed to us unfinished, undocumented, and the schema is just a big soup of tables (and some don't even have any functions...).