5 ms·
Ask HN: What tech-stack would you use for the following?
Lot of questions appear on HN about which tech-stack to use. So I thought let us all do a thought experiment together. I collected most common features required by apps today(you can suggest additional features, and I will include them in the post), and came up with a hypothetical product. Say, we want to develop a platform with the aim of monetising it and later scaling it to millions of users. The product has following requirements to start with:
0. A user should be able to login via various methods: username/password, finger-print, face-recognition. Login should support 2FA.
1. A user should be able to create a:
1.1. Post.
1.1.1 A post could have an optional title.
1.1.2 A post could have optional tags.
1.1.3 A post could be edited later.
1.1.4 A post could be hidden by creator.
1.1.5 Multiple creators could collaborate on a post; and a post could be moderated.
1.1.6 A post could have comments and up/down votes.
1.1.7 A post could be reported by users to the moderators of the platform.
1.1.8 A user can mark a post as favourite.
1.2. Request for post.
1.2.1 A user can request a post on a topic from other users on the platform.
1.2.1 As with the post, the request can have similar features e.g. title, tags, votes, comments etc.
3. A user can create a group; posts and requests can be posted to a group.
4. A group could be moderated, private, open, or invite-only.
5. Users will earn karma/points for the content they create and the upvotes they receive.
6. Users can create tags that they can use with a post or request. These tags will be available to others too.
Now, this is the basic requirement. But we are ambitious and we dream of building a platform that millions of users will use everyday. And we want to build more features into this platform later on; like specifying Authorisation for users, Real-time text, audio and video communication, collaborative editing, casual multi-player games like snakes-and-ladder, multilingual support, and support for web and native platforms like mobile and desktop. We also want a mechanism where multiple users can share an account, if required. Allow real-time notifications. Also, when we become a unicorn (heck, why not dream big ;)) we want users to be able to contact support using the platform. Later on we also want to do analytics, and also want users to know their history on the platform. And last but not the least, we want to add payments support where users will be able to pay each other for the content and the platform takes commission on each transaction.
Now, keeping these requirements in mind, and the often repeated mantra on HN that one should use the language and stack one knows best to start the project, my stack for the project is as follows(please suggest improvements to this C/C++ based tech-stack if you think it can be better):
Backend:
C and C++, uWs, cppgraphqlgen, sqlpp11, postgresql(with pgpool, postgis, patroni, pgbouncer, greenplum), rethinkdb and haproxy.
Frontend: Flutter
What would be your tech-stack for this hypothetical project? Please chime in. Let the crowd be educated :)
- alex14fr 4y agoBackend: PHP/MySQL Frontend: HTML, Vanilla JS
- _448 4y agoAnd how about scaling this later on? What other things will be required to scale this.
- cxr 4y agoYou are (presumably inadvertently) mirroring a character who is the butt end of the joke in a well-known meme. <https://www.youtube.com/watch?v=b2F-DItXtZs https://www.youtube.com/watch?v=b2F-DItXtZs>
- benstopics 4y agoYou could scale the API with Kubernetes and MySQL with Vitess off-the-shelf or architect the sharding yourself. My only concern with MySQL would be that, contrary to PostgreSQL, you can’t rollback DDL statements which makes migrations a PITA, but this is true at all stages and unrelated to scaling. I find it interesting PHP was mentioned since it gets a bad wrap. I personally think it isn’t that great of a programming language but if it’s what you’re familiar with then more power to you. It’s like if someone said you could articulate ideas in French much better than in English, because it has words for things that English doesn’t, I’d still write a better book in English than French. Although, if you understand the fundamentals of programming languages, then learning a new one, especially a high-level OOP one, doesn’t take that long.
- c7b 4y agoGreat discussion question! It's also interesting for people moving into web development to see what experienced devs think about this - the sheer quantity of tools and their fast-changing nature can seem quite overwhelming at first. I just asked a related question [0], if you have any beginner-focussed opinions would appreciate :) [0] https://news.ycombinator.com/item?id=32724950 https://news.ycombinator.com/item?id=32724950
- swah 4y ago