oozakazoo
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:lots of small, fast things, all connected
== oozakazoo - Complex Linked Lists 

This simple list api seeks to understand the performance implications of implementing a social graph in various ways. The intent here is to try out a variety of sql and non-sql storage schemes to try to understand first hand the problems involved. 

It will provide a simple listing service api to allow applications to manipulate data sets in a general way. Since a graphed set underlies many real world applications, this could be useful. 

We find that lots of the information about real-world contiguous objects is split along lines of artificial categorization - only separate because of the specificity of the application used to view the data. 

Imagine you finally purchase that furry seat cover from an internet retailer. This purchase relates to your bank (debit your credit card), your budget (subtract from the monthly furry item budget category), your friend who recommended the store to you in the first place, your document store (evernote? box? nothing?) that contains the furry seat cover washing instructions, your email, where you received the receipt and shipper tracking number, your calendar where you have the reminder to look outside the front door (because it might rain, and wet furry seat covers are not nice things to have), your notes about phone calls to the store,  and your inquiries to the vendor about why the fur was pink and not purple, notes (voice recordings?) about whether and how the dispute was resolved.... Those tweets I made about how awesome my seat cover made me feel. That article I found about the chemicals in the fur causing skin cancer. That stuff. 

You've done this, right? What innocent purchase doesn't turn in to a data extravaganza? This little thing has it's own complex graph of information. It's probably ok to ignore it, but it is there nonetheless. And who knows? Maybe if it were effortless to keep this stuff, life would seem less confusing, and we could actually become smarter about the every-day little stuff. 

After years of service, it's time to replace that furry seat cover. It would be nice to know what you paid, where you got it, which model you bought, and something about recalling the buying experience to know if you should go back to the same store. But it's been 8 years, and my memory isn't that good. 

Good luck with that. 

The problem is that Real Life is not like the set of discontinuous information store that we build as we live it. In reality, it's a smooth whole, with everything connected. 

How to solve? The challenge is to start thinking more like a human and less like a computer about these things. In the ideal world, I would have a data store (much like a brain, but not The Brain) that contained all these bits of information connected to each other in a web.  Ownership of this would be by the individual. Stuff put in here would establish priority for academic, copyright, and patent purposes, would bequeath to whomever the owner wants to bequeath it to, could be used to reliably sell and transfer ownership of information therein, and would If I tug at part of the web, I can see the stuff it's connected to without having to know the storage mode of the information (was that in my email? the box? my blog? twitter? voicemail?). Connections to things owned by other people (that recommendation on amazon) are allowed. 


=== Why the hell bother? 

Mainly because I need a project, and I'm obsessed with this. 


== Realizing This Might Require...

This isn't going to solve the problem. In fact, it will be a pretty embarrassingly lame attempt, but it might start to illuminate a way to represent things like this. The real thing would need a few qualities: 

Uniquely identified 'things' that could be represented in any computer system, but which don't lose their identity. 

Some kind of data store that works for things like this (pregel - like)

Ability to have the things in any system while retaining the connections to other things in other systems. 

Ability for any type of portal into the information. "represent as an email thread", you might say. Or, "peruse this as a relational database (eh?)". The point: the 'real' information is in a layer beneath the representational layers, and it is logically contiguous. Someone will build a representational SQL layer over the top, but it won't change the underlying reality. 

A way for requests to navigate to these things, kind of like the way IP packets find their way on the internets now. Google might know a thing or two here. 

History of change for each thing, ability to go back in time, wave-like, or couch-like, or git-like. 

Established relationship types between things, ability to create new types. 

Ability to establish a personal information store (not physical, but a registry of the things I create) that is recognized as property and protected the same way that something like a corporate entity is protected, with individual rights clearly established for the information, a system of laws protecting rights. Ability to collateralize the information. Ability to take the information with you from job to job (don't tell anyone I said that.)

Universal timestamps (see priority, above). 

Support for a marketplace, so that the economic benefit of each idea and bit of information in your store can be realized. You want my purchasing history for salty snacks? Show me the money, baby! Otherwise, hands off my salty snack purchasing behavior data!

A complete and sweeping cultural transformation, enabled by new technologies, in the understanding that information now owned by the corporations you do business with really ought to be owned by individuals, except that before this we had no way of keeping track of it, so we assumed it was worthless. Refactoring micro-economic thinking. Etc. Whatever. 


== Goals for this project

Provide an API for manipulating bodies of linked objects.  

Find out what it is like to deal with objects linked this way. Play with representing them in different ways and on different platforms. Find the data structure that is most flexible. 

See if rails can really talk to couch db.

Find a edge-node database that rails can talk to. 

The goal isn't to create useful CRM-style system. Much as it may seem. 

Make a halfway decent UI for dealing with non-standard data structures. 

== Architectures 

Entities are nodes

Links between entities are edges

Edges have types to define the relationship in question. (this is kind of difficult, unless it is kept very, very simple, like 'contains' and 'defines')

Everything has to share some system types - system catalog (special entity). In there, find catalog entries for the basic following entities (all type=system_catalog):

These are 'catalog_entry' type (so, type definers), belonging to system catalog. 
- people
- time interval 
- catalog
- catalog item
- permission
- link
- document
- 

Permissions are edge objects. How does the permission attach? 
One way is to have special edge types for each, but then you might need several to define a permission. 
# TODO: permission hex structure like playlist, where one permission describes the whole thing for
:grants_view =>  "7c175d76-3dc4-4756-b5a5-d497a0675771",
:grants_edit => "a54c8164-989e-4d58-86d0-450254161770", 
:grants_add => ?? 
:grants_delete =>  "e7f2cc42-fa61-4b59-9ecf-2bbba4a62ec0",

Who can create an object belonging to a catalog? Someone with 'edit' on the system catalog object. You can 



Authentication is needed, maybe oauth?
http://openwebfoundation.org/2009/11/introducing-the-open-web-foundation-agreement.html

Declarative auth? Interesting methodology. 
http://media.railscasts.com/videos/188_declarative_authorization.mov

Useful: Object Role Modeling
http://en.wikipedia.org/wiki/Object_role_modeling



本源码包内暂不包含可直接显示的源代码文件,请下载源码包。