Skip to content

Code examples for the “OTP, Concurrency and Testing Strategies” talk, as presented in Montreal Elixir, April 12th, 2017.

License

Notifications You must be signed in to change notification settings

xymbol/otp-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server examples in Elixir with tests

Build Status

A number of code examples with accompanying tests written for the “OTP, Concurrency and Testing Strategies” talk, presented in Montreal Elixir, April 12th, 2017. Slides are available for this talk.

What's included

  • adder: server to add values and return total
  • blog: counter server added to a Phoenix app
  • calculator: simple stack calculator server
  • counter: shared counter server
  • stack: stack server using only primitives
  • tick: server to demonstrate timed sends
  • writer: file writer and reader server

How to use interactively

For each example, do iex -S mix from the project folder:

iex> {:ok, pid} = Counter.start_link
iex> Counter.read pid
iex> Counter.stop pid

How to run tests

For each example, do mix test to run tests. To run all tests in all examples, do mix test from the parent folder.

Author

Adrián Mugnolo

License

These examples are released under the MIT license. See LICENSE.

About

Code examples for the “OTP, Concurrency and Testing Strategies” talk, as presented in Montreal Elixir, April 12th, 2017.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published