Who the f...?
●

Marcelo Gornstein

●

Open source author/contributor

●

Erlang code monkey at inaka
http://www.inaka.net...
Sumo DB
Sumo DB
●

Persistence layer.

●

By Inaka (yey!) and we use it, too

●

Written in Erlang, for Erlang applications

●

No...
Sumo DB
●

Supports MySQL

●

A bit of support for MongoDB and Redis

●

Planned to support sqlite, mnesia, maybe others

...
Sumo DB
●

Repository Pattern

●

Entities encapsulate state and behavior

●

●

Repositories handle implementation detail...
Sumo DB
NewUser = sumo_db:persist(mywebsite_user, User).
sumo_db:delete(mywebsite_user, Id).
User = sumo_db:find(mywebsite...
Sumo DB
{ sumo_db, [
{storage_backends, [
{my_mysql_backend, sumo_backend_mysql, [
{username, "user"},
{password, "pass"},...
Sumo DB
●

https://github.com/inaka/sumo_db

●

https://github.com/marcelog

●

Twitter: @inaka, @mgornstein

●

http://ma...
Upcoming SlideShare
Loading in...5
×

Lightning Talk About sumo_db for RubyConfAr 2013

1,455

Published on

This is the lightning talk about sumo db for the ruby conf argentina 2013 11/28/2013

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,455
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lightning Talk About sumo_db for RubyConfAr 2013

  1. 1. Who the f...? ● Marcelo Gornstein ● Open source author/contributor ● Erlang code monkey at inaka http://www.inaka.net ● We do lots of erlang – Whisper, TigerText – Inaka Live (FoxNews) ● Twitter: @mgornstein ● Github: marcelog ● marcelog@gmail.com
  2. 2. Sumo DB
  3. 3. Sumo DB ● Persistence layer. ● By Inaka (yey!) and we use it, too ● Written in Erlang, for Erlang applications ● Nothing similar in the pure erlang world ● Kind of an ORM (if you know elixir, it's similar to ecto) ● ● Finally! Decouple your business logic from your state and your storage backend No more “god” modules
  4. 4. Sumo DB ● Supports MySQL ● A bit of support for MongoDB and Redis ● Planned to support sqlite, mnesia, maybe others ● Allows to use multiple databases in your code ● Behaviors: Storage backends, repos, docs (entities). Go ahead, Implement your own :)
  5. 5. Sumo DB ● Repository Pattern ● Entities encapsulate state and behavior ● ● Repositories handle implementation details of the storage backend Domain events
  6. 6. Sumo DB NewUser = sumo_db:persist(mywebsite_user, User). sumo_db:delete(mywebsite_user, Id). User = sumo_db:find(mywebsite_user, Id). Users = sumo_db:find_by(mywebsite_user, [{age, Age}]). sumo_db:find_by(mywebsite_user, [{age, Age}], Limit, Offset).
  7. 7. Sumo DB { sumo_db, [ {storage_backends, [ {my_mysql_backend, sumo_backend_mysql, [ {username, "user"}, {password, "pass"}, {host, "127.0.0.1"}, {port,3306}, {database, "test"}, {poolsize, 10} ]} ]}, {repositories, [ {users_repo, module_repo, [ {storage_backend,my_mysql_backend}, {workers, 10} ]} ]}, {docs, [{users, user_repo}]}
  8. 8. Sumo DB ● https://github.com/inaka/sumo_db ● https://github.com/marcelog ● Twitter: @inaka, @mgornstein ● http://marcelog.github.io/articles/articles.html ● We want YOU :) Come and learn Erlang with us :) https://github.com/inaka/erlang_training
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×