Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 2.82 KB

starting-a-new-implementation.md

File metadata and controls

37 lines (27 loc) · 2.82 KB

Main Servirtium site: https://servirtium.dev

General Architecture

You're going to need a Recorder (to the markdown format), a replayer (from the markdown format), a server that can listen on a socket and work with the recorder or replayer. In the case of the recorder ("man in the middle"), the incoming requests are sent to the 'real' service too. In the case of the replayer, the "real service" is not involved.

How to start new language implementation

This is the suggested way of building Servirtium for a new language as it is methodical. That's useful because you may have to pause your development of this and restart later. So we're going to this in many small steps. The first isn't even about Servirtium at all.

Methodical is the idea here. This is all pausable/resumable as an activity. Indeed Fred and Wilma can pair on step 1, get busy on other important things, then Betty and Barney can pick up step 2 (from what was checked in) and continue.

Steps:

  1. Write a simple API class with tests
  2. Implement a rudimentary "playback" for the same test cases
  3. Adding "record" mode to what you have
  4. Make the recording of a test fail if it is different to what it was previously
  5. Add second and subsequent interaction handling
  6. Extract the library from the climate demo, to its own repo
  7. Other HTTP verbs other than 'GET'
  8. Mutation operations (Redaction, Mask, Delete)
  9. Add a capability for a "Note"
  10. Fail a playback step if the request is not as previously recorded
  11. Have a raw-serve (GET) capability for static content)
  12. Optional Markdown Settings
  13. Publish to package/module-land for your language family
  14. Proxy Server mode of operation
  15. Pass the compatibility suite
  16. Ensure compatibility with other language implentations

Notes on prior implementations

If you're making a new impl, you don't actually have to understand the architecture of previous implementations. Indeed, your impl may be better for not being educated on prior implementations.