Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Thursday, 17 March 2016

The BeerGraphGuide in the Neo4j Browser: the making of!

So last week I showed off this little tidbit that I created with the help of Michael and Oskar - a BeerGraphGuide right into the already fabulous Neo4j Browser.

So obviously I need to explain HOW I created that - and that's what I will do in this blogpost.

Creating a Browser Guide - easy!

Starting point of the exercise is Michael's github repo with all the source material. Download the zip file with all sources and unzip it on your local machine. The instructions online are kind of limited, but in principle the sequence of what we need to do is EASY:
  1. we need to create an Asciidoc file (identical to what we use for our GraphGists) that describes the Neo4j Browser Guide.
  2. we need to convert that Asciidoc file to an HTML file with a very simple shell script (see below).
  3. we then need to figure out a way to LOAD that HTML file into the Neo4j browser. in a :play pane (similar to the built in guides that we already have)
So let's get cracking with that.

Friday, 11 March 2016

The Neo4j Browser has a BeerGraphGuide

I have written quite a bit about Beer on this blog - and that's a good thing. I have also done a bunch of graphgists about it, and I am sure I will keep on doing that for a while to come. But recently, I have learnt about some new functionality in the already awesome Neo4j Browser that allows you to extend it with custom GUIDES - the learning tool that is built straight into the platform. And so I had to take it for a spin, and get my Belgian Beergraph to become part and parcel of the Browser - of course.

Here's a little video I made capturing how this would look like.

I am planning to come back to this in the next few weeks, and explain the details of how this works. But for now, I think this opens up a world of possibilities on how people will be sharing and working on graphs with Neo4j and its Browser.

Cheers

Rik

Tuesday, 1 March 2016

Podcast Interview with Oskar Hane, Neo Technology

Here's another great conversation with one of the Neo4j Engineers that is working on the coolest product since sliced bread: me and Oskar had a great conversation about his daily work on the Neo4j Browser - one of the most loved components of a very loved product. Here's out chat for you:


Here's the transcript of our conversation:
RVB: 00:02 Hello everybody. My name Rik, Rik Van Bruggen, from Neo Technology. Here we are recording another podcast session. Today, we have a really interesting guest, all the way from BorĂ¥s in Sweden, and it's one of our developers on the Neo4j engineering team. It's Oskar Hane. Hi Oskar.
OH: 00:20 Hi Rik.
RVB: 00:21 Hey, good to have you on the podcast. Thanks for making the time.
OH: 00:25 Thanks for having me.
RVB: 00:27 It's great. Oskar, one of the reasons I was really excited to get you on the podcast was because Neo4j has this wonderful front-end tool that I use a lot, everyone uses it a lot, called the Neo4j browser. I think you're one of the guys behind that, aren't you?
OH: 00:46 Yes, since about one and a half years, I've been on that UX team, what we call it internally.
RVB: 00:54 How did you get to Neo, who are you, where did you come from, how did you get to Neo?
OH: 01:01 Actually, it's quite a funny story, I think. I was browsing Twitter two years ago, and I think that one of the guys I was following retweeted something from a guy called Emil Eifrem, send that--

