Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: anthdm/hollywood
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0-beta.2
Choose a base ref
...
head repository: anthdm/hollywood
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Mar 4, 2023

  1. Copy the full SHA
    21b6c41 View commit details

Commits on Mar 5, 2023

  1. Added new test case for actor.Context.GetPID for search with tags. (#26)

    * fixed context.GetPID method for names without tags.
    
    * added test for pid search with tags by actor.Context
    mczechyra authored Mar 5, 2023
    Copy the full SHA
    2841b44 View commit details

Commits on Mar 6, 2023

  1. Copy the full SHA
    bae4cfa View commit details

Commits on Mar 13, 2023

  1. Unstable (#28)

    * Fixed CPU usage caused by polling inboxes
    
    * fixed padding in ggq
    
    * README updates
    
    * doc fix
    
    * more doc updates and fixes
    
    * fixed bug where processes did not cleanup when reaching max restarts
    
    * Added SetOutput for the logger
    anthdm authored Mar 13, 2023
    Copy the full SHA
    7b48e18 View commit details

Commits on Apr 17, 2023

  1. Copy the full SHA
    fa30610 View commit details

Commits on Apr 21, 2023

  1. Added prometheus metrics middleware example (#33)

    * Added prometheus metrics middleware example
    
    * updated Makefile
    
    * removed bad test
    
    * Added the options to configure the restart delay
    anthdm authored Apr 21, 2023
    Copy the full SHA
    3cc6d83 View commit details

Commits on May 5, 2023

  1. Copy the full SHA
    011a4bc View commit details

Commits on Aug 14, 2023

  1. Merge dev into master (#45)

    * Stop the ticker when calling stop on SendRepeater
    
    * replaced GGQ with RingBuffer implementation
    anthdm authored Aug 14, 2023
    Copy the full SHA
    57c621d View commit details

Commits on Aug 30, 2023

  1. Refactor chat (#47)

    * examples/chat/client: Refactor to use bufio.Scanner
    
    * examples/chat/client: Refactor to inject listen/connect interfaces and ports
    
    * examples/chat/server: Refactor to inject listening interface and port
    
    * examples/chat/server: Refactor use select{} instead of an empty channel.
    
    * examples/chat/build.sh: Replace with types/generate.go
    
    * examples/chat/server: Add missing flag.Parse.
    
    * examples/chat/types/generate.go: Remove extra proto_proto.
    yarcat authored Aug 30, 2023
    Copy the full SHA
    b68a4c4 View commit details
  2. Inbox stop (#50)

    * added process status stopped
    
    * try recover when panic on process start
    
    * add condition in for loop
    
    * Atomically check inbox stopped status + test
    
    ---------
    
    Co-authored-by: Terri Prifti <terriprifti@gmail.com>
    anthdm and tprifti authored Aug 30, 2023
    Copy the full SHA
    bd6a765 View commit details
  3. Poison (#46)

    * poison returns a wait group api
    
    * clean API
    
    * updated README
    anthdm authored Aug 30, 2023
    Copy the full SHA
    72c7722 View commit details

Commits on Nov 14, 2023

  1. Copy the full SHA
    d40a37c View commit details
  2. replace logrus with log/slog from stdlib (#55)

    * added loggers to the various structs. code runs.
    
    * ignore .idea (Goland)
    
    * just needs 1.20 (slog)
    
    * wire up the logging
    
    * re-order code for readability
    
    * pass the logger down the chains as things initialize.
    
    * use slog directly.
    
    * config now has multiple members.
    
    * add logger to config
    
    * add logger to event_stream.
    
    * remove the attachlogger, it was fugly
    
    * set up some logging in the hello world example.
    
    * add a section about logging to the README. Reformat long lines for easier editiing.
    
    * bump go version.
    
    ---------
    
    Co-authored-by: Anthony De Meulemeester <cryptoanthdm@gmail.com>
    perbu and anthdm authored Nov 14, 2023
    Copy the full SHA
    58f1195 View commit details

Commits on Nov 17, 2023

  1. Copy the full SHA
    51023ac View commit details
  2. Copy the full SHA
    244f0bb View commit details

Commits on Nov 26, 2023

  1. Replace mutex-guarded map with sync.Map (#63)

    * randomize listen port. makes the tests pass on macos.
    
    * rip the mutex out of safemap.
    
    * Benchmark the safemap.
    
    * did  some tests, found a panic. fixed it.
    perbu authored Nov 26, 2023
    Copy the full SHA
    c7be50d View commit details
  2. Functional options pattern for Engine init. (#62)

    * randomize listen port. makes the tests pass on macos.
    
    * functional options pattern
    
    * functional options pattern
    perbu authored Nov 26, 2023
    Copy the full SHA
    0a3f7f4 View commit details

Commits on Nov 30, 2023

  1. Copy the full SHA
    57f3f28 View commit details
  2. WIP - Graceful handling all messages when receiving poison pill (#69)

    * batched invoke, hence big performance increase
    
    * WIP processing all messages that are still in the queue
    
    * added Stop API - a non graceful poisonPill
    
    * Added Stop tests
    anthdm authored Nov 30, 2023
    Copy the full SHA
    5913ef6 View commit details
  3. Deadletter as an actor (#64)

    * randomize listen port. makes the tests pass on macos.
    
    * wip
    
    * make deadletter an actor.
    
    * initialization code ok. tests in place.
    
    * delete some commented out code.
    
    * we stop storing the deadletters. just log them if there is a logger. the user can supply their own dead letter handling if they need to.
    
    * since I've change the semantics of the internal registry/get method these two tests needed to change.
    
    * registry/get now returns nil instead of deadletter.
    
    * a tiny tweak that is more readable.
    
    * make a wrapper around bytes.Buffer to suppress the race detector in the tests.
    
    * just some docs.
    perbu authored Nov 30, 2023
    Copy the full SHA
    af84252 View commit details

Commits on Dec 1, 2023

  1. Completed the HasTag function logic (#72)

    Co-authored-by: Mansour B <Mansour@servdeck.com>
    mbaitar and mbaitar authored Dec 1, 2023
    Copy the full SHA
    8dac16e View commit details

Commits on Dec 3, 2023

  1. WIP: Reworking the event stream so its also an actor (#79)

    * added new event stream that is actually an actor
    
    * fixed bug on sending event with remotes
    
    * renamed event to event stream
    
    * fixed engine address bug when using remote
    
    * fixed address error and wrapped up big portion of the PR
    anthdm authored Dec 3, 2023
    Copy the full SHA
    2098fc6 View commit details
  2. updated readme (#80)

    * updated readme
    
    * typo
    
    * server id
    anthdm authored Dec 3, 2023
    Copy the full SHA
    ecb4b11 View commit details
  3. make banner discord invite link (#81)

    * add discord invite url
    
    * add discord join link
    AR1011 authored Dec 3, 2023
    Copy the full SHA
    8bbabce View commit details
  4. Bumped Github action version (#71)

    Co-authored-by: Mansour Baitar <mansour@servdeck.com>
    mbaitar and mbaitar authored Dec 3, 2023
    Copy the full SHA
    e82ae31 View commit details

Commits on Dec 4, 2023

  1. Adding a context to the remote for shutdown. (#76)

    * one major change. engine.WithRemote now takes a context, which is passed to the remote. It will shut down the remote when the context is cancelled.
    
    One minor change. The engine now has a GetLogger() which responds with the logger, so the remote can set up logging on its own.
    
    * make it easy to get a flood of logs when debugging tests.
    
    * wip; remote.Stop() returns sync.Waitgroup
    
    * fix the tests so they're green again.
    
    * track state so we don't stop or start twice.
    
    * forgot to set the state to running. tests are green again.
    
    * adjust the benchmark to changes in the API.
    
    * actor.NewEngine() now returns (*Engine, error)
    
    * return error from NewEngine if one or more of the options fail.
    perbu authored Dec 4, 2023
    Copy the full SHA
    1142617 View commit details
  2. Fixchat take 2 (#83)

    * clean up the chat example.
    
    * tweaks.
    
    * wait for the poison to take effect before quitting.
    
    * tracking clients and users in separate maps
    perbu authored Dec 4, 2023
    Copy the full SHA
    2338c21 View commit details
  3. Copy the full SHA
    c089c0b View commit details

Commits on Dec 5, 2023

  1. Copy the full SHA
    c0a4bb5 View commit details
  2. add trade-engine example (#82)

    * add trade-engine example
    
    * fix race condition
    
    * engine, err
    
    * remove go routines
    
    * remove active flag
    
    * switch to subscribe
    
    * stop using eventstream
    
    * fix comment
    
    * cleanup and readme
    
    * switch from slice to map
    
    * Replace Unix timestamp with time.Time in trade engine
    
    The commit updates the trade engine by replacing Unix timestamp format with Go's native time.Time. This affects order expiry and price update time tracking in the system. It's a better practice for readability and consistency in Go, and will also handle different time zones effectively. A logging line deemed excessively verbose was also commented out for cleanliness.
    
    * remove signal
    
    * enchance main.go
    
    * shut down the trade engine before exit.
    
    * remove depreciated log handler
    
    ---------
    
    Co-authored-by: Per Buer <per.buer@gmail.com>
    AR1011 and perbu authored Dec 5, 2023
    Copy the full SHA
    b6373b0 View commit details

Commits on Dec 6, 2023

  1. fix benchmark (#89)

    tprifti authored Dec 6, 2023
    Copy the full SHA
    ce25461 View commit details
  2. Copy the full SHA
    1993ba3 View commit details
  3. weird

    perbu committed Dec 6, 2023
    Copy the full SHA
    c93d7e9 View commit details
  4. cleanup.

    perbu committed Dec 6, 2023
    Copy the full SHA
    c5433f4 View commit details
  5. cleanup the deadletter tests.

    perbu committed Dec 6, 2023
    Copy the full SHA
    c87a2d1 View commit details
  6. Copy the full SHA
    7f1b362 View commit details
  7. Copy the full SHA
    1c43960 View commit details
  8. we cannot test the default deadletter handling as there is no handlin…

    …g of it in the default.
    perbu committed Dec 6, 2023
    Copy the full SHA
    ba84b41 View commit details
  9. Copy the full SHA
    18ca292 View commit details
  10. Fix bug when sending messages over the wire as a mad man (#93)

    * added max size for batching messages
    
    * default message batch size
    anthdm authored Dec 6, 2023
    Copy the full SHA
    6f25e4d View commit details

Commits on Dec 7, 2023

  1. Update README with improved descriptions and usage guide (#94)

    The README tutorial has been heavily updated to provide more depth and clarity on how to work with the package. It includes an enhanced usage guide, focusing on local running first, while presenting the steps in writing simple examples. Some inaccuracies and redundancies, particularly in the logging section, have been rectified. The explanations on using Eventstream and setting up a remote actor have been improved for better understanding.
    perbu authored Dec 7, 2023
    Copy the full SHA
    eff758c View commit details

Commits on Dec 9, 2023

  1. Copy the full SHA
    003e117 View commit details
  2. Basic inbox test (#100)

    * Add tests for Scheduler and Inbox in actor package
    
    new tests for the Scheduler and Inbox functionality. It's not much, but it's a start.
    
    * replace sleep with Gosched. Shave a millisecond off the test time. :-)
    
    * nitpick.
    perbu authored Dec 9, 2023
    Copy the full SHA
    edb94a8 View commit details
  3. Docs 2 - passing arguments to actor creation. (#102)

    * make the links a bit nicer.
    document how to pass arguments to actor creation.
    
    closes: #96
    
    * typo
    perbu authored Dec 9, 2023
    Copy the full SHA
    7b29e83 View commit details
  4. Minor improvements, testing. (#99)

    * delete empty file.
    
    * use maxint to reduce the chance of collisions.
    
    * expand test to test timeout.
    perbu authored Dec 9, 2023
    Copy the full SHA
    629e47e View commit details

Commits on Dec 11, 2023

  1. add a test that deadlocks the engine. (#104)

    * add a test that deadlocks the engine.
    
    * fix the deadlock.
    perbu authored Dec 11, 2023
    Copy the full SHA
    877828d View commit details
  2. New benchmark suite (#97)

    * added max size for batching messages
    
    * default message batch size
    
    * wip: chaos.
    
    * Add benchmark actor and protobuf message
    
    The update introduces a benchmark actor that receives messages and increments a message counter. It also includes the creation of a new protobuf message. The main function is updated to incorporate this benchmark actor, while providing a detailed simulation of sending messages across multiple actors distributed across different engines.
    
    * Refactor benchmark code and add profiling
    
    The benchmark code is refactored for better error handling and message checks. 'benchmark' function is extracted from 'main' for further testing. A new Makefile target 'bench-profile' is added for profiling. A new test file 'main_test.go' is created for benchmark testing. Corresponding instructions are added in the newly created README.md file. Also, .gitignore is updated to exclude the created test, cpu, and memory profiles.
    
    * document how to use the interactive web interface.
    
    * add latency measurement as well.
    
    * bah. can't make go test ignore the new latency tests. I just commented it out. Gonna revisit latency benchmarks later.
    
    * Update benchmark command in Makefile
    
    The benchmark command in the Makefile has been updated to run the whole package, not just main.go
    
    ---------
    
    Co-authored-by: anthdm <cryptoanthdm@gmail.com>
    perbu and anthdm authored Dec 11, 2023
    Copy the full SHA
    4fe2643 View commit details

Commits on Dec 13, 2023

  1. TLS support for Hollywood (#105)

    * added max size for batching messages
    
    * default message batch size
    
    * wip: chaos.
    
    * Add benchmark actor and protobuf message
    
    The update introduces a benchmark actor that receives messages and increments a message counter. It also includes the creation of a new protobuf message. The main function is updated to incorporate this benchmark actor, while providing a detailed simulation of sending messages across multiple actors distributed across different engines.
    
    * Refactor benchmark code and add profiling
    
    The benchmark code is refactored for better error handling and message checks. 'benchmark' function is extracted from 'main' for further testing. A new Makefile target 'bench-profile' is added for profiling. A new test file 'main_test.go' is created for benchmark testing. Corresponding instructions are added in the newly created README.md file. Also, .gitignore is updated to exclude the created test, cpu, and memory profiles.
    
    * document how to use the interactive web interface.
    
    * add latency measurement as well.
    
    * bah. can't make go test ignore the new latency tests. I just commented it out. Gonna revisit latency benchmarks later.
    
    * Update benchmark command in Makefile
    
    The benchmark command in the Makefile has been updated to run the whole package, not just main.go
    
    * wip: add TLS option for the remote.
    
    * wip: first test.
    
    * fix the cert generation. test pass.
    
    * adjust some timeouts as a test was flaking.
    
    * finish up the test. ready to merge.
    
    * docs.
    
    * tweak flaky tests.
    
    ---------
    
    Co-authored-by: anthdm <cryptoanthdm@gmail.com>
    perbu and anthdm authored Dec 13, 2023
    Copy the full SHA
    0c36559 View commit details
  2. Benchfix (#107)

    * added max size for batching messages
    
    * default message batch size
    
    * wip: chaos.
    
    * Add benchmark actor and protobuf message
    
    The update introduces a benchmark actor that receives messages and increments a message counter. It also includes the creation of a new protobuf message. The main function is updated to incorporate this benchmark actor, while providing a detailed simulation of sending messages across multiple actors distributed across different engines.
    
    * Refactor benchmark code and add profiling
    
    The benchmark code is refactored for better error handling and message checks. 'benchmark' function is extracted from 'main' for further testing. A new Makefile target 'bench-profile' is added for profiling. A new test file 'main_test.go' is created for benchmark testing. Corresponding instructions are added in the newly created README.md file. Also, .gitignore is updated to exclude the created test, cpu, and memory profiles.
    
    * document how to use the interactive web interface.
    
    * add latency measurement as well.
    
    * bah. can't make go test ignore the new latency tests. I just commented it out. Gonna revisit latency benchmarks later.
    
    * Update benchmark command in Makefile
    
    The benchmark command in the Makefile has been updated to run the whole package, not just main.go
    
    * bench subscribed to eventstream via message. that message is now private so we must use Subscribe.
    
    ---------
    
    Co-authored-by: anthdm <cryptoanthdm@gmail.com>
    perbu and anthdm authored Dec 13, 2023
    Copy the full SHA
    17bcc37 View commit details

Commits on Dec 15, 2023

  1. check Len before locking (#108)

    basically applying the same optimization that Pop has
    lrweck authored Dec 15, 2023
    Copy the full SHA
    90f5a7a View commit details
Showing with 12,717 additions and 1,228 deletions.
  1. +3 −3 .github/workflows/build.yml
  2. +7 −1 .gitignore
  3. +11 −3 Makefile
  4. +233 −82 README.md
  5. +43 −0 _bench/README.md
  6. +200 −38 _bench/main.go
  7. +36 −0 _bench/main_test.go
  8. +266 −0 _bench/message.pb.go
  9. +15 −0 _bench/message.proto
  10. +105 −0 actor/README.md
  11. +138 −15 actor/actor.pb.go
  12. +8 −0 actor/actor.proto
  13. +449 −1 actor/actor_vtproto.pb.go
  14. +41 −13 actor/context.go
  15. +72 −25 actor/context_test.go
  16. +0 −41 actor/deadletter.go
  17. +53 −0 actor/deadletter_test.go
  18. +177 −62 actor/engine.go
  19. +322 −57 actor/engine_test.go
  20. +110 −0 actor/event.go
  21. +34 −53 actor/event_stream.go
  22. +66 −26 actor/event_stream_test.go
  23. +27 −0 actor/event_test.go
  24. +82 −28 actor/inbox.go
  25. +73 −21 actor/inbox_test.go
  26. +35 −12 actor/opts.go
  27. +5 −18 actor/pid.go
  28. +0 −6 actor/pid_test.go
  29. +102 −70 actor/process.go
  30. +119 −0 actor/process_test.go
  31. +22 −10 actor/registry.go
  32. +20 −19 actor/registry_test.go
  33. +6 −6 actor/response.go
  34. +0 −23 actor/thelpers.go
  35. +3 −23 actor/types.go
  36. +67 −0 cluster/activation.go
  37. +296 −0 cluster/agent.go
  38. +2 −0 cluster/build.sh
  39. +304 −0 cluster/cluster.go
  40. +1,063 −0 cluster/cluster.pb.go
  41. +72 −0 cluster/cluster.proto
  42. +425 −0 cluster/cluster_test.go
  43. +4,236 −0 cluster/cluster_vtproto.pb.go
  44. +25 −0 cluster/event.go
  45. +27 −0 cluster/kind.go
  46. +93 −0 cluster/member_set.go
  47. +231 −0 cluster/selfmanaged.go
  48. +46 −0 cluster/util.go
  49. +0 −1 examples/chat/build.sh
  50. +32 −20 examples/chat/client/main.go
  51. +56 −27 examples/chat/server/main.go
  52. +3 −0 examples/chat/types/generate.go
  53. +5 −2 examples/childprocs/main.go
  54. +44 −0 examples/cluster/member_1/main.go
  55. +36 −0 examples/cluster/member_2/main.go
  56. +40 −0 examples/cluster/shared/activation_strategy.go
  57. +22 −0 examples/cluster/shared/player.go
  58. +94 −0 examples/eventstream-monitor/main.go
  59. +36 −31 examples/eventstream/main.go
  60. +15 −7 examples/helloworld/main.go
  61. +48 −0 examples/mdns/README.md
  62. +51 −0 examples/mdns/chat/actor.go
  63. +268 −0 examples/mdns/chat/types/types.pb.go
  64. +14 −0 examples/mdns/chat/types/types.proto
  65. +39 −0 examples/mdns/discovery/announcer.go
  66. +108 −0 examples/mdns/discovery/mdns.go
  67. +36 −0 examples/mdns/discovery/opts.go
  68. +6 −0 examples/mdns/discovery/types.go
  69. +42 −0 examples/mdns/main.go
  70. +105 −0 examples/metrics/main.go
  71. +5 −10 examples/middleware/hooks/main.go
  72. +169 −0 examples/persistance/main.go
  73. +13 −5 examples/remote/client/main.go
  74. +15 −6 examples/remote/server/main.go
  75. +36 −7 examples/request/main.go
  76. +10 −10 examples/restarts/main.go
  77. +15 −16 examples/tcpserver/main.go
  78. +137 −0 examples/trade-engine/actors/executor/executor.go
  79. +106 −0 examples/trade-engine/actors/price/price.go
  80. +141 −0 examples/trade-engine/actors/tradeEngine/tradeEngine.go
  81. +80 −0 examples/trade-engine/main.go
  82. +36 −0 examples/trade-engine/readme.md
  83. +64 −0 examples/trade-engine/types/types.go
  84. +0 −149 ggq/ggq.go
  85. +0 −55 ggq/ggq_test.go
  86. +29 −13 go.mod
  87. +83 −25 go.sum
  88. +0 −64 log/log.go
  89. +110 −22 remote/remote.go
  90. +198 −33 remote/remote_test.go
  91. +181 −0 remote/remote_tls_test.go
  92. +1 −0 remote/serialize.go
  93. +5 −6 remote/stream_reader.go
  94. +22 −22 remote/stream_router.go
  95. +75 −39 remote/stream_writer.go
  96. +98 −0 ringbuffer/ringbuffer.go
  97. +95 −0 ringbuffer/ringbuffer_test.go
  98. +2 −2 safemap/safemap.go
  99. +121 −0 safemap/safemap_test.go
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -6,12 +6,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.21

- name: Build
run: go build -v ./...
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -2,4 +2,10 @@ bin
TODO.txt
TODO
_test
.vscode
/.vscode
/.idea
.DS_Store
/_bench.test
/cpu.prof
/mem.prof
temp
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test: build
go test ./... --race
go test ./... -count=1 --race --timeout=5s

proto:
protoc --go_out=. --go-vtproto_out=. --go_opt=paths=source_relative --proto_path=. actor/actor.proto
@@ -12,8 +12,16 @@ build:
go build -o bin/restarts examples/restarts/main.go
go build -o bin/eventstream examples/eventstream/main.go
go build -o bin/tcpserver examples/tcpserver/main.go
go build -o bin/metrics examples/metrics/main.go
go build -o bin/chatserver examples/chat/server/main.go
go build -o bin/chatclient examples/chat/client/main.go
go build -o bin/cluster_member_1 examples/cluster/member_1/main.go
go build -o bin/cluster_member_2 examples/cluster/member_2/main.go

bench:
go run _bench/main.go
go run ./_bench/.

.PHONY: proto
bench-profile:
go test -bench='^BenchmarkHollywood$$' -run=NONE -cpuprofile cpu.prof -memprofile mem.prof ./_bench

.PHONY: proto
Loading