cli icon indicating copy to clipboard operation
cli copied to clipboard

[Architecture] Use a server client model

Open sean-nicholas opened this issue 5 years ago • 2 comments

First things first: Just brainstorming here ;)

I looked into exoframe as an alternative to now.sh. They use a server client architecture. The CLI is a client connecting to the server which does the deployment etc. I like this idea because you cloud write a webUI which uses the same REST API and could easy scale up / down your deployments, etc. from your mobile.

Do you think it is possible to have something like this in snow? Maybe you use the cli to create the initial cluster & deploy the snow server into it. Later the cli talks only to the server which does the heavy lifting.

I have no idea if this works with kubernetes, but wanted to share my thoughts :)

sean-nicholas avatar Mar 15 '19 09:03 sean-nicholas

Client-server model

Before I began working on snow, I did my best to research alternatives. I, too, came across exoframe.

The benefits of a client-server model look appealing: instead of needing this basket of installed system dependencies, you instruct the server via REST endpoints to create deployments, update deployments, etc. If we were to explore such an approach, you'd still need kubectl on your system to initially authenticate to install the server component.

I considered this, but for an 0.x release, I wouldn't have the bandwidth to deliver it.

Dashboard

Kubernetes ships a feature called the Web UI (Dashboard): https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/

  • A UI dashboard for only viewing system state is one thing. Modifying the state of the system is another: we'd want to think about the security implications there. If your dashboard were to be compromised, your app could be taken down.
  • The Kubernetes dashboard is probably a little too powerful for people using snow. As you mention, we'd probably want our own (more limited) dashboard -- a GUI that had parity with the snow CLI commands. It would be fun to build such a thing. So many ideas, so little time! 😅
  • The dashboard could be built independently of the client/server model functionality (above).

Takeways

A better ecosystem surrounding snow would facilitate ease-of-use.

  • @snowjs/cli - Got this
  • @snowjs/dashboard - Web UI for cluster
  • @snowjs/server - REST interface for managing cluster

Taken to the next level:

  • @snowjs/app - Mobile client shipped to the app stores

petermikitsh avatar Mar 16 '19 18:03 petermikitsh

Great roadmap :) I totally understand that this is to much for a 0.x release.

I am happy to help in building such thinks. Unfortunately, I have no clue about kubernetes. If there is anything besides that, let me know how to help.

sean-nicholas avatar Mar 17 '19 12:03 sean-nicholas