Upgrade to Pro — share decks privately, control downloads, hide ads and more …

On-demand image server with Python

On-demand image server with Python

This is about on-demand image server, the "fitter'

mingrammer

May 27, 2017
Tweet

More Decks by mingrammer

Other Decks in Programming

Transcript

  1. Name ӂ޹੤ (MinJae Kwon) Nickname @mingrammer Email [email protected] Who ই઱؀೟Ү

    ࣗ೐౟ਝয೟җ 3೟֙ / Backend Developer Blog https://mingrammer.com Facebook https://facebook.com/mingrammer Github https://github.com/mingrammer Eng Blog https://medium.com/@mingrammer
  2. 2. ѐߊ زӝ 5. दաܻয় 3. рױೠ ইఃఫ୊ Contents 6.

    Next & Future 1. ৡ٣ݔ٘ ੉޷૑ ࢲߡ? 4. ݽٕ ҳഅ୓
  3. ৡ٣ݔ٘ ੉޷૑ ࢲߡ? ੉޷૑ܳ ࢎਊೞח Ѣ੄ ݽٚҔ ׮নೠ ࢎ੉ૉ੄ ੉޷૑о

    ೙ਃೠ ݽ߄ੌ জ ੉޷૑ ӝ߈ ࢲ࠺झ ੸ਊ оמೠ ࢲ࠺झ
  4. ѐߊ زӝ 1. ഥࢎীࢲ ٣੗੉ցо ੉޷ ٜ݅য֬਷ ੉޷૑ ࢎ੉ૉ੄ ߸҃੉

    ೙ਃ 2. ੉޷૑ ਗࠄਸ о૓ ٣੗੉ցীѱ ࢎ੉ૉ ߸҃ ਃ୒੉ ೙ਃ 3. рױೠ ੘সੋ Ѫী ࠺೧ ࣗਊغח ࠺ਊ੉ ֫਺ 4. ٜ݅੗!
  5. ѐߊ زӝ ׼द ഥࢎীࢲ ೙ਃೠ ੉޷૑ ܻࢎ੉૚ ӝמ਷ ੉޷૑ ࠺ਯ݅

    ਬ૑೧ࢲ “width”݅ ઑ੺ೞҊ நयೞח ӝמ ٯ ೞա But
  6. рױೠ ইఃఫ୊ API Server Configuration Parser Fitter Configuration Storage Source

    Store s3 fs Engine Thumbnail Flip Resize Rotate Various mode
  7. рױೠ ইఃఫ୊ API Server Configuration Parser Fitter Configuration Storage Source

    Store s3 fs Engine Thumbnail Flip Resize Rotate Cache Server Caching the generated image
  8. рױೠ ইఃఫ୊ API Server Configuration Parser Fitter Configuration Storage Source

    Store s3 fs Engine Thumbnail Flip Resize Rotate Cache Server Cache Store Manage the cache store
  9. рױೠ ইఃఫ୊ API Server Configuration Parser Fitter Configuration Storage Source

    Store s3 fs Engine Thumbnail Flip Resize Rotate Cache Server Cache Store in-memory redis Supports in-memory and redis
  10. рױೠ ইఃఫ୊ API Server Configuration Parser Fitter Configuration Storage Source

    Store s3 fs Engine Thumbnail Flip Resize Rotate Cache Server Cache Store in-memory redis Paramter Validator Validate the parameters
  11. рױೠ ইఃఫ୊ API Server flask Configuration Parser pyyaml Storage boto3

    requests Engine wand Cache Server Cache Store redis-py Paramter Validator Python Fullstack
  12. Double caching? ݽٕ ҳഅ୓ Check Cache Server Check Store Storage

    Generate Use cached Use cached exists exists not not
  13. How to use different classes on same function? ݽٕ ҳഅ୓

    Stroage S3 File System Cache Store Source Store Source Store In memory Redis class … class … class … class … class … class …
  14. How to use different classes on same function? - Use

    Interface-like class ݽٕ ҳഅ୓
  15. How to use different classes on same function? - Use

    Interface-like class ݽٕ ҳഅ୓
  16. How to use different classes on same function? - Use

    Interface-like class ݽٕ ҳഅ୓ Two types are totally different but they have same interfaces!
  17. We are the world - Combine these modules! ݽٕ ҳഅ୓

    Validate Params Cache Interface Storage Interface Storage Interface Parsing Config Transform Interface Check Cache Store Check Storage Transform Engine Handle Storage
  18. दաܻয় 1. ۽ஸ ӝ߈ ੉޷૑ ߸ജ ో 2. ੉޷૑ ߸ജ

    ߂ ௿ۄ਋٘ ߔস ో 3. ߔূ٘ ৡ٣ݔ٘ ੉޷૑ ࢲߡ
  19. दաܻয় 1. ۽ஸ ӝ߈ ੉޷૑ ߸ജ ో 2. ੉޷૑ ߸ജ

    ߂ ௿ۄ਋٘ ߔস ో 3. ߔূ٘ ৡ٣ݔ٘ ੉޷૑ ࢲߡ
  20. दաܻয় What is ‘get’? show : Retrieve the image information

    asynchronously (not yet)
 get : Retrieve the image information synchronously redirect : Redirect to url of transformed image
  21. Next & Future 1. In memory நद झషয ૑ਗ 2.

    ࠺زӝ ୊ܻ ૑ਗ (Celery) 3. স۽٘ ߂ ৻ࠗ ੉޷૑ ୊ܻ ૑ਗ 4. ୶о ২࣌ (Size, Prefix, Shard ١) ૑ਗ 5. ੉޷૑ ୊ܻ ঘ࣌ ୶о (Crop ١) 6. ࢸ੿/प೯ਊ fitter CLI ઁҕ 7. ۽ஸ ߸ജోਊ ௑ࣛ ઁҕ 8. పझ౟ ௏٘ ੘ࢿ 9. ޙࢲച 10. ٣೒۽੉ ೐۽ࣁझ ઁҕ (Pluggable Service)