Sometimes you'll have objects that manage state along with event handling. This happens frequently in MVC apps. Let's start with a messy example:
var Launcher = function(rocket) {
this.rocket = rocket
}
Launcher.prototype.isReady = function() {
| HAPROXYTIME (?!<[0-9])%{HOUR}:%{MINUTE}(?::%{SECOND})(?![0-9]) | |
| HAPROXYDATE %{MONTHDAY}/%{MONTH}/%{YEAR}:%{HAPROXYTIME}.%{INT} | |
| HAPROXYHTTP <%{BASE10NUM}>%{SYSLOGTIMESTAMP} %{SYSLOGPROG}: %{IP:client}:%{INT:port} \[%{HAPROXYDATE:accept_date}\] %{NOTSPACE:frontend_name} %{NOTSPACE:backend_name}/%{NOTSPACE:server_name} %{INT:time_request}/%{INT:time_queue}/%{INT:time_backend_connect}/%{INT:time_backend_response}/%{NOTSPACE:time_duration} %{INT:http_status_code} %{NOTSPACE:bytes_read} %{DATA:captured_request_cookie} %{DATA:captured_response_cookie} %{NOTSPACE:termination_state} %{INT:actconn}/%{INT:feconn}/%{INT:beconn}/%{INT:srvconn}/%{NOTSPACE:retries} %{INT:srv_queue}/%{INT:backend_queue} \"(<BADREQ>|(%{WORD:http_verb} (%{URIPROTO:http_proto}://)?(?:%{USER:http_user}(?::[^@]*)?@)?(?:%{URIHOST:http_host})?(?:%{URIPATHPARAM:http_request})?( HTTP/%{NUMBER:http_version})?))?\" |
| version: '3' | |
| services: | |
| # FRONT | |
| chronograf: | |
| # Full tag list: https://hub.docker.com/r/library/chronograf/tags/ | |
| image: chronograf | |
| deploy: | |
| replicas: 1 | |
| placement: | |
| constraints: |
| # ===================================================================== # | |
| # BASIC CONFIGURATION | |
| # ===================================================================== # | |
| # Arch: "default", "x86_64", "aarch64". | |
| # "default" corresponds to the host architecture. | |
| arch: "default" | |
| # An image must support systemd and cloud-init. | |
| # Ubuntu and Fedora are known to work. |
| { | |
| "install": "pip3 install --user -r requirements.txt", | |
| "start": "PYTHONUNBUFFERED=true python3 server.py", | |
| "watch": { | |
| "ignore": [ | |
| "\\.pyc$" | |
| ], | |
| "install": { | |
| "include": [ | |
| "^requirements\\.txt$" |
| for node in $(knife search node "ohai_time:[* TO $(date +%s -d '30 days ago')]" -i); do | |
| knife client delete $node | |
| knife node delete $node | |
| done |
| # This is an example of the Stack Exchange Tier 1 HAProxy config | |
| # The only things that have been changed from what we are running are: | |
| # 1. User names have been removed | |
| # 2. All Passwords have been remove | |
| # 3. IPs have been changed to use the example/documentation ranges | |
| # 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
| userlist stats-auth | |
| group admin users $admin_user | |
| user $admin_user insecure-password $some_password |
| Use tcpdump to monitor mysql | |
| # Capture the packets | |
| sudo tcpdump -i eth0 port 3306 -s 65535 -x -n -q -tttt > tcpdump.out | |
| # analyze all the requests from a given host | |
| pt-query-digest --type=tcpdump --filter '($event->{host} || $event->{ip} || "") =~ m/192.168.248.64/' tcpdump.out |
| Aerobase | Keycloak | WSO2 Identity Server | Gluu | CAS | OpenAM | Shibboleth IdP | |
|---|---|---|---|---|---|---|---|
| OpenID Connect/OAuth support | yes | yes | yes | yes | yes | yes | third-party |
| Multi-factor authentication | yes | yes | yes | yes | yes | yes | yes |
| Admin UI | yes | yes | yes | yes | yes | yes | no |
| OpenJDK support | yes | yes | yes | yes | no | ||
| Identity brokering | yes | yes | yes | ||||
| Middleware | NGINX, Wildfly | Wildfly, JBOSS | WSO2 Carbon | Jetty, Apache HTTPD | any Java app server | any Java app server | Jetty, Tomc |
As tested on Linux: