tienyuan / trust-the-process

0 stars 0 forks source link

[8007] Tech Design: Post Create 2.0 #3

Closed chance-schultz closed 4 years ago

chance-schultz commented 4 years ago

The proposed changes are based on requested feature found in https://app.clubhouse.io/rila/story/7979/post-create-2-0

Requirement Outline

This is an outline on the proposed changes that will be made to the system in order to accommodate a new Post Upload flow. The idea is to allow users to Upload multiple photos with individual captions and metadata (known as a ListingMedia Post in the system) at the beginning of the flow. The User will then go on to select if they are contributing to an existing Listing or creating a new Listing in the system.

Figure 3a. Client Multi Post Flow

Things to Consider

1) What are the impacts to the existing System?

Proposed Changes

The majority of changes will take place on how ListingMedia will be handled throughout the system. It will follow the same Flow as the original architecture but there will now be Collections of multiple ListingMedia passed through the system instead of a single instance. Figure 2b. BulkCreateListingMedia Flow

Changes to Content Service architecture:

Entity Changes

1) ListingMedia will be created before Listings are created.

Add new endpoints to ListingMedia routes

1) Add new endpoint for Create ListingMedia that does not require a ListingId and will create unclaimed ListingMedia.

Add new endpoints to Listing routes

1) Add a new endpoint that creates a Listing and links a list of ListingMedia.Id's. POST listing/v2

File Url Changes

We will be creating a new file path for all content image and video url's that now match the following patterns.

/posts/{ListingMediaId}/image.jpg
/posts/{ListingMediaId}/image_thumb.jpg
/posts/{ListingMediaId}/image_src.jpg
/posts/{ListingMediaId}/video/*

Changes to Post Service architecture:

1) Create new handler in MqController that will handle BulkListingMediaMessage

Changes to Feed Service architecture:

1) Create new handler in MqController that will handle BulkPostsMessage

Changes to the Shares architecture:

1) Create new handler in MqController that will handle BulkPostsMessage

Changes to the Analytics architecture:

1) Create new handler in MqController that will handle BulkPostsMessage

Test Cases

TODO - Fill in Test Cases

Diagrams