Hi Artem,

1. If you intend to access the data through Riak's REST API you should avoid
forward slashes, "/", in the bucket or key name. In your example the use of
the URL for the BUCKET name would prevent that bucket from being accessible
via the REST API. Also, you will  need to set the content-type of the
object.

The schema you've chosen looks good. I found an article from IBM about
converting Atom to JSON which resulted in a similar format:
http://www.ibm.com/developerworks/library/x-atom2json.html

Another option for formatting the data would be JSON Schema:
http://json-schema.org/


2. The twitter schema you've chosen looks good.

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
d...@basho.com


On Thu, Jun 17, 2010 at 1:56 PM, Artem Golovinsky <artemgolovin...@gmail.com
> wrote:

> Hi all,
>
>    1. I have erlang application which is subscriber on 10000 nodes. When
>    one of nodes has new content, the node sends to my client notification in
>    Atom format. So. I need to save all notifications in JSON format. Now I 
> have
>    just one idea about schema:
>
>          BUCKET - << 
> http://mydomain.com/feed.xml<http://domain.tld/feed.xml>>>
> - one of 10000 nodes
>
>          KEY - <<md5_hash_of_item>> - md5 hash of VALUE
>
>         VALUE - <<{"item":{"entry":{"title":"Finibus Bonorum et
> Malorum","summary":"Sed ut perspiciatis unde omnis iste natus error sit
> voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa
> quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt
> explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit
> aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem
> sequi
> nesciunt.","link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"http:\/\/
> superfeedr.com
> \/entries\/12345788"}},"id":"tag:domain.tld,2009:Finibus-32398","published":"2010-04-06T08:54:02Z"}}}>>
>
>
> Could you please make comments ? Is this schema right?
>
>
> 2. Twitter.com has a streaming API. My second application gets data in JSON
> format and should put data to Riak. I can't decide with schema. But have
> variant for sample method (
> http://apiwiki.twitter.com/Streaming-API-Documentation#statuses/sample) :
>
>  bucket - <<sample>>
>
>  key      -  <<16012742662>>  (id of entry. It is unique)
>
>  value   -  <<tweet_in_json>>
>
>
> What do you think about it?
>
> Could you please give me comments if needed?
>
> --
> Best regards,
> Artem Golovinsky
>
> _______________________________________________
> 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