Your SlideShare is downloading. ×
DUMP-2013 Serverside - Типичные ошибки проектирования API - Кирпичников Алексей
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

DUMP-2013 Serverside - Типичные ошибки проектирования API - Кирпичников Алексей

1,087
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,087
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. ТрудностипроектированияAPI
  • 2. api.sometaxi.ruПартнеры/request ➞/status/cancel ➞Приложения➞ /order➞ /status➞ /feedback➞
  • 3. client-api.sometaxi.ruПартнеры/request ➞/status/cancel ➞Приложения➞ /order➞ /status➞ /feedbackpartner-api.sometaxi.ru➞
  • 4. client-api.sometaxi.ruПартнеры/2.1/request ➞/2.1/status/2.1/cancel ➞Приложения➞ /1.0/order➞ /1.0/status➞ /1.0/feedbackpartner-api.sometaxi.ru➞
  • 5. 3.2.5
  • 6. .../3.2/...
  • 7. client-api.sometaxi.ru/2.1/request ➞/2.1/status/2.1/cancel ➞➞ /1.0/order➞ /1.0/status➞ /1.0/feedbackpartner-api.sometaxi.ru➞
  • 8. client-api.sometaxi.ru/2.1/request ➞/2.1/status/2.1/cancel ➞➞ /1.0/order➞ /1.0/status➞ /1.0/feedbackpartner-api.sometaxi.ru➞XML
  • 9. <?xml version="1.0" encoding="utf-8"><Order><From><Address>Хохрякова, 10</Address><DateTime>03.06.2013 12:00</DateTime></From>...</Order>XML
  • 10. <?xml version="1.0"?><soap:Envelopexmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Body xmlns:t="http://client-api.sometaxi.ru/xmlns"><t:Order><t:From><t:Address>Хохрякова, 10</t:Address><t:DateTime>2013-06-03T12:00+0600</t:DateTime></t:From>...</t:Order></soap:Body></soap:Envelope>XML
  • 11. <?xml version="1.0"?><!DOCTYPE lolz [<!ENTITY lol "lol"><!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;"><!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;"><!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;"><!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;"><!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;"><!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;"><!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;"><!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;"><!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;">]><lolz>&lol9;</lolz>XML
  • 12. {"from": {"address": "Хохрякова, 10","datetime": "2013-06-03T12:00+0600"},...}JSON
  • 13. client-api.sometaxi.ru/2.1/request ➞/2.1/status/2.1/cancel ➞➞ /1.0/order➞ /1.0/status➞ /1.0/feedbackpartner-api.sometaxi.ru➞XMLJSON
  • 14. /2.1/request ➞/2.1/status:driving/2.1/cancel ➞/2.1/status:cancelledpartner-api.sometaxi.ru➞200 OK200 OK200 OK200 OK➞
  • 15. /2.1/request ➞/2.1/status:driving/2.1/cancel ➞/2.1/status:waitingpartner-api.sometaxi.ru➞200 OK200 OKrequest timeout200 OK?➞
  • 16. /2.1/request ➞/2.1/status:driving/2.1/cancel ➞/2.1/cancel ➞/2.1/cancel ➞.../2.1/status:waiting/2.1/status:cancelledpartner-api.sometaxi.ru➞200 OK200 OKrequest timeoutrequest timeoutrequest timeout...410 Gone!200 OK :)➞➞
  • 17. {"from": {"city": "Москва","address": "Хохрякова, 10","datetime": "2013-06-03T12:00+0600"},"user": {"name": "Алексей","phone": "+79001112233"},...}/1.0/order
  • 18. {"from": {"city": "00001","address": "Хохрякова, 10","datetime": "2013-06-03T12:00+0600"},"user": {"phone": "+79001112233"},...}/1.0/order
  • 19. {"from": {"city": "00001","address": "Хохрякова, 10","datetime": "2013-06-03T12:00+0600"},"user": {"name": "","phone": "+79001112233"},...}/1.0/order
  • 20. {"from": {"city": "00001","address": "Хохрякова, 10","datetime": "2013-06-03T12:00+0600"},"user": {"name": " ","phone": "+79001112233"},...}/1.0/order
  • 21. Пользователь — не друг.Умейте его банить.
  • 22. МелкимшрифтомИспользуйте возможности протоколаgzipkeepaliveПишите примеры использованияпример значения поляпример целого запросапример целого приложения на популярном языкеВедите подробные логи•––•–––•
  • 23. Старший разработчикЯндекс.Таксиalexkir@yandex-team.rubeevee_ruСпасибоАлексей Кирпичников

×