RVB: 01:21 Who is that guy?
OH: 01:22 By then, I didn't know. I didn't know [anything?] at all, and he said that, "We're looking for Java developers." I was a freelance contractor by then, and I was just-- a long contract, so I was looking for Neo4j, so I sent him a tweet and said, "Don't you have any openings for JavaScript because I'm not a Java guy?" And he was like, "I think we do, actually. Talk to Magnus!", another guy inside Neo. They set up interviews. I actually have like seven or eight interviews before I joined in August of that year.
RVB: 02:16 Have you used Neo4j before or did you know about the product before, or how did you know about it?
OH: 02:22 No, I didn't, but of course, when I talked to Magnus the first time-- well, before I talked to Magnus, I downloaded and started using it. I was blown away by the user interface of the client or the Neo4j Browser compared to-- I've been working with MySQL and other databases, and their user interface--
RVB: 02:53 Is a little bit more old-fashioned?
OH: 02:55 Yeah, so I was completely blown away. I'm thinking, "Wow, I'd really like to work on this product," and I managed to get in.
RVB: 03:07 And the rest is history, right?
OH: 03:09 Yeah [chuckles].
RVB: 03:10 Nowadays, it's you and one or two other people that work on that part of Neo4j, right?
OH: 03:16 Yeah, currently, we're two. The other guy, Mark Peace sits in the London office, and in two weeks, another person is joining us, so it'll be great to have the three of us.
RVB: 03:33 What do you think is so cool about Neo4j, in general, but maybe the browser, more specifically, why do you think it's such a cool product to work on, what makes it so nice?
OH: 03:47 As you were talking a little bit that it's modern, in a way, compared to MySQL, and the browser is, you can visualize the data in a way that you're not able to visualize in a relational database, of course, an area that Neo4j or graph databases we have fixed relationships between nodes.
RVB: 04:23 The graph data model, right?
OH: 04:25 Yeah, exactly. So we have this graph visualisation in the Neo4j browser where we can run animations and have a gravity physics engine to display the data in a nice way.
RVB: 04:44 I think one of the cool things about the browser, for me as a user, is that it combines so many nice perspectives. On the one hand, it's a visualisation tool, on the other hand, it's a query troubleshooting tool, on the other hand, I have a learning tool. There's so many nice things coming together, I think. I'm assuming that was intentional.
OH: 05:09 Yeah, of course, it's sort of a platform for-- the target audience was from the beginning, at least, for developers who are writing apps for the Neo4j database, then we can use this Neo4j browser, as you say, they can see the data in many different ways. We can troubleshoot if we have any query program, so we can just run ad hoc queries to get interesting stuff, and you can learn the query language, Cypher, within the browser.
RVB: 05:50 I have off the cuff type of question for you, what's your favorite feature, if you have any? It's probably the most recent one [chuckles], but what is one of your most-- the nicest thing about the browser?
OH: 06:08 Wow, that's really a hard question. Even though it could be limited in how big graph you can do it at once, but I think the visualisation is actually my favorite because I'm basing that element that other database types that don't have, that makes us unique.
RVB: 06:37 My personal, probably, is the fact that you have this rolling history. You have this long page of query histories that you can sort of go through. I don't know if you've ever seen one of my graph karaokes but that's what I use all the time...
OH: 06:54 I have that actually, I have that karaoke [laughter].
RVB: 06:59 I'm a fan of your work, Oskar, I really am.
OH: 07:03 Thanks.
RVB: 07:05 One more thing, if you don't mind, where is this going? What does the future hold, both from the product in general, the browser, more specifically, and maybe the industry that we work in, any comments on that?
OH: 07:23 I can talk for the browser at least that we-- we're talking about having it extensible in a way that somehow that you can write like from the plugins maybe for the browser, and load in an easy way as a user. I very much like to see that, at least, that if you want to visualize your data in a special way, maybe your own [row?] or table format that only you see, you could create a front-end plugin, so to speak, just have it that way.
RVB: 08:10 So like an extension, but then part of the browser, so to speak, right?
OH: 08:14 Yeah, something like that. But we're moving some of the content out of the browser so you can bring it back in. We're heading that way.
RVB: 08:27 You also mentioned to me earlier that for future versions of Neo4j, the browser is not going to be like part of the same package as Neo4j, is that also something that's coming up then?
OH: 08:37 Well, maybe, I'm not 100% sure where we are at the decisions yet, but what we know is that, at least, we have among the files, the repository for the browser out of the Neo4j main database, but mostly, having it as a dependency. So when you download Neo4j, you get the browser inside it, just as you do now, but the code isn't mixed with the database code.
RVB: 09:08 It's easier to pull it out if we want or need to do that, right?
OH: 09:12 Yeah, exactly.
RVB: 09:13 Very cool. What about visualization, in general, is there-- there's so much stuff happening in that domain, graph visualization, it's a very hot topic, I think, how do you look at that?
OH: 09:28 Yeah, it is, and it's super hard to show visualization that are huge which has functions and elements and relationships within it. I'm very impressed by many of the actors in the industry.
RVB: 09:51 It very quickly becomes like hairball, doesn't it [chuckles]?
OH: 09:56 It can hold your web browser as well.
RVB: 10:00 Totally, there's some really cool visualization tools out there. We've been partnering with externally, so hopefully, that's complimentary, it should help us.
OH: 10:13 Definitely, we're a small team. I think our visualisation is good for some use cases, but maybe not for some.
RVB: 10:26 Well, very good. We'll wrap up the recording here, if you don't mind. We'd like to keep this podcast short and snappy. Thank you so much for coming online, Oskar, really appreciate it.
OH: 10:40 Thanks.
RVB: 10:41 I'll look forward to seeing you maybe at GraphConnect Europe or some other occasion very soon.
OH: 10:47 I definitely will be at GraphConnect Europe.
RVB: 10:50 Fantastic. I'll look forward to seeing you there. Thank you.
OH: 10:52 Likewise, thank you.
RVB: 10:53 Bye.
Subscribing to the podcast is easy: just add the rss feed or add us in iTunes! Hope you'll enjoy it!

