Learning with microservices

This is some brainstorming around creating a lesson where students learn functional programming using microservices.

Learning goals:

  • types: integer, float, boolean, string
  • data structures: list, dictionary

Protocol:

  • all data is transmitted as JSON. Each endpoint may receive JSON params. The microservice is specified

User Interface:

  • There should be a global availability view showing services, uptime, average load, and response times.

  • Within code, other services are invoked via:

    service(“service_name”, params=None)

  • Each service must also be introspectable, listing the services upon which it depends.

  • Each service should be pingable, so that we can update the dependency chart.

  • Each service should be runnable locally ot deployable: that is, the server should be able to pull the repo and deploy it.

    • When running locally, we must assume that services aren’t available from the Internet, so

The call to service will be centralized at the server, so that we can log usage and availability data, and so that we can handle connection errors gracefully.

Pedagogy:

  • We need to design challenges in which many microservices work together to accomplish some real-world task. This probably means accessing real-world datastores. Perhaps a personal dashboard using textual?

Serverside

Maybe Making With Code should morph into a PHeT-style repository of server-side tools enabling fun CS projects. Users can log in and turn on server projects supporting pedagogy. For example, a teacher could turn on the “microservices” project and then students would be able to create microservices. An authentication mechanism similar to gh or aws CLI tools would allow students to interact with the server over protected connections.