Skip to content

Commit

Permalink
Merge pull request #24 from abstractive/battery
Browse files Browse the repository at this point in the history
v0.4.0 overhaul to include the Battery/Cannon(s) model, of decentralized microservices.
  • Loading branch information
digitalextremist authored Jan 9, 2020
2 parents ec15853 + 14bbff3 commit 18229d9
Show file tree
Hide file tree
Showing 30 changed files with 978 additions and 273 deletions.
100 changes: 54 additions & 46 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,174 +1,182 @@
# v201912161253-7Ng4 0.0.1.34
# 202001090115-4Rn9 0.4.0
* Overhaul to cover the Battery/Cannon(s) model, which also caused the revamp of `Mountpoint`, `Launcher`, and `Bazooka`.
* Formally brought `Bazooka` ( and its Mountpount, `Shoulder` ) into a single process, easy to run with a few commands.
* Now have the ability to operate one `nginx` instance which proxies one mount point which distributes to presences.
* Needs to go through a cleaning cycle but this is by-far the best conception of the original idea yet, much further.
* Color consoles, with activity movement that doesn't fly by too fast to notice.
* Way too exhausted to go into further detail. "It's big" :)

# 201912161253-7Ng4 0.0.1.34
* Update "starting" log entry from `Artillery::Launcher` to show the mountpoint tuned to.

# v201912161223-7Ng4 0.0.1.33
# 201912161223-7Ng4 0.0.1.33
* Remove `artillery-mountpoint` from `executables:` in `shard.yml`

# v201912160338-6Mg3 0.0.1.32
# 201912160338-6Mg3 0.0.1.32
* Allow passing Hash to Artillery::Shot#success which automatically converts to JSON

# v201912160106-6Mg3 0.0.1.30
# 201912160106-6Mg3 0.0.1.30
* Revamped Artillery::Shell::Request, especially Payload type and handling
* Setup proper target for artillery-mountpoint to begin using out of bazooka mode

# v201912131407-4Kg1 0.0.1.27
# 201912131407-4Kg1 0.0.1.27
* Fix YAML initialization on empty secrets.

# v201912131216-4Kg1 0.0.1.26
# 201912131216-4Kg1 0.0.1.26
* Add secrets.yml handling, and for now use git-secret to store in repository

# v201912131050-4Kg1 0.0.1.24
# 201912131050-4Kg1 0.0.1.24
* Allow override of configuration file name
* Pass content-type as `request.format` and pass JSON body as `request.data`

# v201912102339-1Gg7 0.0.1.20
# 201912102339-1Gg7 0.0.1.20
* Fix --clear behavior

# v201912101938-1Gg7 0.0.1.19
# 201912101938-1Gg7 0.0.1.19
* Change method of overriding shots/ so that Artillery can still filter its paths properly

# v201912101825-1Gg7 0.0.1.18
# 201912101825-1Gg7 0.0.1.18
* Allow override of shots location and base require ( allows for `Stellar` control of `Artillery` )

# v201912080930-UDp5 0.0.1.17
# 201912080930-UDp5 0.0.1.17
* --clear option to reset Crystal environment under `eval` handling

