Author Topic: Introducing BitShares Object Graph  (Read 14144 times)

0 Members and 1 Guest are viewing this topic.

Offline jsidhu

  • Hero Member
  • *****
  • Posts: 1335
    • View Profile
groundbreaking and thought provoking!  +5%

u mistyped primtive btw.

Ethereum stuck to primitives or assembly.. And a double directed graph would cut down dev costs and ease of use on primitives.. however the million dollar question is: Is there a case you can think of where you would not want to use a graph but use primitives to solve a problem?

I guess vitalik assumes others will build on top if there is a market todo so while we give a leg up on beginners to solve problems quicker but if its a subset of problems then there is a case for primitives or assembly still.  That is when will flexibility of primitives be needed in this context where a graph wouldnt work for a layman?
« Last Edit: December 24, 2014, 08:57:16 pm by jsidhu »
Hired by blockchain | Developer
delegate: dev.sidhujag

Offline Crossover

  • Full Member
  • ***
  • Posts: 54
    • View Profile
very interesting, how fast its gonna work compared to relational databases from MS/ibm?

found answer in wiki:
"Compared with relational databases, graph databases are often faster for associative data sets[citation needed], and map more directly to the structure of object-oriented applications. They can scale more naturally to large data sets as they do not typically require expensive join operations. As they depend less on a rigid schema, they are more suitable to manage ad hoc and changing data with evolving schemas. Conversely, relational databases are typically faster at performing the same operation on large numbers of data elements.

Graph databases are a powerful tool for graph-like queries, for example computing the shortest path between two nodes in the graph. Other graph-like queries can be performed over a graph database in a natural way (for example graph's diameter computations or community detection)."
« Last Edit: December 25, 2014, 10:12:08 am by Crossover »

julian1

  • Guest
Very interesting. I noticed the object manipulation api before - assume it's the same?

blockchain_get_object <id>                                                                         
wallet_object_create <account> [user_data] [m] [owners]                                             
wallet_object_list <account> 

Offline Ander

  • Hero Member
  • *****
  • Posts: 3506
    • View Profile
  • BitShares: Ander
"The Object Graph will become the foundation for the future BitShares scripting environment. Every scripting language has a data model and this data model has a dramatic impact on the efficiency of scripting.

Ethereum has adopted a very simplistic database, a key-value store. A key-value store is a fundamental building block of all databases and is turing complete. By adopting a higher level data representation we can greatly accelerate many operations that would be expensive using a key-value store. It is like the difference between programing in assembly vs a higher level language like Java Script. We can optimize the graph database that the scripting environment runs on in ways that you would be unable to optimize a key-value store directly. In other words, Ethereum will force developers to build a graph database within their scripting environment on top of their key-value primitve. This will mean the graph database will be interpreted rather than fully optimized and compiled. "


I think we just went to Crypto 3.0. :)
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

sumantso

  • Guest
Is this the last big addition to the protocol before 1.0? Looks really interesting and it will be great if we can advertise that we have a better data structure than ethereum.

I was posting it at BTCtalk and I was careful to avoid the better than Ethereum line (tempting as it was). I think at this point we should just focus on positives and let them draw the better than xyz conclusion (also one of the reason I want to pitch them BitBTC as something which enhances BTC, rather than trying to sell them BTS saying how they should abandon mining).

You can pitch in in this thread or create a new topic https://bitcointalk.org/index.php?topic=895637.msg9937028#msg9937028
« Last Edit: December 24, 2014, 07:51:17 pm by sumantso »

Offline liondani

  • Hero Member
  • *****
  • Posts: 3737
  • Inch by inch, play by play
    • View Profile
    • My detailed info
  • BitShares: liondani
  • GitHub: liondani
I buy more BTS and I promise to short all active bitAssets...

PS BM know's how to make Christmas gifts !!!

Offline Rune

  • Hero Member
  • *****
  • Posts: 1120
    • View Profile
Is this the last big addition to the protocol before 1.0? Looks really interesting and it will be great if we can advertise that we have a better data structure than ethereum.

Offline fluxer555

  • Hero Member
  • *****
  • Posts: 749
    • View Profile
I have no idea what's going on, but I'm excited  :D

sumantso

  • Guest
Question: Why did Ethereum chose that model? There has to be some benefit.

Can you add a small section where it directly shows the difference between Bitcoin and Bitshares (like we have a comparison between Bitshares and Ethereum)?

Offline arhag

  • Hero Member
  • *****
  • Posts: 1214
    • View Profile
    • My posts on Steem
  • BitShares: arhag
  • GitHub: arhag
It's not necessary and maybe not useful, but we're not going to add complexity to remove a feature =)

So it seems like the primitives in the BitShares Object Graph are node and edge objects which are very similar to one another (both can have arbitrary JSON associated) with the following important differences:
  • The edge object needs a source object (perhaps only restricted to node objects, TBD) and a destination object while the node object does not have those things.
  • The node object has an ACL (multisig owners and multisig updaters) defined on it while the edge object does not. These permissions are the source that propagate the ACL to the edges spreading out from the node.

And edge cannot be a source Vertex only a destination vertex. 

If that is the case, you should fix the following statement in your blog post.
Quote
This means that you can construct an edge from a node to an edge or from an edge to an edge.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai

And edge cannot be a source Vertex only a destination vertex.

Well right now an edge can be a source, shall we change it?

You could make validation non-Constant time Because you may have to look back source source source source owner.

There's a recursion depth limit, which I don't think we can remove because an object can be owned by another object which can be owned by another...
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline bytemaster


And edge cannot be a source Vertex only a destination vertex.

Well right now an edge can be a source, shall we change it?

You could make validation non-Constant time Because you may have to look back source source source source owner. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
And edge cannot be a source Vertex only a destination vertex.

Well right now an edge can be a source, shall we change it?
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline bytemaster

And edge cannot be a source Vertex only a destination vertex. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline toast

  • Hero Member
  • *****
  • Posts: 4001
    • View Profile
  • BitShares: nikolai
Whoa, edges are also objects (meaning nodes/vertices)?

Can you give me an example of why that is necessary or would be useful?

It's not necessary and maybe not useful, but we're not going to add complexity to remove a feature =)
Quote
So if I have:

(N1) --E1--> (N2) ---E2---> (N3)
        ^            |
        |-----E3-----|

First is this an acceptable "graph" in BitShares? And who "owns" edge 3? The source "node" of edge 3 is edge 2. The source node of edge 2 is node 2. So does that mean that the owners of N2 control edges 2 and 3?

Edge objects are always defined to be owned by the owner of the "from" object. So you got it right.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.