Technology

Key points to remember when building social media platforms

Key points to remember when building social media platforms

Social media platforms are a bit different than other conventional platforms. There are multiple key points to remember before deciding what you would like to use and how to use them.

Interconnecting data

In a social platform, the data are more connected between with likes, comments, posts and reaction towards other user generated content. Hence a relational database is not always the best to integrate for this purpose in a platform. Why? Because relational databases consider more tabular data structures and we will have a humungous pain to query data in between the tables with many join queries.

The best data connecting database we can use is a GraphDB and frameworks like Neo4J GraphDB, Amazon Neptune, JanusGraph are examples of this. You will need to be careful when designing the data structures as the GraphDB is not to add all data but address the problems of fetching data with relationships in a minimum time. So it’s best suited to store large blobs on a separate db and use the GraphDb to address all the data relationships together. AWS Neptune

Optimising media load time

Nobody likes to use a social platform if takes too much time to present data for you. So it is essential to consider this when designing the platform.

You will need to consider Content Delivery Networks(CDN) which are distributed among different regions of the globe as even milliseconds matter. So a storage network connected to a cache controlled CDN would be the best way to use.

When it comes to data, it will need to be compressed to present the users according to the network speed that the user is currently loading. When it comes to videos, it will need to optimize into low, medium and high quality and load accordingly by the frontend.

Just like videos, images are no differnt and need to be compressed to reduce size as the it will be first thing that your users will get eyes on.

Data Subscriptions

One of the main point that need to handled is the data subscriptions. You will always like to click a notification when someone in your social circle has liked or updated new content. Imagine handling millions of clicks per minute or messages incoming to your services and you have the pain point to handle it.

When it comes to subscription there are two main points. One is performance and other is modifiability. These two points are greatly addressed by the GraphQL framework and its quite easy to integrate as well

GraphQL allow us to modify the data requests as queries and subscribe to data to get notified as soon as its updated. This is a very convenient framework to adhere as its easy to use and developers will have enough room to change and request data without too much coding. GraphQL also support offline data so it will be easier to load the previous cached data without requesting data all the time.

You can have a distributed network of GraphQL endpoints to allow the users fetch data from the nearest data point. This will optimize the load time and give you the latest data in no time.

Graphql

Deployments

Social media platforms are designed to withstand huge number of requests. So it is vital to deploy the frontends and data sources in different regions. With locality deployments can be done on USA, EU, AISA and ASIA PACIFIC regions with desired growth conditions.

Also it is important to consider deploying stages and versions.

Stages — Use Development, Staging and Production stages to provide services to different deployment steps.

Versions — Use versions such as v1, v2, v.x.x.x for endpoints and resources so that legacy systems won’t get obsolete. Until every user is updated to generally available versions you can make sure existing does not break with releases.

Above are some high level facts we have organized for development of social media platforms. Next we will meet with more content on each step to create a successfull social media platform.

@zegates.com

Sandaruwan Nanayakkara

Sandaruwan Nanayakkara

Chief Executive Officer

Sandaruwan is a visionary technology leader and the Chief Technology Officer at Zegates. Driven by his passion for innovation, he has dedicated his professional journey to establishing the premier software service company in Sri Lanka. Through strategic growth and a steadfast commitment to technological advancement, Sandaruwan has been instrumental in the company's expansion, consistently pushing the boundaries of what's possible in the tech industry.