# v201912080912-UDp5 0.0.1.16
# 201912080912-UDp5 0.0.1.16
* Fix linefeeds on bin/* files, and do not send a default public/ directory from bin/artillery script

# v201912071857-ECp4 0.0.1.15
# 201912071857-ECp4 0.0.1.15
* Pull public directory from artillery.yml

# v201912071724-ECp4 0.0.1.14
# 201912071724-ECp4 0.0.1.14
* Crystal 0.31.1 support updates

# v201912071625-ECp4 0.0.1.13
# 201912071625-ECp4 0.0.1.13
* Updating to use fork of zeromq-crystal

# v201909210222-EFr7 0.0.1.12
# 201909210222-EFr7 0.0.1.12
* Attempting to change handling of `body` on request.

# v201905251606-AHv6 0.0.1.10
# 201905251606-AHv6 0.0.1.10
* Added --killall to bin/artillery

# v201905251606-AHv6 0.0.1.9
# 201905251606-AHv6 0.0.1.9
* Disable `bin/art` executable for now
* Add `artillery.yaml` support for basic defaults

# v201905101951-8Nf9 0.0.1.7
# 201905101951-8Nf9 0.0.1.7
* Tweak [README.md](README.md) to point to [ZEROMQ.md](ZEROMQ.md) setup walkthrough for `ZeroMQ` in Ubuntu-like environments.

# v201905101815-8Nf9 0.0.1.6
# 201905101815-8Nf9 0.0.1.6
* Fix --port-zeromq= parameter.

# v201905101805-8Nf9 0.0.1.5
# 201905101805-8Nf9 0.0.1.5
* Overhaul bin/artillery to use --port-http= --port-zeromq= --zeromq= ( schema ) --ip= ( exposed interface )
* Now it's possible to start independent clusters, and killing one doesn't affect the others on the same machine
* Adapt defaults for most constants / environment variables to pull from exports in bin/artillery, and artillery.yml in future

# v201905101649-8Nf9 0.0.1.1
# 201905101649-8Nf9 0.0.1.1
* Cleaned up, and added offset capability so that Artillery doesn't need to be installed in its own shard to run; if code present, use
* Prepared for near future when bin/artillery can be added to $PATH, and is aware of where its codebase exists relative to PWD
* Working examples in examples/demo as well as the abstractive/compass application being deployed live, then adding proactive/presence

# v201905101551-8Nf9 0.0.1.0
# 201905101551-8Nf9 0.0.1.0
* FINALLY: Resolved the phantom issues and entanglements of Crystal vs. Bash interactions, overcoming Crystal nuances
* bin/artillery script shaping up to be good control script, and usable in PWD context
* Turned off debugging excess, trimming and cleaning
* Major version increase; still alpha

# v201905101246-8Nf9 0.0.0.31
# 201905101246-8Nf9 0.0.0.31
* Found the issue. There were old Launchers running on this development environment. Sigh.
* Suppress bin/artillery errors if PIDs already dead

# v201905101235-8Nf9 0.0.0.30
# 201905101235-8Nf9 0.0.0.30
* Fix path in require statement

# v201905101231-8Nf9 0.0.0.29
# 201905101231-8Nf9 0.0.0.29
* Still chasing phantom object showing up but cannot possibly exist. The HelloWorld apocalypse
* Trim out artillery/bazooka.cr and include all elements in artillery.cr; bazooka becomes only an argument

# v201905101152-8Nf9 0.0.0.28
# 201905101152-8Nf9 0.0.0.28
* Fighting with wierd issue where Shots are persisting for no apparent reason.
* Add redirect support

# v201905100932-8Nf9 0.0.0.27
# 201905100932-8Nf9 0.0.0.27
* Become ghetto fabulous about Bazooka and use bash to parallelize vs. using fibers.
* Struggling to get invoked properly in roaming PWD

# v201905100932-8Nf9 0.0.0.26
# 201905100932-8Nf9 0.0.0.26
* Restructure examples/demo as example of `bazooka` invokation

# v201905100918-8Nf9 0.0.0.25
# 201905100918-8Nf9 0.0.0.25
* Provide src/artillery/bazooka and bin/bazooka
* Update bin/artillery to launch PWD as bazooka instance

# v201905100908-8Nf9 0.0.0.24
# 201905100908-8Nf9 0.0.0.24
* Fix permissions of bin/ commands

# v201905100906-8Nf9 0.0.0.23
# 201905100906-8Nf9 0.0.0.23
* Previous issue was that `Crystal` needs shards tagged with "v" prepended to version
* Fixed .gitignore that was removing `art` commands and `artillery`

# v201905100739-8Nf9 0.0.0.22
# 201905100739-8Nf9 0.0.0.22
* Show three sample installations in README.md before making the options actually work
* Add `artillery` CLI placeholder

# v201905100331-7Mf8 0.0.0.21
# 201905100331-7Mf8 0.0.0.21
* Clean up examples

# v201905100252-7Mf8 0.0.0.20
# 201905100252-7Mf8 0.0.0.20
* Massive dive into Crystal internals and returned alive
* Completed #19 and #20, essentially making this usable to start writing programs with
* Closes #10 by searching with Radix::Tree for what Shot to call

# v201905092000-7Mf8 0.0.0.15
# 201905092000-7Mf8 0.0.0.15
* Refactor Projectile to Shot per #14
* Rename src/run/ to src/processes/
* Attempt to fix #18 with discovery of port issue, but likely not a fix
* Yeah, it didn't work
* Added scripts/remake.sh to build bin/ processes

# v201905091930-7Mf8 0.0.0.14
# 201905091930-7Mf8 0.0.0.14
* Giving up on #18 for now

# v201905091840-7Mf8 0.0.0.13
# 201905091840-7Mf8 0.0.0.13
* Never Forget 5/9 // Mr. Robot
* Fixed versions for previous two entries
* Added Dockerfile.* and docker-compose.yml per #18
* Added first scripts per #18 also, need to test further
* Still debugging ZeroMQ issues for Docker containers
* Containers seem to build now, testing run

# v201905071408-5Kf6 0.0.0.11
# 201905071408-5Kf6 0.0.0.11
* Renamed `mount` to `mointpoint` for clarity, and lack of conflict with system binary.
* Clean up some expensive `puts` activity
* Prepare basic Dockerfile start points

# v201905071408-5Kf6 0.0.0.10
# 201905071408-5Kf6 0.0.0.10
* Added minimal benchmarking.

# v201905071331-5Kf6 0.0.0.9
# 201905071331-5Kf6 0.0.0.9
* Catch failure of socket and reset for `Launcher` and `Mountpoint` per #9
* Refactor `Projectile` toward storing routes differently in `Launcher`
* Beginning of `Projectile.vectors` leading to radix tree next
* Logger extends self

# v201905071124-5Kf6 0.0.0.7
# 201905071124-5Kf6 0.0.0.7
* Put in, wrestled with, and then ripped out msgpack.
* Tidied up, no tests at this early stage though as I figure out what even works.

# v201905070225-4Jf5 0.0.0.4
# 201905070225-4Jf5 0.0.0.4
* Anticipate `nginx` setup process
* Add failing tests for `Mountpoint`, `Launcher`, and `Projectile`
* Add `Logger` module skeleton

# v201905070047-4Jf5 0.0.0.3
# 201905070047-4Jf5 0.0.0.3
* Routing of HTTP from `mountpoint` through ZeroMQ to `launchers`

# v201905070024-4Jf5 0.0.0.2
# 201905070024-4Jf5 0.0.0.2
* Examples minimally testing ZeroMQ
* Instructions to setup ZeroMQ

# v201905062347-4Jf5 0.0.0.1
# 201905062347-4Jf5 0.0.0.1
* Initial releases of empty shard
8 changes: 0 additions & 8 deletions NGINX.md

This file was deleted.

31 changes: 31 additions & 0 deletions examples/benchmarking.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
require "benchmark"
require "await_async"
require "http"

def fetch_websites_async
%w[
abstractive.zero
cornerstone.zero
daykeeper.zero
delimiter.zero
digitalextremist.zero
freed.zero
paraclete.zero
proactive.zero
revamper.zero
].map do |url|
async! do
length = Benchmark.measure {
HTTP::Client.get "http://#{url}/test"
}
{
speed: length,
fqdn: url
}
end
end
end

await(5.seconds, fetch_websites_async).each do |response|
puts "URL: #{response[:fqdn]} // #{response[:speed]}"
end
15 changes: 9 additions & 6 deletions examples/demo/shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: artillery-demo
version: 0.0.0.9

dependencies:
artillery:
github: abstractive/artillery.cr
name: artillery-demo
version: 0.0.0.9

dependencies:
artillery:
github: abstractive/artillery.cr
await_async:
github: anykeyh/await_async
branch: master
7 changes: 7 additions & 0 deletions examples/shard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: artillery-benchmark
version: 0.0.2

dependencies:
await_async:
github: anykeyh/await_async
branch: master
13 changes: 6 additions & 7 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
name: artillery
version: 0.0.1.34
version: 0.4.0

description: Serverfree object-oriented microservice architecture.

authors:
- digitalextremist <[email protected]>

crystal: 0.31.1
crystal: 0.32.1

executables:
- artillery
- bazooka

license: MIT

Expand All @@ -21,9 +20,9 @@ dependencies:
github: digitalextremist/zeromq-crystal
kemal:
github: kemalcr/kemal
radix:
github: luislavena/radix

targets:
artillery-mountpoint:
main: src/processes/artillery-mountpoint.cr
#de artillery-launcher:
#de main: src/processes/artillery-launcher.cr
artillery-battery:
main: src/processes/artillery-battery.cr
52 changes: 29 additions & 23 deletions src/artillery.cr
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require "zeromq"
require "json"
require "yaml"

#de Only load essentials.
#de Individual applications in src/processes/ require their own specialized object requirements.

require "./artillery/initialize"

require "./artillery/overrides/*"
require "./artillery/macros/*"

require "./artillery/logger"
require "./artillery/shell/request"
require "./artillery/shell/response"

require "./artillery/mountpoint"
require "./artillery/launcher"
require "./artillery/shot"

#de if Artillery::USE_SHOTS
#de puts "SHOTS: #{Artillery::USE_SHOTS}"
#de end
require "zeromq"
require "json"
require "yaml"

#de Only load essentials.
#de Individual applications in src/processes/ require their own specialized object requirements.

require "./artillery/initialize"
require "./artillery/exceptions"

require "./artillery/overrides/*"
require "./artillery/macros/*"

require "./artillery/logger"

require "./artillery/shell/request"
require "./artillery/shell/response"

require "./artillery/protocols"
require "./artillery/armament"
require "./artillery/armory"

#de require "./artillery/mountpoint"
#de require "./artillery/launcher"
require "./artillery/shot"

#de if Artillery::USE_SHOTS
#de puts "SHOTS: #{Artillery::USE_SHOTS}"
#de end
Loading

0 comments on commit 18229d9

Please sign in to comment.