vendredi 27 novembre 2020

Designing a network client library

I'm looking for guidance and/or best practices for designing a Network Client Library.

This library will be used by a client application to:

  • authenticate to an HTTP service (most likely RESTful)
  • submit some arbitrary data
  • poll for processing state
  • return the result

The most important design consideration is that the library should be very testable.

At this point I'm thinking:

  • Use something like command pattern to encapsulate requests/responses. This way I'll be able to mock requests/responses easily.
  • In the client application, separate network concerns from the business logic layer. This will ensure end to end testability.

The eventual implementation will be in Python, so if there are specific libraries you can recommend, I'd appreciate it.

What else am I missing? I bet this has been done before, I'm looking for some tribal knowledge, I guess.

Aucun commentaire:

Enregistrer un commentaire