Hi Max

To get the best performance form Riak you should denormalise your tables. But that again depends on how many User and Server entities a Client has. Ideally you denormalise your datamodel into

{
  "title": "foo",
  "limit": 1,
  "clients": [
    {
      "title": "bar",
      "limit": 2
    }
  ]
  "servers": [
    {
      "title": "baz",
      "ip": "127.0.0.1"
    }
  ]
}

Store it in a key that is known in your request.

Depending on the amount of data I would say Riak is a good fit.


Martin Westergaard Lassen
Software Pilot
 
Trifork A/S
Margrethepladsen 4 · 8000 Aarhus C. · Denmark
Mobile +45 31 12 10 59
 


On 22 Mar 2013, at 06:38, Max Lapshin <max.laps...@gmail.com> wrote:

Hi. I'm looking for alternative to postgresql in my project.
I have two problems with postgres:
1) if master goes down, problem must be resolved manually and very quickly
2) I want cross datacenter replication

Here is my schema: http://pastie.org/7058511

In short: client is a user that is logging in on my server and he has many sub-users and many servers.

I need to make lookups like "give me all sub-users of this client" and "give me all servers of this client".

Also, there is going to be a huge traffic to update "users" table: aggregated statistics about their usage.

Is riak ok for it? Will secondary index help me with it?




I have already looked at Couchbase. It has wonderful admin console, but it failed to launch when my IP address has changed and it has no erlang API.
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to