<?xml version="1.0" encoding="utf-8"?>
<!-- generator="Kirby" -->
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">

  <channel>
    <title>Tag: neo4j &#183; Blog &#183; Liip</title>
    <link>https://www.liip.ch/de/blog/tags/neo4j</link>
    <generator>Kirby</generator>
    <lastBuildDate>Tue, 24 Apr 2018 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.liip.ch" rel="self" type="application/rss+xml" />

        <description>Liip Blog Artikel mit dem Tag &#8220;neo4j&#8221;</description>
    
        <language>de</language>
    
        <item>
      <title>Neo4j graph database and GraphQL: A perfect match</title>
      <link>https://www.liip.ch/de/blog/neo4j-and-graphql-a-perfect-match</link>
      <guid>https://www.liip.ch/de/blog/neo4j-and-graphql-a-perfect-match</guid>
      <pubDate>Tue, 24 Apr 2018 00:00:00 +0200</pubDate>
      <description><![CDATA[<p>As a graph database enthusiast I often got asked the question “So, as one of our graph expert, can you answer this GraphQL question?”. </p>
<p>Every time I have said that a graph database is not the same as GraphQL, and that I was unable to answer the question. </p>
<p>Another colleague of mine, Xavier, had the same experience. So we decided to learn about GraphQL so that we could answer the questions, and because it seemed like a really cool way to write API’s. </p>
<p>So before we dig into this any further, a quick overview of what a graph database is and what GraphQL is: </p>
<ul>
<li>A graph database is a database storing data in a graph, which is super performant when it comes to data which has relations to other data, which is a lot of our modern complex data sets.</li>
<li>GraphQL is a way to query data. A flexible API protocol that lets you query just the data that you need and get that in return. Any storage can be behind this data, GraphQL is <em>not</em> responsible for storage. </li>
</ul>
<p>It was me and Emanuele on the innoday, where we decided to try out Neo4j with the GraphQL extension. </p>
<p>Emanuele had never tried Neo4j before, and was amazed at how easy it is to get going. GraphQL was also super easy to install. Basically what you do is: </p>
<ol>
<li>Download Neo4j desktop</li>
<li>Go trough the very obvious setup</li>
<li>Click “install” on the plugin GraphQL which is already listed</li>
<li>Use “browser” to populate data</li>
<li>Query the data with GraphQL that automatically, thanks to the plugin, has a schema for you</li>
</ol>
<p>With this technology we aim to solve a problem that we currently have. The problem is one of our REST API’s which has a LOT of data. When a consumer queries for something that they need, they will get a lot of things that they don’t need, that another consumer may need. We end up wasting bandwidth.</p>
<p>How does GraphQL solve this? And where does Neo4j come in?<br />
In GraphQL we query only for the data that we need, making a POST request. A request may look like: </p>
<pre><code>{
  Product {
    title
    product_id
  }
}</code></pre>
<p>If we have a graph database with a single node with the label “Product” and the properties “title” and “product_id” we would get this behaviour out of the box with the GraphQL plugin. Tada! A simple API is created, all you had to do was add the data! DONE. </p>
<p>This makes it very easy for the consumer to query JUST for the data that they need. They can also see the entire schema where we can write descriptions in the form of comments, so that the consumer knows what to do with it.</p>
<p>How does Neo4j work, and how do you add data? It is super simple! With Neo4j desktop, you click “manage” on your database and then “Open Browser”, in browser you can browse your data and execute queries in a graphical way.</p>
<figure><img src="https://liip.rokka.io/www_inarticle/69fb93/desktop.png" alt=""></figure>
<figure><img src="https://liip.rokka.io/www_inarticle/bd619a/browser.png" alt=""></figure>
<p>You can use browser to click trough and start learning, it is also a great tool for learning and experimenting, so as for learning Neo4j I leave you with browser to try your own hands on experience. Have fun playing with it! They explain it really well.</p>
<figure><img src="https://liip.rokka.io/www_inarticle/ea5f3c/browser-learning.png" alt=""></figure>
<p>Ok, so simple graphs are very easy to query for, but how do we query for relationships with GraphQL and Neo4j? Let’s say we have a node called “Product” again, the node does not have the “title” directly on the product, but in a node labeled “TranslatedProductProperties”. This node will have all the translated properties that the product may need. Such as the title. The relation is called “in_language”. The relation itself has a property called “language”.  This is how the actual graph looks like in browser:</p>
<figure><img src="https://liip.rokka.io/www_inarticle/29d08c/graph.png" alt=""></figure>
<p>In GraphQL we would need a custom IDL (schema) for that to be queried nicely. Our goal would be to query it the following way, we simply give it the title and the language, and we as GraphQL don’t need to know about the actual relations: </p>
<pre><code>{
  Product {
    product_id
    title(language: "de")
  }
}</code></pre>
<p>A simple IDL for that could look like: </p>
<pre><code>type Product {
  product_id: String
    # The title in your provided language =D
  title(language: String = "de"): String @cypher(statement: "MATCH(this)-[:in_language {language:$language}]-(pp:ProductProperties) return pp.title")
}</code></pre>
<p>So here you can see that with the help of the GraphQL plugin we could make a cypher query to get whatever data we want for that field. Cypher is the query language for Neo4j.</p>
<p>These things together being able to get any nodes and relationships, which are already decoupled unless you choose to couple them, and the querying flexibility makes Neo4j + GraphQL an API as flexible as... Rubber? An awesome match!</p>]]></description>
                  <enclosure url="http://liip.rokka.io/www_card_2/9722bd/featured.jpg" length="126438" type="image/png" />
          </item>
        <item>
      <title>LaraconEU 2014 &#8211; Empowering the PHP people</title>
      <link>https://www.liip.ch/de/blog/laraconeu-2014-empowering-the-php-people</link>
      <guid>https://www.liip.ch/de/blog/laraconeu-2014-empowering-the-php-people</guid>
      <pubDate>Fri, 05 Sep 2014 00:00:00 +0200</pubDate>
      <description><![CDATA[<p>I went to LaraconEU last year and honestly I felt uncomfortable being the only woman in a conference of about 200 people, I noticed that I was a woman in that crowd, and it felt like everyone else did too. This year however, it was very different, let me first talk a bit about the conference from a technical perspective, then come back to how LaraconEU made a big step towards empowering me and the community as a whole. </p>
<p>I gave one of the first talks on the 28th of August about Neo4j, if you haven't heard about it yet it is a graph database that helps you handle highly connected data. </p>
<p>My presentation was about a pet project of mine, <a href="https://github.com/Omnomhub/omnomhub">omnomhub</a>and how we use and plan to use Neo4j for our data. Overall I had great feedback, inspired people and talked about neo4j all over the event, even though my live demo failed!</p>
<p>That day another talk that stood out was by Adam Wathan about TDD: The good parts, basically teaching us that it's ok to sometimes not abstract til you drop, thanks for that note!</p>
<p>I was pleasantly suprised when I saw that Gabriela D'Ávila was talking about “coding like a girl” and how we as an industry benefit from a diverse team. It was her first time giving a talk in English, with a really difficult topic on top of that – Kudos to her.</p>
<p>The community day ended with drinks and fire, all in all an awesome day where I met amazing people and new friends that inspired me to be a better developer. I'm also happy that I got to give a talk to inspire other people. </p>
<p>The idea of the community day was actually brilliant, it is a day before the conference where more people are able to come and afford to attend, it is the first time I saw this at a conference, and I'd definitely like to see more of it. </p>
<p>The second day the main event started out with Matt Stauffer who talked about “Sharing Laravel”, it was about a lot of great tooling and technology that a lot of people should know, with some humour involved aswell, just a great talk to start of the conference. After Matt Erika gave her talk about “portable environments with vagrant”, it was absolutely amazing she rocked the scene and inspired a lot of people to try it out – It looks way less difficult when she does it, and ansible is awesome, what I took away from her talk: If you haven't yet checked out ansible do so.</p>
<p>There were some other <em>great</em> talks this day to finish of with Taylor Otwell – The Laravel GOD – talking about Laravel and new things coming. I read a blogpost by Ross Tuck that sums up the technical content and new things we found out about laravel quite well so I won't do that myself: </p>
<p><a href="http://rosstuck.com/notes-from-laraconeu/">rosstuck.com/notes-from-laraconeu</a></p>
<p>The second day of the main event, or the third day of the conference, the talk that stood out for me the most was by Kayla Daniels “The Code Manifesto: Empowering our Community”, it made me and others think quite a lot, and she managed to actually silence the twitter stream! </p>
<p>Some things that I thought about after seeing her talk is that… To empower the minority we simply have to empower everyone, then the minority is also included, which is exactly what LaraconEU did this year and what we do with PHPWomen. </p>
<p>This year I didn't feel like a woman, I felt like a developer. How come? I was not the only woman in the room, and I know that LaraconEU worked very hard to make this happen, so thank you LaraconEU organisers for empowering me, working with PHPWomen and for empowering the PHP community, not only with technical content but also with everything around it.</p>
<p>If you want to see the talks of the conference the two main days were recorded, all the talks were of great quality so I highly recommend seeing them:</p>
<p><a href="https://www.youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A">youtube.com/channel/UCb9XEo_1SDNR8Ucpbktrg5A</a></p>]]></description>
          </item>
    
  </channel>
</rss>
