Skip to content

Commit 18229d9

Browse files
Merge pull request #24 from abstractive/battery
v0.4.0 overhaul to include the Battery/Cannon(s) model, of decentralized microservices.
2 parents ec15853 + 14bbff3 commit 18229d9

30 files changed

+978
-273
lines changed

CHANGES.md

Lines changed: 54 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,174 +1,182 @@
1-
# v201912161253-7Ng4 0.0.1.34
1+
# 202001090115-4Rn9 0.4.0
2+
* Overhaul to cover the Battery/Cannon(s) model, which also caused the revamp of `Mountpoint`, `Launcher`, and `Bazooka`.
3+
* Formally brought `Bazooka` ( and its Mountpount, `Shoulder` ) into a single process, easy to run with a few commands.
4+
* Now have the ability to operate one `nginx` instance which proxies one mount point which distributes to presences.
5+
* Needs to go through a cleaning cycle but this is by-far the best conception of the original idea yet, much further.
6+
* Color consoles, with activity movement that doesn't fly by too fast to notice.
7+
* Way too exhausted to go into further detail. "It's big" :)
8+
9+
# 201912161253-7Ng4 0.0.1.34
210
* Update "starting" log entry from `Artillery::Launcher` to show the mountpoint tuned to.
311

4-
# v201912161223-7Ng4 0.0.1.33
12+
# 201912161223-7Ng4 0.0.1.33
513
* Remove `artillery-mountpoint` from `executables:` in `shard.yml`
614

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

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

14-
# v201912131407-4Kg1 0.0.1.27
22+
# 201912131407-4Kg1 0.0.1.27
1523
* Fix YAML initialization on empty secrets.
1624

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

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

24-
# v201912102339-1Gg7 0.0.1.20
32+
# 201912102339-1Gg7 0.0.1.20
2533
* Fix --clear behavior
2634

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

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

33-
# v201912080930-UDp5 0.0.1.17
41+
# 201912080930-UDp5 0.0.1.17
3442
* --clear option to reset Crystal environment under `eval` handling
3543

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

39-
# v201912071857-ECp4 0.0.1.15
47+
# 201912071857-ECp4 0.0.1.15
4048
* Pull public directory from artillery.yml
4149

42-
# v201912071724-ECp4 0.0.1.14
50+
# 201912071724-ECp4 0.0.1.14
4351
* Crystal 0.31.1 support updates
4452

45-
# v201912071625-ECp4 0.0.1.13
53+
# 201912071625-ECp4 0.0.1.13
4654
* Updating to use fork of zeromq-crystal
4755

48-
# v201909210222-EFr7 0.0.1.12
56+
# 201909210222-EFr7 0.0.1.12
4957
* Attempting to change handling of `body` on request.
5058

51-
# v201905251606-AHv6 0.0.1.10
59+
# 201905251606-AHv6 0.0.1.10
5260
* Added --killall to bin/artillery
5361

54-
# v201905251606-AHv6 0.0.1.9
62+
# 201905251606-AHv6 0.0.1.9
5563
* Disable `bin/art` executable for now
5664
* Add `artillery.yaml` support for basic defaults
5765

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

61-
# v201905101815-8Nf9 0.0.1.6
69+
# 201905101815-8Nf9 0.0.1.6
6270
* Fix --port-zeromq= parameter.
6371

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

69-
# v201905101649-8Nf9 0.0.1.1
77+
# 201905101649-8Nf9 0.0.1.1
7078
* 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
7179
* Prepared for near future when bin/artillery can be added to $PATH, and is aware of where its codebase exists relative to PWD
7280
* Working examples in examples/demo as well as the abstractive/compass application being deployed live, then adding proactive/presence
7381

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

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

84-
# v201905101235-8Nf9 0.0.0.30
92+
# 201905101235-8Nf9 0.0.0.30
8593
* Fix path in require statement
8694

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

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

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

99-
# v201905100932-8Nf9 0.0.0.26
107+
# 201905100932-8Nf9 0.0.0.26
100108
* Restructure examples/demo as example of `bazooka` invokation
101109

102-
# v201905100918-8Nf9 0.0.0.25
110+
# 201905100918-8Nf9 0.0.0.25
103111
* Provide src/artillery/bazooka and bin/bazooka
104112
* Update bin/artillery to launch PWD as bazooka instance
105113

106-
# v201905100908-8Nf9 0.0.0.24
114+
# 201905100908-8Nf9 0.0.0.24
107115
* Fix permissions of bin/ commands
108116

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

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

117-
# v201905100331-7Mf8 0.0.0.21
125+
# 201905100331-7Mf8 0.0.0.21
118126
* Clean up examples
119127

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

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

132-
# v201905091930-7Mf8 0.0.0.14
140+
# 201905091930-7Mf8 0.0.0.14
133141
* Giving up on #18 for now
134142

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

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

148-
# v201905071408-5Kf6 0.0.0.10
156+
# 201905071408-5Kf6 0.0.0.10
149157
* Added minimal benchmarking.
150158

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

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

