architecture icon indicating copy to clipboard operation
architecture copied to clipboard

Asynchronous Import

Open naydav opened this issue 6 years ago • 2 comments

  • Intro
  • REST API
  • Modularity (API / Extension points)

naydav avatar Oct 23 '19 19:10 naydav

After digging a little bit into this issue, the following assesment has come out:

It turns out that the class RetrieveSourceData contains the source validator actor that wraps all the possible validator to a specific source data retriever(strategy), this means that each strategy must comply with the validations defined by di.xml:

image

This forces me to assume a sort of data contract where a new strategy(json's in this case), must fit such a data contract. Not empty: sourceType, sourceDefinition, sourceDataFormat; and also sourceDefinition must come in valid base64 format.

This way, coming down to Json strategy, i understand that sourceDefinition field is a json encoded in base64, if this is ok then i assume that it is actually a csv translated into json, so the data strategy retriever takes this chunk and translate it into array iterator as if a magento standard csv was.

ticaje avatar Nov 03 '19 19:11 ticaje

Related to https://github.com/magento/architecture/pull/330#discussion_r344402912

AsyncImportUML

Its a high level diagram, hope will help a bit

nuzil avatar Nov 19 '19 15:11 nuzil