Giter VIP home page Giter VIP logo

Comments (15)

tarpdalton avatar tarpdalton commented on July 4, 2024

Do we also want ground to manage an API where a user/application could POST and it would write a message to one of grounds kakfa topics? For other types of webhooks.

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

I also need to add in a python script for setting up the github webhook. For the script the user would provide:

  • repo URL
  • credentials
  • ground github webhook API URL

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

This is how I am POSTing each version/commit

{
    "tags": {
        "branch": {
            "key": "branch",
            "value": "refs/branches/master",
            "type": "string"
        },
        "commit": {
            "key": "commit",
            "value": "8464793044eff62c794f88c06ea286e427efc8b9",
            "type": "string"
        },
    },
    "structureVersionId": null,
    "reference": null,
    "nodeId": "Nodes.ground",
    "parameters": {}
}

Do you think this is the best way to do it?
Should nodeId be repo id (153213) instead of repo name? repo names are not unique and could cause problems

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

I'm facing a problem with the nodes/versions/ API, I'm listing the parent versions in the URL and when I get to 30~ versions the API starts taking a long time and then just not working. I'm using neo4j as my backend. If I don't list and parents in the URL then it works fine and doesn't slow down. I'll look into the API and see if I can figure out what might be causing it.

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

It looks like it is a problem when getting the DAG. If the path along the versions is too long it causes problems
https://github.com/ground-context/ground/blob/master/ground-core/src/main/java/edu/berkeley/ground/api/versions/neo4j/Neo4jVersionHistoryDAGFactory.java#L45

from ground.

vsreekanti avatar vsreekanti commented on July 4, 2024

Oh, I see. That's using a Neo4j feature for recursive queries basically. We might be able to do things a little faster if we create an index on VersionSuccessor in Neo4j. Do you want to try that?

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

I've used gremlin more than cypher so I'm still trying to figure out how to create an index to help the query go faster. It looks like its easy to create an index on a property type but that doesn't really help us.

from ground.

vsreekanti avatar vsreekanti commented on July 4, 2024

Hm, what makes you say that creating an index on the VersionSuccessor property type will not help?

Do you think you could set up a Neo4j server in the cloud somewhere with this data, so we can both play with the data to figure out how to make this go faster?

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

I guess I thought VersionSuccessor was a relationship not a property type.
I ran CREATE INDEX ON :NodeVersion(VersionSuccessor) yesterday and it didn't improve performance.

from ground.

vsreekanti avatar vsreekanti commented on July 4, 2024

Hm. I think that creates an index on the VersionSuccesor property of the vertices labeled NodeVersion. It's not clear to me why a path of length 50 has such a big performance hit. Could you try doing something like [:VersionSuccessor*..100] (only find paths of length up to 100).

I'm going to look into this a little bit more, but if Neo4j can't handle these queries, then we might have to drop it and go back to Postgres...

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

Ok I think it might be working. I'll test it more

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

Still not working, but this query might work for getting similar information. It's faster but it doesn't include the starting node. I'll see I can get the query to include it

MATCH (a:NodeVersion { node_id : 'Nodes.ground' }) -[r:VersionSuccessor] - (b:NodeVersion {node_id : 'Nodes.ground'})
RETURN DISTINCT r

Nodes.ground is the initial node

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024
MATCH (a)-[r:VersionSuccessor]-(b:NodeVersion {node_id : 'Nodes.ground'})
WHERE a.id='Nodes.ground'
OR a.node_id='Nodes.ground'
RETURN DISTINCT r

This will include the original node.

from ground.

vsreekanti avatar vsreekanti commented on July 4, 2024

Interesting. This works recursively?

from ground.

tarpdalton avatar tarpdalton commented on July 4, 2024

I don't think the new one does it recursively. It gets all relationships that come from or go to a node_id "Nodes.ground", with label "VersionSuccessor". Then it combines them all to get a path.

When I ran the old query:

MATCH (a:Node {id: 'Nodes.engine' })-[e:VersionSuccessor*..20]->(b:NodeVersion)
RETURN e

It returned 9736 rows, so I think it is finding every possible path.

from ground.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.