All the best

Rik

Wednesday, 13 January 2016

The GraphBlogGraph: 3rd blogpost out of 3

Querying the GraphBlogGraph

After having created the GraphBlogGraph in a Google Spreadsheet in part 1, and having imported it into Neo4j in part 2, we can now start having some fun and analysing and querying that dataset. There are obviously a lot of things we could do here, but in this final blog post I am just going to explore some initial things that I am sure you could then elaborate and extend upon.

Let’s start with a simple query

// Which pages have the most links
match (b:Blog)--(p:Page)-[r:LINKS_TO]->(p2:Page)
return b.name, p.title, count(r)
order by count(r) desc
Run this in the Neo4j browser and we get:

or just return the graphical result with a slightly different query:

match (b:Blog)--(p:Page)-[r:LINKS_TO]->(p2:Page)
with b,p,r,p2, count(r) as count
order by count DESC
limit 50
return b,p,r,p2

And then you start to see that Max De Marzi is actually the “king of linking”: he links his pages to other web pages a lot (which is actually very good for search-engine-optimization) .

A quick visit to one of Max’ pages does actually confirm that: there’s a lot of cool, bizarre, but always interesting links on Max’ blogposts:
So let’s do another query. Let’s look at the different links that exist between blogposts of our blog-authors. Are they actually quoting/referring to one another or not? Let’s do

//links between blogposts
MATCH p=((n1:Blog)--(p1:Page)-[:LINKS_TO]-(p2:Page)--(b2:Blog))
RETURN p;

and then we actually find that there are some links - but not that many.


Same thing if we look at this a different way: let’s do some pathfinding and check out the paths between different blogs, for example my blog and Michael’s

match (b1:Blog {name:"Bruggen"}),(b3:Blog {name:"JEXP Blog"}),
p2 = allshortestpaths((b1)-[*]-(b3))
return p2 as paths

Then we actually see a bit more interesting connections: we don’t refer to one another directly very often, but we both refer to the same pages - and those pages become the links between our blogs. At depth 4 we see these kinds of patterns:

Interesting, right? I think so, at least!

Then let’s do some more playing around, looking at the most linked to pages:

//Which pages are being linked to most
match ()-[r:LINKS_TO]->(p:Page)
return p.url, count(r)
order by count(r) DESC
limit 10;

That quickly uncovers the true “spider in the web”, my friend, colleague and graphista-extraordinaire: Michael Hunger:

Last but not least, I wanted to revisit an old and interesting way of running PageRank on Neo4j using Cypher (not using the Graphaware NodeRank module, therefore). I blogged about some time ago, and it’s actually really interesting and easy to do. Here’s the query:

UNWIND range(1,50) AS round
MATCH (n:Page)
WHERE rand() < 0.1
MATCH (n:Page)-[:LINKS_TO*..10]->(m:Page)
SET m.rank = coalesce(m.rank,0) + 1

This does 50 iterations of PageRank, using a 0,1 damping factor and a maximum depth of 10. Running it is surprisingly quick:

