https://github.com/cloud8421/osteria
Osteria demo app for GenStage in the Kitchen talk. Rough code, beware!
https://github.com/cloud8421/osteria
elixir elm genstage
Last synced: 6 months ago
JSON representation
Osteria demo app for GenStage in the Kitchen talk. Rough code, beware!
- Host: GitHub
- URL: https://github.com/cloud8421/osteria
- Owner: cloud8421
- Created: 2016-09-23T08:40:40.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-02T09:47:45.000Z (over 8 years ago)
- Last Synced: 2025-04-09T05:51:07.879Z (6 months ago)
- Topics: elixir, elm, genstage
- Language: JavaScript
- Size: 132 KB
- Stars: 71
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Osteria
Demo application for Elixir.LDN's talk "GenStage in the Kitchen" [slides here](https://speakerdeck.com/cloud8421/genstage-in-the-kitchen)
## Setup
`mix deps.get`
`iex -S mix`Then visit `http://localhost:4001`
## Frontend
The frontend application is built with Elm, so it requires it to be installed.
Compiled js and css is shipped with the codebase, so you don't need to compile by hand after cloning. If you wish to make any changes you can:
- `cd frontend`
- `make install`
- `make` to compile
- `make watch` to start a watcher that recompiles on save## Some directions when reading code
- Start from `lib/osteria.ex`: here all processes are setup in single supervision tree.
- The `Osteria.Status` module is used to collect information about each component in the system, so that we can pipe that information to the frontend.
- You can then move to `lib/osteria/table.ex` and see how each table handles people sitting down and deciding dishes. Note that to keep track of tables we use a `Osteria.TableRegistry` Elixir 1.4 process Registry.
- The `Waiter` module is modeled after the `EventManager` example shown here: .
- The `Osteria.Chef` module partitions orders using a `Osteria.Menu` module to figure out a dish type (grill, oven, etc.)
- If you open the `Osteria.Log` module you can enable logging (roughly commented out towards the end). That way you can see events happening in real time in the console.