161-
# v201905070225-4Jf5 0.0.0.4
169+
# 201905070225-4Jf5 0.0.0.4
162170
* Anticipate `nginx` setup process
163171
* Add failing tests for `Mountpoint`, `Launcher`, and `Projectile`
164172
* Add `Logger` module skeleton
165173

166-
# v201905070047-4Jf5 0.0.0.3
174+
# 201905070047-4Jf5 0.0.0.3
167175
* Routing of HTTP from `mountpoint` through ZeroMQ to `launchers`
168176

169-
# v201905070024-4Jf5 0.0.0.2
177+
# 201905070024-4Jf5 0.0.0.2
170178
* Examples minimally testing ZeroMQ
171179
* Instructions to setup ZeroMQ
172180

173-
# v201905062347-4Jf5 0.0.0.1
181+
# 201905062347-4Jf5 0.0.0.1
174182
* Initial releases of empty shard

NGINX.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/benchmarking.cr

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
require "benchmark"
2+
require "await_async"
3+
require "http"
4+
5+
def fetch_websites_async
6+
%w[
7+
abstractive.zero
8+
cornerstone.zero
9+
daykeeper.zero
10+
delimiter.zero
11+
digitalextremist.zero
12+
freed.zero
13+
paraclete.zero
14+
proactive.zero
15+
revamper.zero
16+
].map do |url|
17+
async! do
18+
length = Benchmark.measure {
19+
HTTP::Client.get "http://#{url}/test"
20+
}
21+
{
22+
speed: length,
23+
fqdn: url
24+
}
25+
end
26+
end
27+
end
28+
29+
await(5.seconds, fetch_websites_async).each do |response|
30+
puts "URL: #{response[:fqdn]} // #{response[:speed]}"
31+
end

examples/demo/shard.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
name: artillery-demo
2-
version: 0.0.0.9
3-
4-
dependencies:
5-
artillery:
6-
github: abstractive/artillery.cr
1+
name: artillery-demo
2+
version: 0.0.0.9
3+
4+
dependencies:
5+
artillery:
6+
github: abstractive/artillery.cr
7+
await_async:
8+
github: anykeyh/await_async
9+
branch: master

examples/shard.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: artillery-benchmark
2+
version: 0.0.2
3+
4+
dependencies:
5+
await_async:
6+
github: anykeyh/await_async
7+
branch: master

shard.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
name: artillery
2-
version: 0.0.1.34
2+
version: 0.4.0
33

44
description: Serverfree object-oriented microservice architecture.
55

66
authors:
77
- digitalextremist <[email protected]>
88

9-
crystal: 0.31.1
9+
crystal: 0.32.1
1010

1111
executables:
1212
- artillery
13-
- bazooka
1413

1514
license: MIT
1615

@@ -21,9 +20,9 @@ dependencies:
2120
github: digitalextremist/zeromq-crystal
2221
kemal:
2322
github: kemalcr/kemal
23+
radix:
24+
github: luislavena/radix
2425

2526
targets:
26-
artillery-mountpoint:
27-
main: src/processes/artillery-mountpoint.cr
28-
#de artillery-launcher:
29-
#de main: src/processes/artillery-launcher.cr
27+
artillery-battery:
28+
main: src/processes/artillery-battery.cr

src/artillery.cr

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
1-
require "zeromq"
2-
require "json"
3-
require "yaml"
4-
5-
#de Only load essentials.
6-
#de Individual applications in src/processes/ require their own specialized object requirements.
7-
8-
require "./artillery/initialize"
9-
10-
require "./artillery/overrides/*"
11-
require "./artillery/macros/*"
12-
13-
require "./artillery/logger"
14-
require "./artillery/shell/request"
15-
require "./artillery/shell/response"
16-
17-
require "./artillery/mountpoint"
18-
require "./artillery/launcher"
19-
require "./artillery/shot"
20-
21-
#de if Artillery::USE_SHOTS
22-
#de puts "SHOTS: #{Artillery::USE_SHOTS}"
23-
#de end
1+
require "zeromq"
2+
require "json"
3+
require "yaml"
4+
5+
#de Only load essentials.
6+
#de Individual applications in src/processes/ require their own specialized object requirements.
7+
8+
require "./artillery/initialize"
9+
require "./artillery/exceptions"
10+
11+
require "./artillery/overrides/*"
12+
require "./artillery/macros/*"
13+
14+
require "./artillery/logger"
15+
16+
require "./artillery/shell/request"
17+
require "./artillery/shell/response"
18+
19+
require "./artillery/protocols"
20+
require "./artillery/armament"
21+
require "./artillery/armory"
22+
23+
#de require "./artillery/mountpoint"
24+
#de require "./artillery/launcher"
25+
require "./artillery/shot"
26+
27+
#de if Artillery::USE_SHOTS
28+
#de puts "SHOTS: #{Artillery::USE_SHOTS}"
29+
#de end

0 commit comments

Comments
 (0)