isp-schema-spec.rst 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ==========
  2. ISP format
  3. ==========
  4. ------------------------------------------------
  5. Schema specification & implementation guidelines
  6. ------------------------------------------------
  7. :Editor:
  8. Gu1 <gu1@cafai.fr>
  9. :Authors:
  10. FFDN diyisp schema working group
  11. :Revision:
  12. draft-1 (0.1)
  13. :Date:
  14. October 2013
  15. **Abstract:**
  16. The ISP format is a file format created and supported by the FDN Federation (FFDN) in order to help ISPs sharing its value to document and publish relevent informations regarding their status and progress in a common format.
  17. .. contents:: **Table of Contents**
  18. 1. Introduction
  19. ===============
  20. The ISP format is meant to allow an ISP to share relevant data and informations, such as its number of subscribers, the URL of its websites, chatrooms, etc... It was mostly created with small/diy/non-profit ISPs in mind, such as those in the FFDN.
  21. 1.1. Definitions
  22. ----------------
  23. * The ISP format itself is based on the JSON data format. The JavaScript Object Notation (JSON) format and its basic types are defined in [RFC4627]_.
  24. * The ISP format is mostly specified as a JSON Schema file, a JSON-based format for defining the structure of JSON data. JSON Schema is defined in the following IETF draft [json-schema-04]_.
  25. * The ISP format relies on HTTP/1.1 for data transfer [RFC2616]_.
  26. * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]_.
  27. 2. JSON Schema definition of the format
  28. =======================================
  29. .. include:: ../schema/0.1/isp.json
  30. :literal:
  31. 3. Implementating the format
  32. ============================
  33. An ISP implementing the ISP format MUST serve the file as a valid HTTP ressource named isp.json placed at the root (/) of its HTTP server.
  34. The ressource SHOULD be served on the ISP's main website (e.g. http://www.isp.org/isp.json). If that is not possible for some reason, the ISP MUST serve it on a subdomain (e.g. http://api.isp.org/isp.json).
  35. The ressource SHOULD be served with a MIME type of "application/json".
  36. The ressource SHOULD be reachable over HTTPS ([RFC2818]_).
  37. The ressource MUST be served over HTTP version 1.1.
  38. 3.1 Caching considerations
  39. --------------------------
  40. The HTTP ressource SHOULD provide an expiration time, either through the Cache-Control header's max-age directive or the Expires header.
  41. Please note that clients may choose to ignore the provided expiration time in cases where the value is deemed to low (e.g. a few seconds) or too high (e.g. a month).
  42. Moreover, not all Cache-Control directives are guaranteed to be respected by clients, such as private, must-revalidate, no-cache, no-store.
  43. A client may choose to cache the response for a low amount of time even in cases where a ressource explicitely disabled caching by providing a max-age of 0 or an Expires date set in the past.
  44. Additionally, a ressource SHOULD implement conditional requests by providing an ETag or Last-Modified header and responding to the If-Modified-Since or If-None-Match request headers properly.
  45. 3. References
  46. =============
  47. .. [RFC4627] Crockford, D., "The application/json Media Type for JavaScript Object Notation (JSON)",
  48. `RFC 4627 <http://tools.ietf.org/html/rfc4627>`_, July 2006.
  49. .. [json-schema-04] "JSON Schema: core definitions and terminology",
  50. `draft-zyp-json-schema-04 <http://tools.ietf.org/html/draft-zyp-json-schema-04>`_, January 31, 2013.
  51. .. [RFC2616] Fielding, R., Gettys, J. Mogul, J., Frystyk, H., Masinter, L., Leach P., and T. Berners-Lee,
  52. "Hypertext Transfer Protocol -- HTTP/1.1", `RFC 2616 <http://tools.ietf.org/html/rfc2616>`_, June 1999.
  53. .. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", `RFC 2119 <http://tools.ietf.org/html/rfc2119>`_, March 1997.
  54. .. [RFC2818] Rescorla, E., "HTTP Over TLS", `RFC 2818 <https://tools.ietf.org/html/rfc2818>`_, May 2000.
  55. Appendix A. ISPs Examples
  56. =========================
  57. TODO