thiamsantos / chapter_examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChapterExamples

  1. Application configuration

Bad:

https://github.com/agevio/mixpanel_api_ex https://github.com/zhyu/nadia

Good:

https://github.com/edgurgel/pusher https://github.com/thiamsantos/mxpanel/blob/main/test/mxpanel_test.exs#L16

  1. Custom HTTP Client

Examples:

https://github.com/agevio/mixpanel_api_ex/blob/master/lib/mixpanel/client.ex#L48 https://github.com/aws-beam/aws-elixir/blob/v0.7.0/lib/aws/client.ex#L44

  1. uso de genserver

attention points :

  • Single process bottlenecek

"cache"

  • agent -- simple -- memory inside process -- GC
  • ets + genserver -- memory in ets -- no GC in cache -- read/writes through process
  • ets + protected named table -- memory in ets -- no GC in cache -- reads direct to ets without process communication

References

About


Languages

Language:Elixir 100.0%