Showing posts with label personal data. Show all posts
Showing posts with label personal data. Show all posts

Saturday, June 28, 2014

Get on RespectNetwork and get your XRI name.

Just a little motivation for getting involved with RespectNetwork and grabbing one of their "cloud names" (ie. an XRI) at their great one-time price of $25:

For a while there, I was playing with the APIs for "unhosted" and P2P apps quite a bit, just doing things that seemed fun personally.  I played with Kynetx (founded by my BYU professor Phil Windley) and Singly (founded by Jeremie Miller of XMPP fame), both of which are still very worthwhile projects with huge potential (and you can see from my labels that I've posted about them before).  Other related projects are redecentralize.org and projectdanube.com and cozy.io.  Anyway, the Respect Network in particular is a brainchild of Drummond Reed and it's had a few changes of directions, starting with connect.me, though I look on that activity feed and I don't see much happening there; Drummond Reed and Doc Searls and Kaliya Hamlin and Phil Windley (remember?) are big people in the identity space, eg. the internetidentityworkshop.com conferences, and so I still expect to see big things out of this set of initiatives for owning our own data.  Anyway, my hope is to push for these kinds of tools and protocols to help fight the silos and lock-in of Facebook and even Google... on top of the basic infrastructure tools (eg. pack.resetthenet.org).

Saying all that, I realize that it's not very widespread at this point.  I think they're laying out the protocols and doing cool stuff, but it's still at the experimentation point, I'd say.  But some of the concepts are sticking, eg. these XRI names... I got my first one a few years ago... so I think they're worth getting now.

Sunday, April 1, 2012

Setting and retrieving LockerProject data in a local install


I've been trying to play with LockerProject from Singly, and I'd like to use data other than the built-in types of contacts, links, photos, and places.  (You can see one project that motivates me at familyhistories.info.)  There are ways to build new connectors and collections that support rich functionality like syncing, but there is also a simple Push API that allows for arbitrary data, so I've started by playing with that.  Following are some changes I had to make to get things working.

We can send and retrieve arbitrary data via curl, and those examples work great.

Set:
curl -H "Content-Type: application/json" \  
--data-binary '{"data":[{"id":42,"question":"my test"}]}' \  
http://localhost:8042/push/foo 
 
ok

Get:
curl http://localhost:8042/push/foo/42
 
{"_id":"4f2752c03f670f3343f7fed0","id":42,"question":"my test"}

Unfortunately, things don't work as smoothly when trying to do it in an app.  Let's start with retrieval.  First of all, we need get data from the local locker instead of the one at singly.com.  The best approach I can think is to tweak the APIClient so that we can specify which host, so instead of "new APIClient()" we can do the following:
new APIClient({baseUrl:'http://localhost:8042'})
Great.

Except now my browser won't retrieve the value via AJAX; Chrome is the most helpful, and it tells me:
Origin null is not allowed by Access-Control-Allow-Origin.
The only way I can figure to get past this is to modify LockerProject.  So I've added the following to the Ops/webservice.js file as the first line in the first function argument to express.createServer:

// "*" works for all domains; null and "X-Requested-With" work for file:// URLs in Firefox but not Chrome
res.header("Access-Control-Allow-Origin", "*");
Cool.  Now I can retrieve values that I've inserted.  This might not be a great solution, and I haven't thought through the security complications so that I can submit it to LockerProject, but I'm just going to live with it on my machine.

Unfortunately, this is where we're stuck.  It's easy enough to add a post to insert data, but there is a problem within the parsing of JSON in the locker server: it takes any values as strings, so even though we send an update/insert like the data above with a numeric ID of 42, it ends up inserting some data with a string ID of "42"... and we can't retrieve that value with the typical GET request (above)... in fact, I cannot find any way to retrieve that data through the API.  You can see it as it gets processed in the web server and you can see it inside your mongo DB.  Most unfortunate.

In summary, to get arbitrary data from your local locker in a browser app:
  • patch the locker server (see Access-Control-Allow-Origin above)
  • use the client customizations (demonstrated here in the singly-api-local.js and the test-new-datatype.html files)
To set arbitrary data in your local locker in a browser app... you're out of luck due to the string problem.

Maybe there's a better way...?


Getting results with Singly's "Build An App!"


The Singly (AKA LockerProject) approach to building an app is pretty simple, but the current instructions didn't work for me locally.  (You can see the instructions after logging in to singly.com and then going to the "Build An App!" page.)  The difficulty may be that I used my index.html incorrectly, but it was the best I could guess: I simply accessed it directly with a "file:///..." URL.  (If anyone knows a better place, I'd love to know; I tried putting it in a separate webserver I've got locally, to no avail.)  I can get this to work, but it requires some tweaking.

The symptom in Firefox was a blank page, and in the Javascript console there was an error: "Operation is not supported" on a line with sessionStorage.  I found that sessionStorage won't work for local ("file") URLs (thanks to this StackOverflow post).

So I changed the references in the api.js to localStorage and things worked for me.  Here is my version: https://github.com/trentlarson/singly-relaxing/blob/5e9cf2c1801b78c130cdc79e84a4cdbf2b3b2deb/singly-api-local.js

It uses a conditional, so I'm hoping it can be used at singly.com as a patch to the default version.

Wednesday, November 18, 2009

Doc Searls' talk about "The Intention Economy" at Kynetx 2009

He recommends the online comic "Gaping Point."

We're trapped into thinking that a "free market" means "your choice of captivity (vendor)".

Even with social media, each site is a silo. So how do we get to personal, and "prove that a free customer is more valuable than a captive one?"

VRM (vendor relationship management) is one approach for us consumers, the reciprocal of and complimentary to CRM.
  • manage our own health care data, eg. PHR (personal health records)
  • "personal RFP" for my personal needs
  • assert our own terms of service
  • "Have governance of and by - and not just for - the people"
(Take a look at public radio player, where the VRM "CD" logo gives their VRM compliance level.)

See projectvrm.org

"4th-party": someone who helps the buyer relate to the sellers (and their 3rd-parties).

(QOTD: "We're all climbing up the volcano of Google and allowing their free software to wash over us.")

(BTW, Doc never answered the question: "How do we prove that a free customer is more valuable than a captive one?")