Concurrency and Modules
Client and Server Threads
Replay one Ruby execution where a client request loads a server helper file.
file panels
When an example has more than one source file, replay keeps each file in its own panel while preserving one ordered trace stream. The Variables panel follows the actual `require_relative` load into the server file and the returned response back to the client.
boundary
The client owns the selected command and visible output. The server owns the response rule for that command.
Project Entry
request_client.rb
Replay: real traced execution (multi-file project)
command = "status"
label = command
if command == "ping"
label = "health"
elsif command == "count"
label = "metrics"
end
require_relative "request_server"
response = handle_request(command)
ticket = 40 + command.length
puts "label=#{label}"
puts "ticket=#{ticket}"
puts response
command = "ping"
label = command
if command == "ping"
label = "health"
elsif command == "count"
label = "metrics"
end
require_relative "request_server"
response = handle_request(command)
ticket = 40 + command.length
puts "label=#{label}"
puts "ticket=#{ticket}"
puts response
command = "count"
label = command
if command == "ping"
label = "health"
elsif command == "count"
label = "metrics"
end
require_relative "request_server"
response = handle_request(command)
ticket = 40 + command.length
puts "label=#{label}"
puts "ticket=#{ticket}"
puts response
command ← status, label ← status
1command→ status = "status" #@command="ping", "count"2label→ status = commandstatus34if command == "ping"5 label = "health"6elsif command == "count"7 label = "metrics"8end910require_relative "request_server"1112response = handle_request(commandstatus)13ticket = 40 + command.lengthaccess ← ok, response ← service ready
1command = "status" #@command="ping", "count"2label = command34if command == "ping"5 label = "health"6elsif command == "count"7 label = "metrics"8end910require_relative "request_server"1112response = handle_request(command)13ticket = 40 + command.lengthvalues this stepokaccessservice readyresponsestatuscommandresponse ← ok:service ready, ticket ← 46
12response→ ok:service ready = handle_request(commandstatus)13ticket→ 46 = 40 + command.length61415puts "label=#{labelstatus}"16puts "ticket=#{ticket46}"17puts responseok:service readyoutputlabel=status ticket=46 ok:service ready