thelovemsg / chatting_app

0 stars 0 forks source link

Add more Multi Profile when click plus icon in your friends list #23

Closed thelovemsg closed 1 year ago

thelovemsg commented 1 year ago

Objective

Add more Multi Profile when click plus icon in your friends list

Detailed work content

  • When user get into his 'chatting' screen, He'll see my profile, multi profiles, friends' profiles etc.
  • When user want to add more multi profile like Kakao talk, I click the plus button in multi profiles section.
  • Maximum number of multi profiles is three.

    Note

  • You might need to make more component for draggable modal.
thelovemsg commented 1 year ago

Yes, My Lord!

thelovemsg commented 1 year ago

What! I think I need to use cloud storage.

When storing images, such as profile pictures for a chatting app, you typically have two main options: storing the images in the database directly (e.g., as Binary Large Objects, or BLOBs), or storing them in a file system (like the server's file system or a cloud-based storage system) and saving the references (URLs or file paths) in the database.

While it's technically possible to store images directly in your database as BLOBs, this is generally not the recommended approach for a few reasons:

1. Size

Databases aren't optimized for large binary data. Storing many large BLOBs in your database can significantly increase the size of your database, which could slow down your database performance, make backups more difficult, and increase costs.

2. Bandwidth and Load

Serving images directly from the database can also add a significant load on your database server and use more bandwidth.

3. Scalability

It's generally harder to scale out a database than a file storage system.

Instead, it's often recommended to store images in a file system and store the references to these files in your database. This could be a local file system if you're hosting your own servers, but often, it would be a cloud storage system, like Amazon S3, Google Cloud Storage, or Azure Blob Storage.

Here's a basic example of how you might implement this:

1, Upload the image

When a user uploads a profile picture, your application receives the image file.

2. Store the image

Your application saves the image to your chosen cloud storage system. The cloud storage system returns a unique identifier for the image (such as a URL or file path).

3. Store the reference

Your application then saves this unique identifier in your database, associated with the user's profile.

When you need to display the user's profile picture, you would look up the identifier in your database, and then use this to retrieve the image from your cloud storage system.

This approach is much more scalable, as cloud storage systems are designed to handle large amounts of data and high levels of traffic. They also often provide additional features like automatic resizing, CDN integration, and more.

Of course, I need to use cloud storage so now, I'll just pretend to upload image for UI works.

thelovemsg commented 1 year ago

Now, I need to design API for each works. When we open kakao talk, Many friends are sorted in different categories. Each of them are separated into their own section. That means It might be best choice for me to make API for each of component. So, I'm going to make files for this.