riak-erlang-client ping problem

2012-12-12 Thread Pablo Vieytes
Hi,
I'm new with Riak. I'm trying to use riak-erlang-client but I have some
problems.

I can connect with the browser to localhost:8091

http://localhost:8091/ping -> ok

But I can do a ping with the erlang client.

1> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8091).
{ok,<0.34.0>}
2> riakc_pb_socket:ping(Pid).

=ERROR REPORT 12-Dec-2012::15:14:40 ===
** Generic server <0.34.0> terminating
** Last message in was {req_timeout,#Ref<0.0.0.37>}
** When Server state == {state,"127.0.0.1",8091,false,false,undefined,
   undefined,
   {[],[]},
   1,[],infinity,100}
** Reason for termination ==
** disconnected
** exception exit: disconnected
3>


I'm using riak-1.2.1


Thanks in advance.
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: riak-erlang-client ping problem

2012-12-12 Thread Pablo Vieytes
solved

I just had to connect to the Protobuf Port instead of http port.




2012/12/12 Pablo Vieytes 

> Hi,
> I'm new with Riak. I'm trying to use riak-erlang-client but I have some
> problems.
>
> I can connect with the browser to localhost:8091
>
> http://localhost:8091/ping -> ok
>
> But I can do a ping with the erlang client.
>
> 1> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8091).
> {ok,<0.34.0>}
> 2> riakc_pb_socket:ping(Pid).
>
> =ERROR REPORT 12-Dec-2012::15:14:40 ===
> ** Generic server <0.34.0> terminating
> ** Last message in was {req_timeout,#Ref<0.0.0.37>}
> ** When Server state == {state,"127.0.0.1",8091,false,false,undefined,
>undefined,
>{[],[]},
>1,[],infinity,100}
> ** Reason for termination ==
> ** disconnected
> ** exception exit: disconnected
> 3>
>
>
> I'm using riak-1.2.1
>
>
> Thanks in advance.
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


social data model use case

2012-12-14 Thread Pablo Vieytes
Hello,
I'm new to riak and k/v db as well. I want to write a social data model
(users, friends, posts, comments and likes). I'm used to use relational db
and I think my aproach will be very biased for that previous knowledge.

This is a very common data model, so, I guess anybody has an example. Any
idea will be welcome.

My first approach:

* bucket: user
key: username ; Value: profile data

friends; links between users (user bucket)

* bucket: post
key: username; Value Post data (with comments and likes nested)


Thanks in advance.
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com