JSON Patch for Turning a Pull REST API into a Push
Résumé
REST APIs together with JSON are commonly used by modern web applications to export their services. Such an architecture however makes the services reachable in a pull mode which is not suitable for accessing data that periodically changes. Turning a service from a pull mode to a push mode is therefore frequently asked by web developers that want to access changing data and to get notified of performed changes. Converting a pull mode API into a push mode obviously requires to make periodical calls to the API but also to create a patch between each successive received versions of the data. The latter is the most difficult part and this is where existing solutions have some imperfections. To face this issue, we present a new JSON patch algorithm that is compliant with JSON Patch RFC, and that supports move and copy change operations. We implement our algorithm in a JavaScript library and evaluate its performance. Our evaluation done with real industrial data shows that our library creates small patches compared with other libraries, and creates them faster.
Domaines
Génie logiciel [cs.SE]Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...