2020-09-20
Hey there,
This time I want to update you on the stack improvements for V4. I hope to be able to explain the series of changes and challenges that I'm facing now and where the project is going forward.
Application
As I've mentioned in some posts already, the application code is completely about to be re-made under a drop-in pluggable architecture. This means that even core components will be allowed to be swapped for ultimate customization. There's more to it, here the list:
- Custom made PHP 8 framework (
Chevere)
-
Headless CMS
- Automatic API discovery (
Interface description language)
- Uses
Swoole (up to 40x faster application)
- Attribute-based access control (
ABAC)
From that list, this is the first time that I address that access will be handled using attributes, which is the most modern way to deal with permissions. The concept is that actions are granted by attributes, which can be modified on the fly and subjects can be affected by environmental conditions. For example, this could allow to access a given album contents within business hours (just to frame a silly example here).
The goal with attributes is to be able to allow plenty flexibility for limiting what users can do, but also to limit how users will grant access to other users. For example, an user could define a followers tier based in certain rules or conditions that grants (or deny) access to a given content, but also to like, comment, on a content-based logic. This flexibility is great for money making as we will be able to fine tune what users will be able to do, and on top of that, users could subscribe to exactly what they need and no extras. For example, an influencer could use Chevereto to provide paid access to content and in that context, other users won't require an upload quota at all, so we can let users to build their own subscription packages, picking exactly what they need.
The above will allow users to build their own experience, and we will make way more profit because we will be offering an unprecedented flexibility.
Database
Many of my recent job is actually on the database re-design. For such process I've decided to keep using a relational database but there will be a lot of neat improvements:
- MySQL 8 / MariaDB 10 / Postgresql (only one of these)
-
Normalized schema
-
Replication (multi-server database)
I still don't pick my poison regarding which
RDBS I will end up using, it will be nice to know your feedback on this matter based on your real life usage. How does these perform for you? In any case, I think that is safe to assume that V4 will use more than one database, so chances are that it will use a RDBS + extras to provide faster performance when fetching user relationships.
The schema in V4 will change to a normalized one, in which the existent tables will be re-distributed in many new small tables. Many new data types will be implemented like JSON for storing image Exif data.
Wrapping-up
For V3 I didn't take that much time to pick the elements that I mentioned in this post, and it caused a lot of technical debt. This time I'm being extremely careful on the stuff I pick, and I'm not framing myself just to these blog posts around the web telling you what to use. I'm investigating each technology on my own, reading tons of books and papers.
It is also extremely important that you share your thoughts on this topic as you account real-life usage so you have an insight that could be very important for the system that I'm building here, don't hesitate to provide your feedback.
Hope you like the heads up,
Rodolfo.