Hi!
There are some confusions abount boss_db.
When i want to save something to mysql, I should
get_db_id(Id) ->
[_ModuleName, DbIdStr] = string:tokens(Id, "-"),
erlang:list_to_integer(DbIdStr).
And when i select the data from mysql, I should
get_boss_id(Id) when is_integer(Id) ->
lists:concat(["account-", Id]).
And i cache the data in ets, so the key will be "account-1", "timeline-1",
"game-2"..., it will cost memory.
There is also another situation, When i change xxx_table to 10 sharding:
xxx_table_1, xxx_table_2, xxx_table_3....
Should i create ten models like xxx_table_1.erl, xxx_table_2.erl,
xxx_table_3.erl ...?
Should i build my application without boss_db?
--
You received this message because you are subscribed to the Google Groups
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit
https://groups.google.com/d/msgid/chicagoboss/18723217-e67c-483f-a4e6-df846596ecac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.