If you do that a couple of times, and even do a few hundred iterations at once, you will quickly see the results emerge with the following simple query:
match (n:Page)
where n.rank is not null
return n.url, n.rank
order by n.rank desc
limit 10;
Confirming the “spider in the web” theory that I mentioned above. Michael rules the links!


All of these queries are of course on Github for you to play around with. Would love to hear your thoughts on these three blogposts, and hope that they were as fun for you to read as they were for me to write.

All the best.

Rik

Tuesday, 9 June 2015

Podcast Interview with Tom Zeppenfeldt, Ophileon

One of the topics in the Graph Database space is that is truly dear to my heart is the visual aspect. Graphs seem to be - for some very deep and profound reason, is my guess - a very natural way for humans to interact with data. And what better way to do that then in a truly visual way.

So I still remember 2+ years ago or something, this guy shows up at our Amsterdam meetup gathering and starts talking to me about the Neo4j browser interface - which was still in its infancy at the time. All of his questions made total sense, and I kindof wish I had had better answers for him at the time. But I kindof also am happy that I didn't, because that's why Tom Zeppenfeldt but on his "working gloves" and got to developing a new tool that looks really promising: Ophileon's Prologram.

Tom has recorded some really nice videos online where he is showing some of the capabilities of Prologram:
So that's when I asked him to come on the podcast too - and here's the result:





