Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensemble domains, executors, and supervisory services #1263

Open
wants to merge 59 commits into
base: master
Choose a base branch
from

Conversation

vyzo
Copy link
Collaborator

@vyzo vyzo commented Aug 10, 2024

Implements ensemble domains, with supervisory services and the first implementation of the global execution environment.

Work Items

  • introduce the concept of ensemble domains, which define hierarchical namespaces.
  • ensemble supervisory services
  • update httpd for proper ensemble
  • debugging
  • tooling
  • demo
  • update older ensemble commands for the new world order
  • tests
  • documentation:
    • api
    • tutorials:
      • update existing ensemble turorial
      • create advanced ensemble tutorial
      • update httpd tutorial for gxhttpd

@vyzo vyzo added this to the Gerbil v0.19: Benko milestone Aug 10, 2024
@vyzo vyzo requested a review from fare August 10, 2024 14:03
Copy link

netlify bot commented Aug 10, 2024

Deploy Preview for elastic-ritchie-8f47f9 ready!

Name Link
🔨 Latest commit e767fad
🔍 Latest deploy log https://app.netlify.com/sites/elastic-ritchie-8f47f9/deploys/66ce499b56e6640008ecd200
😎 Deploy Preview https://deploy-preview-1263--elastic-ritchie-8f47f9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fare
Copy link
Collaborator

fare commented Aug 11, 2024

Looks generally good, but

  • tests are required
  • not sure how you spawn tasks on other hosts (if you do)

@vyzo
Copy link
Collaborator Author

vyzo commented Aug 11, 2024

Of course, this is wip.

I made the server identifiers pairs of server id and ensemble domain.

I will do supervisors, executors, and yes tests, next.

@vyzo vyzo changed the title [WIP] Ensemble domains, executors, and supervisory trees [WIP] Ensemble domains, executors, and supervisory services Aug 19, 2024
@vyzo vyzo changed the title [WIP] Ensemble domains, executors, and supervisory services Ensemble domains, executors, and supervisory services Aug 27, 2024
@vyzo vyzo marked this pull request as ready for review August 27, 2024 21:44
@vyzo vyzo requested a review from a team August 27, 2024 21:46
Copy link
Collaborator

@belmarca belmarca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few quick comments after a first read-through. Second one is needed.

Comment on lines +9 to +15
(def server-config-option
(option 'config "-c" "--config"
help: "location of the httpd configuration; when running as a standalone server it defaults to $GERBIL_PATH/httpd/config; when running as part of an ensemble this option is ignored"))

(def ensemble-config-option
(option 'config "-c" "--config"
help: "location of the httpd ensemble configuration; it defaults to $GERBIL_PATH/ensemble/config"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the flags intentionally similar?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, they are not used concurrently, and i want a contextual help.

Comment on lines +45 to +47
(def config-path-option
(option 'config "-c" "--config"
help: "specify the configuration path"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another "-c" here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, i guess i could compress to just this.


```
1$ pushd site
1$ gerbil httpd -G project/.gerbil config --root www --enable-servlets --handlers '(("/handler" . :demo/handler))'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"-G" is used here but I can't find it in gxhttpd/opt.ss or the base httpd. Did I miss it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is in tools/env.ss

In the folling we see how we can run an httpd ensemble with a standalone supervisor.

First, let's configure the ensemble:
- first we configure the httpd as usual -- notice the use of `-G env/local` so that
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-G env/local -> lowercase 'g'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, we use that for a flat that says do global .gerbil

http requests with a (local) httpd ensemble each, and another host
acting as a load balancer using the example `rlb` program.

See [src/tutorial/advanced-ensemble/rlb](https://github.com/mighty-gerbils/gerbil/tree/master/src/tutorial/advanced-ensemble/rlb) for the `rlb` code.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the pr hasn't merged yet!

It is where the file is going to be.

Copy link
Collaborator

@drewc drewc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved without reading everything. Live! Master! Now! :P

@vyzo
Copy link
Collaborator Author

vyzo commented Aug 31, 2024

Let me fix the remaining broekn commands in gxensemble first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants