Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brainlid/meetup_process_state
Examples of using Elixir Processes to store and manage state. Includes lesser known Process Dictionary. Used for presenting at a meetup.
https://github.com/brainlid/meetup_process_state
meetup-demonstration
Last synced: 26 days ago
JSON representation
Examples of using Elixir Processes to store and manage state. Includes lesser known Process Dictionary. Used for presenting at a meetup.
- Host: GitHub
- URL: https://github.com/brainlid/meetup_process_state
- Owner: brainlid
- License: mit
- Created: 2017-09-24T00:15:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-24T01:36:56.000Z (over 7 years ago)
- Last Synced: 2024-12-07T12:27:24.253Z (about 1 month ago)
- Topics: meetup-demonstration
- Language: Elixir
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ProcessState
Examples of using Elixir Processes to store and manage state. Includes lesser
known Process Dictionary. I used this for presenting at an [Utah Elixir
meetup](https://www.meetup.com/preview/utah-elixir/events/242717604).## Using
Clone or download the repo.
Experiment in IEx and using your preferred editor.
`iex -S mix`
Example of using the `ProcessState.SpawnBasic` example.
```elixir
alias ProcessState.SpawnBasic
pid = SpawnBasic.start(%{counter: 0})
send(pid, {:add, 10})
send(pid, {:add, 1})
send(pid, {:add, 2})
```## Explanation
I customized Logger output to include some metadata information. Then I use
`Logger.info` to log out information. The logger customization is in
`config/config.exs`.See the examples directories and single files under the numbered directories.