ReactNative – iOS Xcode 14 + MacOS X Ventura – build errors Duplicate Symbols for Architecture arm64

Building ReactNative Apps is always little hard when there is an Operating System Update along with that Xcode updated. Every time when Xcode is updated to a newer version, Apple make some changes which will start affecting iOS app build in ReactNative.

ReactNative iOS App build errors with Xcode 14 and Mac OS X Ventura

Recently when I updated Mac OS X Ventura, It also forced me to update Xcode to latest version 14. After Xcode update, my ReactNative App started failing with lots of errors. I have ReactNative app which is using RN version v0.59.9, Xcode started throwing linking errors like

42 Duplicate symbols for architecture arm64

the complete error looks as follows

duplicate symbol '_OBJC_CLASS_$_FBSDKBase64' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBase64.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKBase64.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKBase64' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBase64.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKBase64.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKBasicUtility' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBasicUtility.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKBasicUtility.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKBasicUtility' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBasicUtility.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKBasicUtility.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKCrashHandler' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKCrashHandler.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKCrashHandler' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKCrashHandler.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKLibAnalyzer' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKLibAnalyzer.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKLibAnalyzer.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKLibAnalyzer' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKLibAnalyzer.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKLibAnalyzer.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKTypeUtility' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKTypeUtility.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKTypeUtility.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKTypeUtility' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKTypeUtility.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKTypeUtility.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSession._session' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSession.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKURLSession' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSession.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKURLSession' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSession.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSession._delegateQueue' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSession.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSession._delegate' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSession.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSessionTask._handler' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSessionTask._loggerSerialNumber' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSessionTask._task' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKURLSessionTask' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKURLSessionTask' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSessionTask._requestStartDate' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_OBJC_IVAR_$_FBSDKURLSessionTask._requestStartTime' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKURLSessionTask.o)
duplicate symbol '_FBSDKAppEventCity' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventCountry' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventGender' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventZip' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventEmail' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventDateOfBirth' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventState' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_OBJC_CLASS_$_FBSDKUserDataStore' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_OBJC_METACLASS_$_FBSDKUserDataStore' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventPhone' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventFirstName' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
duplicate symbol '_FBSDKAppEventLastName' in:
    /Users/xyz/Library/Developer/Xcode/DerivedData/MyProject-bmkdjxadfihkgxdpmjllovjakstn/Build/Products/Release-iphoneos/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKAppEvents.o)
    /Users/xyz/MyComputer/Development/MyProject/SourceCode/MyBranches/saz_mobile/mobile_rn_dev/sazappmobile/MyProject/ios/Pods/FacebookSDK/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics(FBSDKUserDataStore.o)
ld: 42 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

When I started looking for solution, I found multiple solutions, which actually worked for many people, however for me none of those solutions worked.

Solution for Duplicate Symbols for architecture arm64 – which worked for me

Steps to resolve

  1. Open your project in Xcode
  2. Click on Pods project from your project navigator as shown in below diagram
    then select Build Phases and select the project target in which you are getting errors. For me all linking errors were for FBSDKCore, you can find that by seeing the error.

  3. Then from error get the file name for which you are getting duplicate symbol. for example if error has
    duplicate symbol ‘_FBSDKAppEventLastName’ in: /libFBSDKCoreKit.a(FBSDKAppEvents.o)
    Then find file FBSDKAppEvents.m from the search box given in above screenshot.
  4. Find the file and select the file and delete by clicking on delete(-) icon in the Xcode. ( refer below screenshot)
  5. Since in my case there are 42 linking errors, all the errors are coming from more than 4 to 5 different files. I deleted all the files one by one.
  6. This resolved all 42 linking error.

Basically the error appears when same implementation is referenced more than one in the project. Which mean in my case some of the .m files from FBSDKCoreKit are added more than once, it is difficult to find how those files added twice, but usually it happens when libraries are linked through pods as well as manually ( typically in old projects libraries might have also linked using ReactNative link command)

Now question is why Xcode 14 started giving errors? which was not the case earlier with lower version of Xcodes ? this is basically because the latest Xcode checks strictly many things and it starts complaining.

Is it the only solution which fix this issue ? well that I am not sure, there are many more solutions giving in StackOverflow as well as GitHub, some fixes might work for you. Here are those references for you, in case my fix doesn’t work for you ๐Ÿ™‚

References:

1. Github Post- duplicate symbols for architecture x86_64 React Ntaive version 0.64 #32016

2. Github Post – duplicate symbols for architecture x86_64 React Ntaive

3. Stack over flow post – Duplicate Symbols for Architecture arm64

Platform Architecture in Computer Science: With Multiple Apps Approach

There are many ways to design the platform architecture, however every platform has its own unique requirements. The architecture of every platform can vary totally to meet the needs of respective platform.

There are many case studies to look into platform architecture which I will cover in different article, we can look into linked-in, ebay, Amazon and netflix architectures to get better understanding on Platform architecture.

For now in this article we will understand first approach that Having Multiple Apps with its own independent Database and Backend. For our understanding purpose we will consider designing a platform for an Amazon Kind of Online Shopping Platform

Read Basics of Platform Architecture before further reading

Platform Architecture for Amazon Kind of Online Shopping Platform with Multiple Apps Approach

