Elixir 勉強会 tokyo.ex#7 × 歌舞伎座.tech#13 でのLT資料
Elixir 勉強会 tokyo.ex#7 × 歌舞伎座.tech#13 でのLT資料
I have worked on, or cleaned up, 4 different CQRS/ES projects. They have all failed. Each time the people leading the project and championing the architecture were smart, capable, technically adept folks, but they couldn't make it work.There's more than one flavor of this particular arch, but Event Sourcing in general is simply not very useful for most projects. I'm sure there are use cases where
I have a field called paused_at on one of my Models. I want users to toggle a boolean checkbox called paused in the frontend, but then save the time at which they paused it. So far I have the following: in the model: schema "tablename" do # ... code before here omitted for brevity field :paused_at, Ecto.DateTime field :paused, :boolean, virtual: true end # ... code omitted for brevity def changese
There are a few good examples showing how to use OAuth authentication in Phoenix and Elixir, but I wanted a solution which used a small amount of dependencies, and had the ability to make authenticated requests on behalf of a user. parroty/extwitter provides the functionality to authenticate as a user, as well as to make requests on behalf of that user. I wanted to just use this library, and avoid
On the Rails app, we can print the record count of a database table by a command like this: rails r "puts User.count" With my knowledge, if we want the same thing on the Phoenix/Ecto environment, we should run such a command: mix run -e "IO.puts SampleApp.Repo.aggregate(SampleApp.User, :count, :id)" That is OK, but is too lengthy for a daily usage. Is there any shorter way?
Elixir Advent Calendar 2016 の22日目です。 mixiグループ Advent Calendar 2016 の22日目も記載しているのでよければそちらもどうぞ マッチングとは ゲームにおいて、プレイヤーとプレイヤーを何らかの条件で(同程度の強さなど)によって結びつけることです。プレイヤーにとって面白いと考えられる対戦を作るのが目標になります。 良い対戦相手を見つけるには待ち時間が必要になります。キューに入ってきた順ではなく、同じ条件のユーザが揃うまで待つ必要があるからです。 そのため、クライアントには非同期で結果を返す必要があります。 Phoenix Channels クライアントへ非同期に結果を返すために、Phoenix の Channels を活用します。WebSocket を抽象化しており、アプリケーション側から容易にメッセージパッシングを行えます。 また、
Is there a way to work with binary data instead of json in Phoenix channels? Usecase: I have some channels where the data changes a lot and the bandwidth consumed is large due to json. I can optimize the bandwidth by sending binary data instead of json. Is there a way to send binary data in Phoenix channels?
この記事は Elixir Advent Calendar 2016 - Qiita の 19 日目の記事です。 Elixir歴3ヶ月ほどの新人です。まだまだ分かっていませんが、Elixir楽しいです。 今回はPhoenix以外のWEBフレームワークについて調べてみました。 Elixirで何らかのWEBアプリケーションを作る場合はPhoenixを選ぶのが普通だと思います。 Railsと似ていて入門しやすく、情報量からいっても妥当な選択だと思うのですが、 他の選択肢もあるだろうということで、今回はWebmachineを少し調べてみました。 Webmachineとは WebmachineはRiakで有名なBashoが発祥のerlangで書かれたソフトウェアです。 実際にはWEBフレームワークではなくREST Toolkitと称している通り、 フレームワークとしてみると機能が足りない点が多いので、
Is there a way to work with binary data instead of json in Phoenix channels? Usecase: I have some channels where the data changes a lot and the bandwidth consumed is large due to json. I can optimize the bandwidth by sending binary data instead of json. Is there a way to send binary data in Phoenix channels?
Is there a way to work with binary data instead of json in Phoenix channels? Usecase: I have some channels where the data changes a lot and the bandwidth consumed is large due to json. I can optimize the bandwidth by sending binary data instead of json. Is there a way to send binary data in Phoenix channels?
Journeys of a not so young anymore Software Engineer Software Engineering, Humans, Ruby, Elixir, the web And here goes the video from Rubyconf Portugal – which was a blast! This talk mainly focuses on the latter explicit part of the title and how Elixir and Phoenix help with readable and maintainable code. It is also an introduction, quickly glancing at several topics that could also be topics of
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く