I've created a neo4j graph using Java, and it's sitting in an embedded database. What I want to do is write a web page which accepts user input, creates the graph using Java, and then returns the result to the web page, where it is traversed and displayed in a chart fashion.
I'm not sure where to start with this in terms of framework and how to query from root to all nodes in the graph. I was thinking of using play-framework.
What should I be looking for in terms of documentation to work out querying the graph using play, for example?
Thanks!
You also can use Spring Data Neo4j, probably the most convenient and most stable Java solutoin right now, see http://www.springsource.org/spring-data/neo4j
Related
Recently Microsoft published the Microsoft Search API (beta) which provides the possibility to index external systems by creating an MS Graph search custom connector.
I created such a connector that was successful so far. I also pushed a few items to the index and in the MS admin center, I created a result type and a vertical. Now I'm able to find the regarded external items in the SharePoint Online modern search center in a dedicated tab belonging to the search vertical created before. So far so good.
But now I wonder:
How can I achieve that the external data is continuously pushed to the MS Search Index? (How can this be implemented? Is there any tutorial or a sample project? What is the underlying architecture?)
Is there a concept of Full / Incremental / Continuous Crawls for a Search Custom Connector at all? If so, how can I "hook" into a crawl in order to update changed data to the index?
Or do I have to implement it all on my own? And if so, what would be a suitable approach?
Thank you for trying out the connector APIs. I am glad to hear that you are able to get items into the index and see the results.
Regarding your questions, the logic for determining when to push items, and your crawl strategy is something that you need to implement on your own. There is no one best strategy per se, and it will depend on your data source and the type of access you have to that data. For example, do you get notifications every time the data changes? If not, how do you determine what data has changed? If none of that is possible, you might need to do a periodic full recrawl, but you will need to consider the size of your data set for ingestion.
We will look into ways to reduce the amount of code you have to write in the future, but right now, this is something you have to implement on your own.
-James
I recently implemented incremental crawling for Graph connectors using Azure functions. I created a timer triggered function that fetches the items updated in the data source since the time of the last function run and then updates the search index with the updated items.
I also wrote a blog post around this approach considering a SharePoint list as the data source. The entire source code can be found at https://github.com/aakashbhardwaj619/function-search-connector-crawler. Hope it would be useful.
I'm getting started with graph databases. I want to migrate a social networking application from sql to Janus Graph database. I plan to build the application using Python Django framework.
I also plan to scale the application using using IBM's ComposeForJanusGraph in the future.
Problems I face:
1) I'm following the tinkerpop documentation for gremlin_python and I face several issues with the syntax because I couldn't find any good documentation. Only documentation I found here is also very short and not that helpful of how to do a CRUD. (For example how to create a new database, how to configure the search or storage database, how to create a node, how to create an edge, how to query for a vertex with a specific edge is not documented well clearly. None of them works when I try myself.)
2) Is there anything I should know before I learn and build it?
I couldn't find any good documentation. Only documentation I found here is also very short and not that helpful
Gremlin is Gremlin is Gremlin. It doesn't matter if it's Python or Java or C# or Javascript - it's all just Gremlin. Therefore, the documentation for Gremlin using Python is "short" because it simply shows how you initiate your GraphTraversalSource that allows you to spawn Traversal instances. From there, you have access to all the standard steps that Gremlin offers:
http://tinkerpop.apache.org/docs/current/reference/#graph-traversal-steps
and therefore the remainder of the documentation basically applies to your needs. The main bit of trickery to consider is that some step names conflict with Python reserved words - in those case, the step is post-fixed with a underscore and thus, the in() step for Java becomes in_() in Python.
For example how to create a new database, how to configure the search or storage database,
You won't find this in TinkerPop documentation really. How you create/configure a TinkerPop Graph implementation is specific to the graph database that you choose. You typically won't do that in Python. You will resort to the approach provided by your graph. If your graph is JanusGraph on IBM Compose, you should consult their documentation. You will only connect to that graph once established with gremlin-python.
how to create a node, how to create an edge,
It's just Gremlin. Gremlin has steps for mutating a Graph so to add a vertex and and to add an edge so to create two vertices and an edge between them I can string together a single traversal that does that:
g.addV('person').property('name','cegprakash').as('c').
addV('question').property('title','Using gremlin-python Janus for social networking application').as('q1').
addV('question').property('title','Working of CCD algorithm for Inverse Kinematics').as('q2').
addE('asks').property('votes',0).from('c').to('q1').
addE('asks').property('votes',1).from('c').to('q2').iterate()
how to query for a vertex with a specific edge is not documented well clearly.
Again, it's just Gremlin and there are plenty of examples.
g.V().has('person','name', 'cegprakash').
out('asks').
has('votes',gt(0))
So the above, says to find a vertex with the name "cegprakash", then traverse all the outgoing edges labelled "ask" with a "vote" property that has values greater than zero.
Is there anything I should know before I learn and build it?
If you haven't worked with graphs before, just start simple. Use TinkerGraph and the Gremlin Console to get familiar with the Gremlin language and then start looking into how JanusGraph is configured and operated under Compose. At that point you'll have a good basis for digging into how your application will actually work and if necessary asking more specific questions.
I am fairly new to Azure and mobile services, and all the examples and tutorials I can find for the table and API scripts are fairly simplistic.
If I have some processes that are fairly complex and rely on pulling information from many different tables and processing contingent on that data, should I be doing that somewhere other than the API scripts? I am new to node.js as well so maybe that's the problem but I was wondering if there is a more appropriate place for business logic, such as some bridge I need to add to my stack?
There are a lot of examples of how to use MSSql object which is used to query tables and Node in general available. A healthy search will reveal just about anything you need. Since you said you are new to Node.js consider using the .NET backend instead. It is based on Entity Framework and there are lots of Entity framework examples out there for you too. Finally, there are some really good examples of complex logic being used in the back ends in the sample code available: http://azure.microsoft.com/en-us/develop/mobile/ios-samples/ (pick your client OS) and here: http://azure.microsoft.com/blog/topics/mobile/ and here: http://blogs.msdn.com/b/azuremobile/
Let us know if you have specific questions!
I have a MEAN stack (AngularJS, Express, MongoDB, NodeJS) application that I want to convert into a semantic web application. I want to use JSON-LD to send around dynamic data and I (obviously) want it do be as fast as possible.
I have found Jena-Fuseki (a triple store) which I can store and retrieve rdf data from, but there are no options for retrieving data in JSON-LD.
Does anyone know if there are any comparison charts for different Node.js compatible triple stores; especially when it comes to speed and serialization formats and cost?
If you want to build an semantic web application using Node, you can try stardog.js. It's just a Node library, so it does not help with Angular or JSON-LD, but it can get you started. Stardog does also provide access to the web services used to build its web console. These do use JSON-LD as the data format.
I am looking at Couch Db and I saw Ektorp that presents a JPA like interface for database. However I see that there are examples that how to make query at JavaScript. I didn't understand how the system work.
Do I query a database from web tier without a middle tier? How can security be done with that?
CouchDB uses javascript to define map and reduce functions for it's views. Ektorp is simply providing you a convenient way to create those functions that will be used by couchdb. You might want to read the couchdb wiki page on views:
http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views
Just because the views are javascript, does not imply that you have to create the views from a 'web tier'.
In terms of architecture, you have a couple of options. You can use a traditional three tier approach with a java front end, and in your middle tier call couchdb with ektorp. Then you are in full control of security.
You can also go with what is coming to be known as the 2.1 tier model, where users interact directly with couchdb, mainly with a couchapp. You can then provide support services that listen to the changes feed. I have done this with ektorp and it works very well. Other have used node.js. It is a different way of thinking, but it can work. You can read a fun post about this model here:
http://markmail.org/thread/cfw7f3ef75aoqzin
Anyway, I just wanted to provide you with possible options in how you 'tier' your architecture.