官术网_书友最值得收藏!

Understanding the architecture of Pictorial Translator 

Following the architecture template defined in Chapter 2, Anatomy of a Modern AI Application, here is the architectural design for Pictorial Translator:

We will provide a web user interface for users to upload photos containing foreign text and then view the translation of the foreign text. The web user interface will interact with the Orchestration Layer containing two RESTful endpoints to handle the image upload and translation:

  • Upload Image Endpoint will delegate the image upload to our Storage Service:
    •  Storage Service provides an abstraction layer to AWS S3, where the uploaded photos will be stored, processed, and displayed from.
  • Translate Image Text Endpoint will delegate the detection of text within the photos to our Recognition Service and the translation of the detected text to our Translation Service:
    • The Recognition Service provides an abstraction layer to the Amazon Rekognition service, more specifically, the text detection capability of Rekognition. We named our service Recognition, which is more generic and doesn't directly tie us in with AWS Rekognition.
    • The Translation Service provides an abstraction layer to the Amazon Translate service to perform the language translation.

The Service Implememntation might seem redundant to some readers. Why not just have the endpoints talk to the AWS services directly instead of talking through another layer of abstraction? There are many benefits to architecting the application this way. Here are a few examples:

  • During development time, we can more easily build and test the application without dependency on AWS services. Any stub or mock implementation of these services can be used during development for speed, cost, and experimentation reasons. This lets us develop and iterate the application faster.
  • When other services that provide better storage, recognition, or translation capabilities come along, our application can switch to those capabilities by swapping to a new service implementation with the same abstraction interface. The user interface and the endpoints will not need to be modified to leverage these better capabilities. This gives our application more flexibility to adapt to changes.
  • This makes our code base more composable and reusable. The capabilities provided by these AWS services can be reused by other applications. These services are modular packages that can be more easily reused than the orchestration endpoints. The orchestration endpoints usually contain application-specific business logic that limits reuse.
主站蜘蛛池模板: 绍兴县| 湖北省| 乐安县| 镇原县| 肃北| 东乌| 铜鼓县| 明光市| 铁岭市| 凉城县| 米泉市| 汝阳县| 宕昌县| 兴城市| 浠水县| 靖州| 忻城县| 甘南县| 德庆县| 大厂| 西峡县| 临西县| 定南县| 荣昌县| 清涧县| 隆德县| 襄垣县| 泸水县| 和平区| 翁牛特旗| 沈丘县| 太仆寺旗| 紫阳县| 航空| 安泽县| 和静县| 巴塘县| 平塘县| 宜阳县| 丽水市| 吉林市|