isp-schema-spec.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. Properties and objects definition
  32. ====================================
  33. 3.1 progressStatus
  34. ==================
  35. This field is an enum specifiying the progress status of the ISP.
  36. Here is the definition of the values::
  37. 1. Project considered
  38. 2. Primary members found
  39. 3. Legal structure being created
  40. 4. Legal structure created
  41. 5. Base tools created (bank account, first members)
  42. 6. ISP partially functional (first subscribers, maybe in degraded mode)
  43. 7. ISP fully working
  44. 3.2 coveredArea.area
  45. =====================
  46. The "area" key of a coveredArea object is meant to represent a geographic area covered by the ISP. When present, it must contain a valid GeoJSON object, as defined in [geojson-spec]_.
  47. As an additional restriction, it MUST only contain GeoJSON geometries of type Polygon or MultiPolygon.
  48. 4. Implementing the format
  49. ==========================
  50. 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.
  51. 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).
  52. The ressource SHOULD be served with a MIME type of "application/json".
  53. The ressource SHOULD be reachable over HTTPS ([RFC2818]_).
  54. The ressource MUST be served over HTTP version 1.1.
  55. 4.1 Caching considerations
  56. --------------------------
  57. The HTTP ressource SHOULD provide an expiration time, either through the Cache-Control header's max-age directive or the Expires header.
  58. 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).
  59. Moreover, not all Cache-Control directives are guaranteed to be respected by clients, such as private, must-revalidate, no-cache, no-store.
  60. 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.
  61. 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.
  62. 5. References
  63. =============
  64. .. [RFC4627] Crockford, D., "The application/json Media Type for JavaScript Object Notation (JSON)",
  65. `RFC 4627 <http://tools.ietf.org/html/rfc4627>`_, July 2006.
  66. .. [json-schema-04] "JSON Schema: core definitions and terminology",
  67. `draft-zyp-json-schema-04 <http://tools.ietf.org/html/draft-zyp-json-schema-04>`_, January 31, 2013.
  68. .. [RFC2616] Fielding, R., Gettys, J. Mogul, J., Frystyk, H., Masinter, L., Leach P., and T. Berners-Lee,
  69. "Hypertext Transfer Protocol -- HTTP/1.1", `RFC 2616 <http://tools.ietf.org/html/rfc2616>`_, June 1999.
  70. .. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", `RFC 2119 <http://tools.ietf.org/html/rfc2119>`_, March 1997.
  71. .. [RFC2818] Rescorla, E., "HTTP Over TLS", `RFC 2818 <https://tools.ietf.org/html/rfc2818>`_, May 2000.
  72. .. [geojson-spec] The `GeoJSON Format Specification 1.0 <http://geojson.org/geojson-spec.html>`_, 16 June 2008.
  73. Appendix A. ISPs Examples
  74. =========================
  75. TODO