Project Day 2: There are a million ways to design a system, and eventually any option will make me look dumb.
I don't think that monitor is installed correctly...

Project Day 2: There are a million ways to design a system, and eventually any option will make me look dumb.

Setting up your software project is almost always a nightmare. "Oh, they completely changed how that thing worked since I last looked a year ago," you might find yourself saying on the regular. Worst still, tutorials online are frequently just flat out wrong by the time you find them, or were highly dependent on that person's environment and never would have worked for you in the first place.

"Say what... information on the Internet is wrong?" You might hear play in a tone suggesting doubt in the eventual audiobook version of this article, or in your own head now if you have a good enough imagination. Let's imagine this article is okay.

Everyone is Always Wrong Everywhere All the Time, and so am I

Whatever I'm about to write will also be wrong and embarrassing in a few weeks (at best), and everyone in my network will silently rescind their recommendation that previously attested to me being The Real Deal. Why did I even bother to start? I started because no amount of current planning can negate all future embarrassment, so roll the dice, and hope for the best. How is this an article on system architecture... oh yeah... here's a diagram.

Yup, that's some system architecture alright!

At a high-level we're building maybe three different types of things poorly to support our ActivityPub based social network:

  1. An Angular 17 Web App that will act as a client for viewing the timeline (Basically think www.twitter.com (Warning: hopefully NSFW at your job)).
  2. A handful of APIs that will implement just enough of the ActivityPub spec to be functional, and a second set to power the aforementioned WebApp.
  3. A handful of async jobs that will handle things like posting to and fetching remote data from the Fediverse.

This design shouldn't be considered radical unless I forgot something. Geez, I hope not, we're just building a nice little WebApp. Actually, rage builds more engagement, and nerds love to put dorks like me in their place. Let's revise that system architecture.

Waaay easier to understand.

Yeah, so, change of plans. We'll just use Cognito for authentication, APIs, and the database. We'll pack all our data into the custom_attributes field per account as a JSON blob. It supports key value pairs, and it's definitely secure. We'll offload all processing to a fat client. Bim Bam Boom, don't even bother erasing that white board, that design is gold, and I'll start tomorrow.

Pfff... I think I know what I'm doing

We're already getting into niche content, so get ready for a stream of O(1) level jokes. That's it for today. I'll be back later with something more straight forward like cryptographic signatures.


More from this series:

Project Day 0: Let's Get Cereal and Build Something Cool.

Project Day 1: ActivityPub or oh great, another social media thing... next article please.


要查看或添加评论,请登录

Alex Ayers的更多文章

社区洞察

其他会员也浏览了