[עושים תוכנה] איך כותבים API מנצח?

הורדת הפרק (mp3)
הם נמצאים בכל מקום, אנחנו צורכים אותם, מתכננים אותם וכותבים אותם כל הזמן.
אז נכון, לבנות API פשוט זה קל, אבל איך בונים API טוב באמת?
ואיזה טעויות רובנו עושים כשאנחנו מתכננים APIs ואפילו לא יודעים?
הפעם נארח את ממי לביא, ארכיטקט תוכנה ותיק בעל ניסיון רב בAPIs, שילמד אותנו איך לבנות APIs טובים יותר ויסייע לנו להבין איך הם עובדים מאחורי הקלעים.
האזנה נעימה!
עמית וחן

You may also like...

8 Responses

  1. אסף הגיב:

    פרק מצוין, תודה רבה!

  2. michael הגיב:

    .Very interesting talk Meni, it seems that you are confident in your knowledge and it shows.
    In regards to the problem you described with the uncertainty of which code to return in a case of a partial write error, the solution you presented seems like a fitting one; with that in mind, your
    API contract should be well representing of your business requirement. If your business logic requires 100% success rate for the API call to be a success(200), then you would return a 500 error and
    have the consumer of the API retry sending the request. In an enterprise company I work at, we have implemented a logging system for events that happen on the clients and these would get sent in
    batches to an API. In our case, we were ok with a specific logged event out of the batch not being processed due to the large sheer volume of data we had in total, so we were returning a 200 to the consumer and logging the issue that happened to an internal system(such as loggly or etc) to make sure we are aware of any issues that happen. At the end of the day, the choice between implementing a soft failure or a hard failure and the type of response that your API returns absolutely depends
    on your business requirements and might change between project to project. If you do end up returning a success code with additional information, that specific contract should be properly
    represented to your API's consumers via SWAGGER or any other technology that allows you to provide more information about your external API contracts. As long as your contract is well represented, I'd say that your API is up to standard.

  3. משתמש אנונימי (לא מזוהה) הגיב:

    ממש מעניין!!! תודה.
    מה לגבי rpc?

  4. א. הגיב:

    כמו תמיד, מחדש ומועיל.

כתיבת תגובה

האימייל לא יוצג באתר.