If you consider Amazon kind of Online Shopping Platform, we first have to identify which are the different huge modules which are candidates for making it as a separate app altogether

  1. Sellers or Vendors who sell the products
    1. Seller is the one who has his shop and sell products in amazon
    2. He should be able to add his products
    3. He should be able to manage discounts, offers for his products
    4. He should be able to dispatch his product
    5. He should be able to manage his revenue/profit and other finance aspects
  2. Buyers
    1. The one who buy products in Amazon
    2. He should be able to manage his Cart
    3. He should be able to manage his delivery addresses
    4. He should be able to do payment using his choice of payment mode
  3. Product Dispatch Management
    1. Tracking the product while dispatching from one place to another
    2. Every city has a collection centers and products has to be managed for timely delivery
  4. Products Delivery Management
    1. Once product is reached the destination city it has to be picked by delivery person
    2. Assign delivery person
    3. Deliver to customer and update the status
    4. receive cash in case is Cash-On-Delivery
  5. Amazon Finance Management
    1. This is kind of Super Admin Functionality
    2. Managing refunds
    3. managing failed transactions
    4. Transferring money to Seller

I listed only few functionalities however there will be many more under each of these main features.

Why Can’t be its one super big Monolithic Application ? Rather than multiple Apps ?

To answer this question we have to think of following important aspects which we covered in our first Article Which are as follows

  1. Scalability : For Amazon Kind of Applications, millions of requests will be coming every second. There are millions of users buying and millions of sellers selling and millions of products listed, millions of transactions happening. It is highly impossible to handle everything in one huge monolithic server, because every server has some upper limits with respect to hardware and capacity, one huge database to scale it to that level we have to divide it into multiple pieces and manage it independently.
  2. Maintainability: It is very hard to maintain one huge monolithic app for such a huge volume.
  3. Resilient: Any major update to particular part of the platform should not affect to other parts of the platform
  4. Development: For amazon kind of huge platforms, they have huge team spread across the world and each teach is enhancing their own module by doing lot of research within their small team. It is not possible to manage development activity effectively if its one huge monolithic app

Now let us see how the Architecture Diagram looks: You can use various apps for designing Architecture Diagram

In the above diagram, each app is one server and it has its own database. There are third party services used commonly across many apps, like

  1. Elastic Search Service : For faster product search, Elastic Database is must for better searching capability.
  2. Cloudinary is another service used for multi media file handling
  3. Authentication service is like firebase, auth0 for user authentication
  4. Many more such services will be used

Advantages of Multi Application Platform Architecture

Scalability: In this architecture the platform is scalable to handle high traffic, because during peak time like Amazon big billion day, more and more people will buy products, the traffic will be too high for Consumer App. So in that case if its independent server by itself, we can increase the capacity of that server alone to handle millions of requests, however other apps may not need so much so at this stage.

Continue Reading : Where API Gateway and GraphQL Fit in Platform Architecture

Web Services – Chapter 1

We know a typical client-server communication model , where a client request for useful data and server responds with the valid data over network. The way of communication might differ based on the type of software running at server side, which means if a server is just an ftp server then one has to get the file by running an ftp command, if the type of resource is just a static html page then a simple http get request is sufficient and the communication can be achieved with a suitable communication protocol. The concept of web service gives real boost to the mode of communication between client and server. The client server model becoming more complex than ever with awesome facilities over the internet. Web services are identified as latest technological changes that is enriching the world of business. Software modules written on any language can talk to each other to transfer a set of resources over the internet. This was not the case before web services, with the help of web services both client and server became loosely coupled. With this overview of web services, let us define the web services and understand the concept in depth.

Definition Of Web Services –

Web service is a mode of communication between two devices provided by a software system running at network address over the web, designed and developed to support interoperable machine-to-machine communication over the internet.

The term interoperable in the above definition means a lot when we discuss about web services. The simplest meaning of interoperability is working together, irrespective of the type of communicating devices , both the devices should be able to share the information by exchanging data in the form of specific data format or communication protocols to produce a meaningful result.

To make the concept more clear , let us take an example which describes where and how web services sits in the entire process of communication.

-Assume that you have a set of huge data stored in your server, the data which is collected from your extensive research on physics. If you would like to share your data to the external world in a very meaningful structured way then you canโ€™t just post every data on your website. Because sharing data in a web site is not a structured way , structured way means according to me , share every bit of data but one should use it as per their need.

If one wants data related to astrophysics could be able to fetch only related data, if one wants data related to modern physics could be able to fetch only related data. To achieve this the only best approach is web services.

Develop a software module that query the related set of data from your server and responds to the client by sending only that piece of information. The client here may be of any kind, It might be a mobile application, tablet application, desktop application or web application. Irrespective of the type of client, your software module responds the right information as per the incoming request. Let us understand this with the help of architectural diagram.

Web Services – Architectural Diagram

Architecture Web Services

 

Above diagram is self explanatory which describe about 5 modules , the important point that is clear from the architecture is, a web service software module deployed in the server is capable to process request from any type of client and serve the requested information, this is what we call as interoperability. Web services hence take the web technology to the next level.

How is that Practical –

So far what we discussed is just a theoretical approach of understanding web services. Being a software developer you will be interested to learn how to develop/consume web services. Web services can be developed using any server side

language , Java, C# .net, PHP , Ruby On Rails etc.There are mainly two types of web services SOAP Services and RESTFul services.

1. SOAP Services – Web services can be developed by adopting SOAP protocol , where client-server communication happens by describing the details with WSDL ( Web Service Definition Language ). An XML language will be used to define the message format , which will be sent across the network.

2. RESTFul Services – Representational State Transfer is an information transfer , the services responds to the request with a help of unique service URL and set of data as input for the service. XML is not mandatory , the data can be passed either in plain text or JSON format.

We will learn development of RESTFul web services using Java in our next chapter.