create-to-elastic-search-db.msd 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #//# --------------------------------------------------------------------------------------
  2. #//# Created using Sequence Diagram for Mac
  3. #//# https://www.macsequencediagram.com
  4. #//# https://itunes.apple.com/gb/app/sequence-diagram/id1195426709?mt=12
  5. #//# --------------------------------------------------------------------------------------
  6. title "3P(Product Page Parser) API "
  7. participant User as user
  8. participant kkspider_API as front
  9. participant kkspider_ERP_DB as db
  10. participant Elastic_DB as elastic
  11. participant kkscrap_API as back
  12. participant Mailer as mailer
  13. activate front
  14. activate back
  15. user->front: Domain URL
  16. front->back: request solution-type-get\n with domain URL
  17. back->back: get solution/theme type\n with URL main page html
  18. alt [if it is imposible to find solution/theme type from existing function]
  19. back->mailer: send error mail\n to admin/developer/user
  20. back->front: respose 605 with {error message}
  21. back->front: if NOT reponse 200\n {solution type and theme(skin) code}
  22. end
  23. front->db: save solution type for thr domain URL
  24. loop [ for until finished ]
  25. front->front: find all URIs from given website
  26. front->front: delete URIs if pages are\n NOT product page
  27. db->front: read URI record
  28. front->db: create or update URI record\n after cheching if exists or is updated
  29. end
  30. front->back: request product-page-parse\n with{solutin type and URI array}
  31. back->back: parse all URI for product page
  32. alt [if it is imposible to parse from existing function]
  33. back->mailer: send error mail\n to admin/developer/user
  34. back->front: respose 605 with {error message}
  35. back->front: if NOT reponse 200\n normalized json contents
  36. front->elastic: save json contents in Elastic DB
  37. deactivate back
  38. deactivate front
  39. deactivate member