Hi,
(I'm stuck in a waiting room so I started drawing a few ideas. I'll
report back later on the movie recommender thing)
Here my idea/problem
As you probably know, ants find their way to food by marking their
path. The more odor they smell, the busiest the road (the english word
is, i think pheromone).
I have a network of "ant cities" with roads between them. (They can go
from any city to any city directly)
I have spies in every city that tell me "1 ant walk from A to B". To
reflect that in my graph, I want to update the counter property of the
edge between vertice a and b.
I think that to do that I have to:
1. Find vertex A in the global graph ( i'll have about 10000 city vertices)
2. Get outgoing edges for vertex A and filter to find the one that
goes to B or create it if needed
3.Alter the property counter of the edge +1
Of course I could do it sequentially but I guess it wouldn't be efficient?
So I thought about traversing and modifying the graph all at once
using pipes, but for some reason I find that scary (coming from a
rdbms world...)
Second problem. Now I also want to remember for a few minutes (say,
15) that the ant going from a to b is ant x.
So that i can query the graph "where did ant x go in the last
15minutes" and get the answer "it went from a to b to c and when in c,
it entered the c' casino"
How would you model these data?
I could add a property "passingAnt" to each edge which is a list of
ants which is periodically cleaned by some process, but it would be
quite slow i guess
I could add a property "casino" to vertices to list all ants that got
into the casino, but the same remark applies.
So, i guess i have to have a vertex for each ant, but how would i
attach it to 2 city vertices? In uml, that would be a
composition/aggregate (i never remember the right name).
I think i'm also "perveted" by my background in petri nets, where one
of my CS professor invented "object tokens" where the tokens has
properties, methods. In a petri net with object tokens, the token
would be the ant....
I know my use case is a bit strange with ants going around and in
casinos, but i can't really explain my real world case. It's'basically
exactly that,except i'm not working with ants :p
Thanks!
Florent
2012/6/7, Alfredo Serafini <
ser...@gmail.com>:
> Hi Marko reading twice the post i've notice that has been removed the pgm
> part... are there any plans to re-introduce support for some key-value
> storage or mongodb then?
> If i'm not wrong Titan too it's on a similat perspective? :-)
>
>
>
> Il giorno giovedì 7 giugno 2012 13:13:30 UTC+2, Marko A. Rodriguez ha
> scritto:
>>
>> Hi,
>>
>> There have been lots of confusions about Blueprints 2. Given that the API
>>
>> has changed so drastically, it is important that we outline what the major
>>
>> differences are. Moreover, this is something we should have provided the
>> community initially.
>>
>>
>>
https://github.com/tinkerpop/blueprints/wiki/The-Major-Differences-Between-Blueprints-1.x-and-2.x
>>
>> This list was given off the top of my head. If you can think of anything
>> else I'm missing, please add a section and either write it up or tell me
>> so
>> I can write it up.
>>
>> Matthias, I left a blank on the transactional semantics section. Can you
>> please fill that out?
>>
>> Thanks everyone,
>> Marko.
>>
>>
http://markorodriguez.com
>>
>>
--
Envoyé avec mon mobile