The real-time use-case for beginners to think about.

The real-time use-case for beginners to think about.

Hello LinkedIn Fam, Today's topic, let's discuss a real-time use case, that can be built.

Feature to be build

As a application mobile user, I want the capability to scan QRCode and access the application on the browser, so that I can use the application more handily on a desktop.

1) Launch xyz.com

2) Display the QR Code

3) From the mobile app scan the QR code

4) Valid/Invalid process

5) log in to the account on the web browser

Key Pointers to consider

  1. The site domain can be set up in CloudFlare, NameCheap,
  2. NgxinX or API Gateway routing would be done to accept entries from outside and give them to your application
  3. UI & Server assets would be hosted on infrastructure.
  4. When UI talks to the server, ensure authentication & authorization is in place effectively.

QRCode service

  1. This generates QRCode,
  2. Tracks info in DB & in the cache
  3. Does timer QR-Validity management
  4. Processes QRCode - when the user scans code?

Use case: Display QRCode on the screen

  1. Via NGinX request comes to Controller,
  2. Reaches QRCodeService, for generating QRCode
  3. Returns back on UI, and is rendered on screen.

Usecase2: User scans QRCode

  1. Using the Mobile app user scans QRCode.
  2. The mobile app calls the server API, for validating the code
  3. Provides QRCode & PhoneIdentity details to the server
  4. The server validates the QR & phone & does the binding if VALID.
  5. Responds back to Mobile app, if it's VALID or NOT.

Usecase3: The browser should automatically login further once the Mobile scan is successful.

  1. Here either server should notify the UI that user is logged in - SocketIO
  2. Or Ui keeps polling for status.
  3. Here lightweight implementation would be Long Polling. For 5 mins to get the information.

In some cases, if companies decide to use a 3rdParty QRGenerator service

  1. then you would need to read the 3rdParty documentation, and accordingly see how to integrate into your system.
  2. Whatever way of integration is provided by 3rdParty, accordingly check how you can use it for meeting your business logic.

Please do think through, and process nicely.


要查看或添加评论,请登录

Tausief Shaikh ??的更多文章

社区洞察

其他会员也浏览了