Here's the transcript of our conversation:
RVB: Hello everyone. Here we are again, recording another episode for our Neo4j Graph Database podcast. My name is Rik Van Bruggen. I work for Neo Technology, and on the other side of this Skype call, all the way in the Netherlands, is Tom Zeppenfeldt. Hi Tom.
TZ: Hi Rik. How are you doing?
RVB: I’m doing very well. How about yourself?
TZ: Yes. I'm very fine.
RVB: [chuckles] That's great. Well, Tom, most people who are listening to this Podcast probably don't know you yet, so would you mind introducing yourself? Who are you, what do you do, and what's your relationship to the wonderful world of graph databases?
TZ: Okay. Well, my background is not in IT. By education I'm an agricultural engineer and the main field where I've worked over the last couple of years was in international development in Africa and Latin America and that's also where there is a link between-- the link with Neo4j.
RVB: Oh, no way. Tell me about that.
TZ: Yes, as you probably know and there are lots and lots of types of development projects in agriculture, infrastructure, education and health for instance, and one of the typical things that you use in that context is what they call Result Chains, so diagrams that link activities and organizations and results and impacts and effects to each other and also a concept that is called Actor Constellation Mapping. That is a way of diagramming all the interests of different stakeholders in a project and how people collaborate, how they form networks, and  when I say networks I'm already talking graphs.
RVB: Yes, absolutely. Wow, that's great. How long ago did you first encounter Neo and how did that...?
TZ: That happened about four years ago and when we ran into a very concrete situation where we had to make these kinds of diagrams accessible over the Internet. So instead of drawing Powerpoints with graph-like structures in it, we were looking for a database platform that would allow us to share these things and make these things interactive over the Internet.
RVB: So, then that sort of created the desire to store them in a network way as well, I suppose.
TZ: Yes.
RVB: Yes. Okay. What are you doing now with Neo, Tom, because I know you're really doing some really fancy stuff, but tell us about that.
TZ: Yes. Well, currently our main project is a project that is partially privately funded and partially subsidized by the dutch government, and which is focusing researchers like journalist that do research or investigations on a specific subject. It include partially Neo4j for storing relations between documents, but also documents and content from social networks and also all kinds of tagging and metadata and for that, we have also a corporation with two universities in the Netherlands  that help us to automatically classify and tag documents or to detect relationships inside documents.
RVB: Wow, that sounds really great.
TZ: That's the main project we are working on now, yes.
RVB: Wow. As I understand there's also a big visualization component to that project, right. There's a lot of stuff that you're doing on how to bring that information visually to those researchers?
TZ: Yes, and indeed that's in terms of what we develop in terms of software is in fact, you can consider it an enhanced browser for the Neo4j database because once we were starting this project, we were running into-- well, we wanted to add more than the standard Neo4j browser, and that is why we now have a browser environment with multiple panels and panels that you can link to each other and in one panel you can display the data as a network, in other panels you can display data as a table and you can link them to each other, and that's what we call-- this product is called, “Prologram," for now, and that is what a number of developers are working on actually, yes.
RVB: That's very cool.  I've seen it live when you presented it at the meetup and everything, but I've also seen some of the YouTube videos and I'll post those with the podcast, as well.
TZ: Okay, great.
RVB: Maybe, just looking at it in a little bit more detail, what do you think is the most powerful aspect of this?  In other words, why did you end up choosing a graph database for doing this type of a project?  Any comments on that?
TZ: Yes. Well I come from … my background; I once had an IT company myself and that was typically relational databases, and finally we ended up building a metadata layer to mimic graphs on top of it.  In fact, that says it all, because the real world is far more complex than you can model, well in tables. Specifically the domains that I've worked in, be it agricultural development or now investigative journalism.
RVB: Yes.
TZ: If you have a very generic and basic structure like you have in Neo4j where also not just the notes but also the relationships are really things in itself, you call them first class citizens and are very descriptive. It allows you - even when your data model is changing or expanding and that is happens very frequently - You don't have to do a complete overhaul of what you already have to have and still have an optimize structure. So, you can keep on building and adding stuff and that's where for us one of the main advantages of Neo4j and that is on top of, of course the way that you can and really do optimized and very localized searches in your graph database, and I have the experience with building meta-structures on top of relational database then the number of joins is incredible and finally it makes it workable.
RVB: Yes. I don't know if you've listened to any of the other podcast episodes but some of the Neo4j founders have been on there as well and that's how they started Neo4j. They started developing a meta-layer or graph layer on top of-- it was Postgress at the time I believe. I think you're coming to do right conclusion there [chuckles].
TZ: When the...
RVB: Go for it. You wanted to add something?
TZ: Well, for us it was quite easy to pick the concepts, to understand the concepts and that's also I think we now are making nice progress with what we make as a generic browser on top of Neo4j is that we come already,  we came already from a graph, a mindset that knew the advantages of a graph database.
RVB: So what is the future of all this? Tom, where do you think this industry is going, where should Neo4j go? Where is the Prologram going?
TZ: Well, that's the-- You said it's ten minutes, this podcast. [laughter] [crosstalk] RVB: Well, let's limit-- Okay, well, I think graph database are there to stay, it's not the hype. Especially when relations between contents become more and more important than perhaps the properties of content… For instance, we are now working on recommendation engines and while, in the the beginning, people got recommendations on the basis of properties or links inside the content itself, so very explicitly - now  we are already doing test with integrating into recommendation, the social aspects. Then you finally end up concluding that the suggestions that you can make on the basis of how people use the contents and that is typically something that you can easily store in the graph. They are better than the suggestions that you can make on the basis of the explicit tagging of a content.
TZ: As the world gets more and more connected, whether it's Internet of Things or documents that are shared. Well, it's the graph model is a very nice way to describe - you get more exact models than a relational database. I think the position of graph databases in the world is an established one. What we are now doing with the Prologram platform, we have been building it with let's say, about three to four persons of the last 14 to 15 months. We now have a version that is -- on one end it's good enough, but we are; say in the next two to three months we will probably start sharing it with the world because we want to know how people interact with it, and also I'm sure you cannot keep on developing without user feedback. We have already quite some users and in terms of functionality there will be additions like well integration with the elastic search, a complete function and trigger system that allows you to change theories, virtualization of notes that allows you to make aggregations - to visualize aggregation of notes and relationships. So, that's where we are more or less going for the next quarter. That's more or less the road map that we have.
RVB: You discover it as you go. Right?
TZ: Yes.
RVB: It sounds really exciting. We'll wrap it up at that. Tom, it was really great talking to you. Thank you so much for coming online and apologies for the technical hiccups that was entirely my fault. But, thank you for coming online. I'm sure will see each other again at one of the next meet-ups.
TZ: Okay. Thanks for the opportunity and keep up the good work.
RVB: Thank you. Cheers, bye.
TZ: Okay. Bye.
Subscribing to the podcast is easy: just add the rss feed or add us in iTunes! Hope you'll enjoy it!

All the best

Rik