Can anyone give examples here and/or links to articles about a typical database cluster/group for an app that is designed to roll out initially in one country and then be hosted globally after 3 months of initial testing, with databases for:
- Standard user identity eg user auth based on email + password and social network logins,
- User profiles eg full name, short bio, and an avatar,
- Should host images - max of 13 images per user’s ‘post’ (most users will have 3 or less ‘posts’ unless I extend the app to SaaS and companies as account types). This includes user avatar too.
- Search - via elasticsearch or manticore,
- Ecommerce - not a big feature set, just tied to user ‘posts’ and no shopping cart.
- Admin of user accounts,
- Anything you think I may have missed.
* quotes used around ‘post’ because that’s as close as I can explain here.
Even questions like ‘Should I have a separate db for ‘post’ creation vs storage of post content’ eg a user fills in a wizard/multipage form entering text and images as part of onboarding or later - should I keep the tables with the content for dropdowns for that form in a seperate database from the place I store the posts created from that form, are not ‘intellectually paralysing’ but are forefront in my planning and I’m keen to learn from others here.
PS Please, no replies with ‘I’m suspicious that this is premature optimisation’… or similar, because that’s a relative term, and I have the concept and time and resources to build an app that will be very popular, unique, and profitable globally… and do not want to stunt its growth by hitting critical issues. This is why I learned Elixir and Phoenix etc because beyond loving functional programming, they use the beam etc and can scale well, and I’m trying to avoid getting investors to get this app launched.
I’m struggling to find information and think about how to build with the right databases to scale up from the start. YES, everythhing is app specific, and there’s a lot of engineers blog posts from Twitter to Instgram out there, and there will be unforeseen changes, but a lot of apps have common architecture, and there’s a huge range of experience across members here, so I’m keen to read as many opinions as possible - and do not expect any ‘perfect answers’ (unlike stackoverflow that is built for that or leans towards it and general questions are often shot down by people trying to prove they’ve rote learned engineering mantras).