 OK. Good afternoon everybody. Thank you for coming. This is my first time ever giving a talk in English in North America. So keep that in mind as we go further. And please be kind with my English and working on it in half. So if you don't understand something, just raise your hand. Excuse me, but your English is not so good. So I would like to share with you a love story. Yes, it's not a movie, but it's a love story. No, that's with my family, of course. That's my wife and my two kids. They are in Bolivia right now. But a love story between me and the Drupal community. Since 2009, I began to work with Drupal. And you know at the beginning it's not always easy to work with Drupal because we don't have so much documentation at this time. But when I met the community, this has changed my life. If I am who I am today, it's thanks to the community. If I have a decent job and a decent life, it's thanks to the community. If I can travel all around the world, it's thanks to the community. So really the community changed my life. And during the last 10 years, I co-organized a lot of Drupal events all around South America and Belgium because I come from Belgium. So after 10 years, I said I would like to do something more than just Drupal event, just camps, just summits or meetups. So I decided to do something different. And that's why I did videodrupal.org. So why? Because I see a lot of people looking for Drupal resources and it's always hard to find that. They go to YouTube and so on. And it's very difficult to find a good video. So I said how is that possible if we have so many good Drupal videos? How can we make them more accessible? So what I decided is to retrieve all those videos from YouTube and to place it on just one website. To make them more accessible, to categorize them and so on. So we can work on those videos and perhaps categorize them for learning, for professional purposes and so on. But I had a problem. I had a problem with YouTube and Google. Why? Because people use those tools everyday. So when they are going to another website, they said I want the same as I can find in Google or YouTube. So what kind of feature do you think the people are looking for when they are going to a new website? What kind of feature from Google or YouTube do you think they are going to look for? Search. Search? Okay. What else? But what kind of search? Because we can make a search. What kind of search are they looking for? Because I can just search for something and have a list. Is that enough? Perhaps not complete, yes? Filter. Filter, very good. What else? Sorting. Sorting? Faces? No? So when you make a website, have that in mind because the people are like that. No, they used to have a website like Google or YouTube. What other features are they waiting for? Like YouTube and Google. Recommendation. Recommendation, yes? Something more? What is recommendation? It's kind of similar. Like people... What did you say? Related content. But really related. Not just a little bit. Normally we do related content by tags or something like that. It's not enough. So Google and YouTube can relate content in another way. In fact, they use information in physical systems. So when people is going to your website and want to read other articles or so on, they are waiting for really related content. Not something similar, but we don't know how. And what's the third one they are looking for? Or they are expecting perhaps? Related. Yes, something related with that. How is Google, when you search for something? Customization. Yes, but something fast. Yes, fast speed. They are waiting for that. It has to be fast. So when you propose a website that is not fast, it hasn't an advanced search or a good related content. People say, wow, what is that? Because they use all the kind of websites like Google and YouTube. I said, okay, I'm going to make video Drupal, but people are expecting something like YouTube and Google. Okay, it's for the community. Yes, but if someone new wants to know Drupal and he goes to the community website, he's going to say, if it's low, yes, it's Drupal. Or if he can search very well, he said, okay, that's Drupal. No, I think that when we do something for the community, we should do it the same way as we are going to do for our clients and give the best of the market. So we need to have a fast website. We need to have an advanced search tool, and we need precise related content. So how can we do that with Drupal 8? The best fit is Apache Solar. That's the best one. So today, what are we going to see? We are going to see how we can use Apache Solar as a fuel backing for performance for having a fast website. And we are also going to see how can we use Apache Solar to get some related content. So when we have performance, when we have advanced search and related content, I think we can have happy clients. So Solar is one of the best fit. I'm going to speak a little bit about that. Okay, so who I am? My name is Karim Bujema. I come from Belgium, but I live in Bolivia. And I am a Drupal developer since 10 years now. I'm working mainly for the media industry as a Drupal freelancer. And you know, the media industry is everything fast, fast right now. Not in five minutes, right now. So you have a lot of journalists working on content, making content all the time. And you have also a lot of readers. I say a lot of, not just hundreds or thousands. We have 2,000 readers per second. So when we make a solution in the media industry, this solution has to be fast, but for a lot of people. So it's a very demanding industry. And I'm also a Drupal community ambassador in South America, in Belgium. I'm also here in Montreal. And my academic background is a little bit strange because I'm coming from the business administration first in the Catholic University of Ruvana in Belgium. And then I made my master in information management. A big thank you to my three mentors because we say that at the end of the session. But I prefer to say that at the beginning of my three mentors, Jeff Gehrling. If you want to know something about Solar, he's the guy. He has a lot of very good videos on this blog, really. So check that. A big thank you to Joaquin Bravo. He's one of the best Drupal developers in South America. He's always helping me. And also to Carla Brizno, he's the vice president of Drupal Agency in Washington. And she's always helping me when I have some trouble with English and so on. I say, could you check that a little bit? Yes, of course. Another big thank you to Platform Message because that company is posting video Drupal for free. So interesting. And another big thank you to Evolving Web for having me during the month of June in their office because I travel a lot. So I'm the month of June in their office. And if you are looking for a work, a Drupal position in Montreal, I really recommend this campaign because food is great. You can play. You have nice colleagues, have fun and so on. So I know that they are hiring Drupal developers. So have a look. So a quick survey. Who is using Search API? Okay. Yeah, okay. And who is using Apache Solar with Search API? Okay. And who is using Apache Solar as a view back in without Search? Okay, I'm going to learn a lot of things today. Okay. So let's make a brief tour of video Drupal of this website. So, okay, one of the main features is searching, of course, and we said, let's say I'm going to search for Gatsby. Who said autocomplete? No, autocomplete, yeah, because it's like that. We need it. So, okay, oh, fast. Yes, fast. I'm not going to wait that the data base and so on but I'm going to see how it's so fast. And then you spoke about sorting, isn't it? And we can sort by most watched or by most liked, for example. So, and we can also filter by year but I can also filter by tags. So let's see, for example, Gatsby. And I can also filter by channel. So, for example, the channel of evolving web. And I can also filter by some plates, for example, from the bad camp. So, that's what the user are expecting. It has worked like that, fast with fast things with an advanced search tool. But when we go to video, of course, we can see the video. We can see the channel of this video. I can see the playlist if this video is from a playlist but what we said, we have related content. So, this video is about recoupling Drupal with Gatsby. So, I'm waiting more video about Gatsby and that's what we have. Gatsby and React, Gatsby and Drupal, Gatsby and so on and so on and so on. So, it not depends on the tags of the video. It depends on the description and on the title of the video. So, the people or the editor is going to upload the video, just make the right title and the description and you can forget about tags. If they want to add tags, no problem. But the system is not only based on tags. The system is based on title, description and tags and try to find the nodes that are more similar. That's what we are going to see today. On the other hand, in the home page, we can have the latest Drupal video of course and the most watched Drupal video since three months, six months this year and so on and so on. And we can see what are the best Drupal channels by likes, by subscribers, by views. And I think one of the most interesting things for you is that we can have access to the playlist and for example, I can have access to all the Drupal Count playlists and to see all the latest Drupal Count like Twin City, Flyover, Kiev and so on and so on. So there you can find all the videos from all the Drupal Counts in the last three years. The last thing is that I create a learning section and this section is divided in two. The first section is about the Drupal Core videos like site building, teaming and module development. So if we go to the site building part, there you can find the best playlist just to learn site building. And you are going to see that we have so many good resources for beginners just that if we go there for in this playlist they have I think 62 videos just for beginners. But you can also find some other topics more precise like Gatsby for example. Then you can find a lot of videos about Gatsby but also about PSB Storm and so on. And so every two weeks I'm going to add a new learning topic because this site was launched a month ago. So it's very new so it's a beta one. And I'm waiting for a beta two or three or four I don't know. So okay so that's the site. And now who is behind this site? We are only two. So we have Santiago Rico. It's a graphic designer and a Drupal teamer, a very young guy but so good. Very, very, very good. And the other guy you know who is it? And we do that at night and on weekends and so on. So yes you don't have to have a huge Drupal team to make a website. So a developer and a teamer and let's go. Let's do it. So how did I do that? I'm not going to introduce each video. Now it's too time consuming. So what I'm doing, I'm connecting the Drupal website directly to the YouTube API because YouTube has an API. So I can ask for videos, I can ask for playlists, I can ask for channels and so on. So I am asking those videos and I'm getting those videos back and I put that in my Drupal website. So very easy because all the videos are on YouTube. But what did we say at the beginning? What did we say? We said that it has to be fast. We need an advanced search tool and we need a precise related content. So is that here in this solution? No, I need to add Apache Solar. And I need to add Apache Solar so I can retrieve some information from the PHP stack directly from Solar. And that's very important to have a fast website. Why? Why is that so important? I'm going to give you a T-shirt. Why is it so important? Why is it so important not to have this Apache Solar instance and to go directly to Apache Solar? What do you mean by that? I understand the question. Why is it so important to have an instance of Apache Solar and not going here, for example? Why? Because they have index. They have a Lucene index, but I'm going to give you an N or L. L? That's for you. So what is important? All the speeches. Let's have another one ask me. Responding. So he said yes, we have the Lucene library behind Solar. But what's the benefit? What would be the benefit to have performance? Performance, yes. L? Perhaps it's like me. L for you. It's fast. It's fast. So there is another reason. What's the main problem we have with performance in Drupal? What's the main problem? Oh, God! The cache and what's behind the cache? Why do we need cache? For the query speed. Yes, the query speed to the database. So L or M? L. Yes, the database is the main problem in Drupal. That's the main problem. So the main problem is the database. That's a problem. So everything we can do without touching the database is a performance winning. So that's why. Yes, Lucene is very fast. But the main reason is not touching the database. You speak about cache? You speak about you. So when cache is that in fact, it's trying to not go to the database and to go to another layer just before the database. So when we use Solar, we have another vacuum. Because we are going to index all, not all, but part of the data from the database to the Solar instance. And we can access directly those data. And like you say, we can use main cache. So in that case, if I have a warm cache, what is a warm cache? Put you up to date? Yes, a warm cache is a cache that is updated. But what's the main problem with cache? Yes, what's the name of that? If it's not warm, it's cold? Yes, ML? Honeycomb. So the main problem with cache is that when my cache is cold, could you imagine a TV website with 200,000 news and I had to make a cold cache from that? It's quite impossible. It's very complicated to do that. Because I had a go down in my performance and I had at the same time 2,000 users trying to access that. So cache is a very good solution. That's how do I make this cache warm? That's very complicated. That's very complicated. So there you need a solution to avoid to go to the database for warming the cache. And that's where solar comes. I can warm my cache from solar, not only from the database. And that's a huge increase for my performance. That's the first thing I would like to share with you, that we can use solar as a view like it and to get our view directly from solar and not from the database. I'm going to go a little further. I have just a question. What's the platform as a... The platform is a path like Pantheon, like Aquia. The path from Europe is very good. It's a git-based path. So it's not like this. You have to go and click there and click there and click there. Just git push and it's on the path. Who is using Pantheon? Do you know how is it? No, it's not so... And Aquia? Yeah, okay. So they are a very good solution. I'm going to look at the platform as it is. So, where do we use solar? In our website, we saw the result page and the search page. No problem. So we have the faces and we have the results. We also use it in the node page. Remember, we have a related content, so we use that. We make it with solar. And also, we have those two blocks. The first one is the most watched videos and the other one is the latest. We use also solar. How can we do that? So, you can see that we are not going to use solar just search. We are going to use solar for making views. Like those ones. But also to make related content. So, why search is so important today? I think that you know that most of the users go straight to the search bar. I know that we can have a nice navigation menu and so on, but the search is very, very important today. So, what are the current solutions for search in Drupal? We have the core Drupal search. It's a nice solution. It's a nice solution, but if we have a bigger website, it's going to be slow. So, we need to find another kind of solution. I know that the Google search integration was working well. So, they are changing their business model. I think now we have to pay for that. But we always need to wait that the data are indexed on the Google source and sometimes it's a little bit tricky. And the most used solution now in the Drupal industry is the search API and the search back. So, search API is just an interface to use with a search backend. What kind of search backend? We can have a database backend, the same database of Drupal. So, Drupal.org, if you search for something, it's based on the database backend in search API. So, sometimes it's a little bit slow, but it's a huge amount of data. So, it works pretty well. The other kind of search backend is solar, of course. And the last one is elastic search. It's a new one, so we have to keep an eye on it because I think that they are going to give us some very good solution in the near future. So, where is the patch of solar? Okay, so we can go there. It's a full text search server based on Lucille, the library. It's a Java library and solar. It's also a Java web application. So, and how do we access to solar? It's very nice because we can access through HTTP. We can make requests with JSON or directly to solar and we can have back our results. It was created by Yonik Sili of CNET in 2005 and made it open source in 2006. This guy, it's fantastic. Really, he made it. And now we can use it for free. That's open source. And who is using solar? The big guys. Like Netflix. If you search for something in Netflix or related movie to the movie you're watching, it's Apache Solar. It also sees Besme. You have some big player lights up. They are using Apache Solar. Solar is not this solution for open source website. No, no, no. It's a professional solution. It's a professional solution. Don't be afraid about that. So, why solar? And we said because it's very fast but we said also another reason. Now you know that. Why can we use solar? Ok, 35 for search and while else. What did we say at the beginning? Why can we use solar? Yes, very good. L and M. But in any other reason. It's not there. That's a problem. That's why I'm asking. Yes, speed. Could you be more precise? What about speed? What's the benefit of using solar for speed? Yes, the query are fast. So I can decouple my back end. I can have another back end and go to this back end instead of going to the back end. What's NL? Yep, ok. Or we have the last one. It's an L. I'm sorry for the last winner. Thank you. So we can use solar of course because it's very fast but also because we have faces. Search API in fact is going to give us the faces. So it's not solar related. Search. Highlighting. Sorting and boosting. I can boost some search results if I need it in solar. The more like this is the related content. And also I can search in binary files. I can search inside PDF, Word, Excel and so on. And of course I can do also some special search. So from a location for example. Ok. Why is it fast? And I think I listened the inverted index when you were speaking. Why solar is fast? It's fast because it's using the inverted index. It's a pattern in that way at the time. So when solar index document is not going to index each document in a recall. What it's going to do is to index each word of the document. So in this case you can see that the second word blue is in fact in the document 1 and 3. So here for example the word blue is in the document 1 and in the document 3. Here and here. So if I am looking for blue I don't have to go in each document. You remember how we did it in SQL? Like blue and we are going to read every document to see if blue is in that document. With an inverted index no. We just say I want the blue word and directly I can see in which document it's appearing. That's how it's so fast. Does that mean that there is a rule for every single word? Exactly. So you have to have like we said a corpus of words. So every word that we are using in perhaps in only one document. You are going to have a record for that. So you are just looking for words. I am looking for blue. Okay blue. I am looking for like in this example blue and sky. So you are just looking for two words. Nothing more. And if you have 200,000 documents like we have normally in the news or in the library and so on. So you just have to look into the words. You don't have to look into the 200,000 documents. So it's very fast. That's the inverted index. And that's how this thing is working. Any questions? Any questions of thought? Yes. Are there the index data? Do you see it from the children? It's a new multiple. It's a new. So I'm making first, I'm making a note. There. Because all that data goes to the database. But before going to the database, I'm making a Drupal note. So it's a normal Drupal note. Nothing more. And then after creating a note, I am indexing that to Apache's order. And that's why we're going to see that. That's why search API is useful. That's why we need search API in fact. OK? Well, so if we speak a little bit about the performance stack, we can see that we have the lower level of performance stack. It's a query cache. I think that someone mentioned that. After that, I have the cache engine. That's there. We have main cache and so on. I have a cache layer on PHP. Now in PHP 7, it's directly available. I can have a reverse proxy directly with Nginx. But I can also have a varnished proxy. And I can also have CDN and cache browser. So where do solar fit in that performance stack? I prefer to say that solar is just between the query cache and the cache engine. Because for me in the cache engine layer, it's where main cache is. So solar is not there. But it's not also in the query cache. So it's between those. I know it's something sometimes complicated. But it's like we are between a cache for queries and a memory cache. So it's very important because I can now understand that I can make my views directly to Apache Solar. I can have my related content. And I can have my search directly to solar. So how does search API work? Yes, that's nice. Okay, so when we use search API, we are going first to create a view. Who is using views? Yes, everybody! So you can use search API. Don't worry. So when I use search API first, I'm going to use a view. I'm going to build my views like every other views. It's a view. It's not something different. So I'm going to make my views like always. I'm going to use fields. And I'm going to filter. And normally if I am making a search, I'm going to expose my filter. And you can do that. You expose your filter with views. So you do the same with search API. You just expose your filter. Then you are going to pass through search API. And what is in fact views? What's the first result when I'm building a view? Yes! We have one. So we have one teacher left. So a view is only building a query. That's the main reason. So with views, what we are going to do is to send a query to search API. Search API is going to pre-process that. I'm not going to enter into it because sometimes it's a little bit complicated. But let's say that search API makes this query much faster. It takes some stop words off. Sometimes it sends that to the root of the word. Let's say that search API just takes my query and sends this query to a search backend. In our case, the search backend is solar. But it can be an other way. It can be a lax search. So search API, just think about it's a black box. My query is going from views to solar. In between, I have an interface and it's search API. If you can understand that, you are going to understand how you can use solar as a view backend. Because I am making a view. Is that correct? Is that a view? Yes, I'm making a view, a normal view. I'm not making something strange. I'm just going to build a view. But I'm going to make a query, like you said, that this query I'm going to send is where? Where I'm going to send my query? To solar. To solar, not to the database. Because normally if I'm making a view, I'm going to send the query to the database. But in this case, I'm going to send the query to solar. And that is very useful. Why? Why is it so useful? My database too. It has all the lab. So why is it so important to go to solar instead of my database? Of course for the search. Is there any other reason? It's already inverted and next. What did you say? It's already inverted and next. It can be fast. But there is another main reason. Yeah, solar is fast. We know that. But sometimes it can be another instance, another server, so we have some latency. So what's the main point here? Why do we want to use solar as a backend for our views? For? Well, which one? For? It's not the fast aspect. That's for search. But there is another reason that's more important than that. Because we don't want to hit the database? Yes. We don't want to hit the database. And that's a huge performance improvement. If I don't touch the database, my site is going to be fast. That's the main reason. That's why we can use solar. Of course, you're absolutely right. We can use solar for search and so on. But in this case, what I wanted is to have a fast website. So I can use solar and search API to build a simple view without search filter. Yes? In this example, this blog, it's in the homepage, do I have some search form or something like that? No, it's a simple blog. But this blog is made by search API and solar. And the advantage is that I'm not touching the database. Would you recommend using solar for every kind of feed? No. Because it's time consuming to make this. But if you're not using this blog a lot of times, and if this blog is not changing during the day, I'm not so sure. But if like in the news website, let's say latest news, it's changing all day long. Or most comment news or something like that. Or your homepage. Yes, that's, you're going to have a huge advantage. So normally I try to make a simple estimation of requests. And I try that 70% of my requests go to another place that the database. And go to the main cache. You can go to storage. So you can go to solar. Okay? It's okay? Question. Okay, yes? Here what we see is no rendering or... Without rendering. I'm going to let that in the PDF for the session. Okay? Because he's right. What is the answer of solar? What if I'm asking for those nodes? I'm saying I would like to have the most watched nodes. What's the view for that? The view is very simple. Can you see the view? The only thing I have is some fields. Some filters. Some content time. That the video has to be published in more than a month. And a short criteria. No? And we saw by view count. So it's a simple view. Isn't it? So what is going to answer me solar? What is... It's just going to answer the BIDs of those nodes. So if I wanted to have the data of solar, I have to ask it very well. And I have to configure it back. It's not my default. So in the PDF, you are going to see five steps. Because I'm not a receipt guy. I think that receipt, you can find that everywhere. So in the PDF, you are going to have five steps. And you have to do to be sure to have only the data from solar. And when we render it, we are going to render only the data from solar. Because normally, you write, views is going to render the nodes doing a node load. Need the render. So solar has a view backend. We are going to use that just to avoid to hit the database. So we are going to stay here, over there. And over there, we are going to have all the reading operation. Of course, the create, update and deleting operation is going to the database. I can do nothing about that in solar. But the reading operation, we are going to do that for solar. In all cases, no. Only for blogs, pages, that I know that are very query consuming. And there are a lot of requests on this. Doesn't mean that on the view, the way you display it can be on the fields. And you cannot actually have the view mode. No, no, no. You cannot have the view mode. Normally, it's the best way to work. Just to attach a view node to your view. That's what I recommend. Of course. But if you have several blogs, you have to create several view modes and so on and so on and so on. But you can use the view mode for the search riddle. You are absolutely right. And you win the last t-shirt for today. Sorry guys. He's going to be back. Okay. If you talk about the nice point, I would like to show you that someday. But when you render, when you're making a view, you can use view modes. And of course, you can use that directly. So I recommend to use this label for search. But when you need facets and so on, you're going to index all the fields because you need it for facets, you need for to complete and so on. Okay. Any question? It was a tough part. Really, a lot of people said why? I need to use solar as a back and how and so on. So any question about that? Okay. If you don't ask questions, I'm going to ask them. So why? Do you have a question? Yes, but I don't put a word in English. You speak French. Yes. I can't translate what. How do you manage limitization? What? Limitization. Is there anybody know what is timing about? No? For example, if I have playing. It's a word. I can reduce that to the word playing. So if I speak about players, playing and so on, we're going to have only one word referring to all these other words. That's the standing part. So that the port of standing we use in solar. And you don't have to configure it. You just say full text and it's done. And it works in different language. Oh, you want to enforce it? Yes, it works with different languages. You have to use the right standard for each language. So you have to configure your schema. Excellent. It's a little bit more advanced. Sorry. But you configure your schema on the solar. No, not in the group or something. Okay. What time is it? 3.40. 4.40? The next one is at 3.40. Yes. I'm going to go... That's what you were asking. Okay, the receipt to index the field. Okay. Let's speak quickly about... Because you don't have any questions. Is it typical? No. We can speak about the more like this. So you saw that we have a related content block. How we can do that with solar? In fact, and you're going to understand me because you come from the air, so from the information retrieval, so you're going to understand me. So what is similarity for a battery solar and for the scene? Similarity is based on the term frequency and inverted document frequency in a space model. I'm going to try to explain that to you so you can go out from here to say, oh, I know what is the vector space model. I know how we can relate the content in a space term model. So let's say that we have only two words in our notes. So we have an hundred notes, but in each note we have only two kind of words. We have Belgium and we have Canada. So it's Canada, Canada, Belgium, Canada, Belgium, that's the most. Okay. You're going to understand me later why I'm just working with two words. So how can I represent a note in a two-term space? How can I represent that? I'm going to represent that based on the frequency of those words in my notes. Let's say the note one, the note one has just two times Belgium and four times Canada. So I can make a vector of that. If I have another note, the note two, this note has four times Belgium and only one time Canada. So if I place there my current note and let's say that my current note has two times Belgium and three times Canada. What's the note that is similar to my current note? My current note on this slide. Do you want? Why? Because it's closer? Yes, it's closer. That's why we use a vector space model to see how closer the document are. So how can we see if something is closer in the vector space model? What are we going to use? Can you measure? No? What are they making together? An angle. So I'm going to calculate the cosine of the angle and if this cosine is larger because it's the inverse, they are no closer. Wow, that's fantastic. So that way I can see how similar our document but not only for two words. I can have n terms. So let's say a thousand axes. You could imagine hundreds of axes in the space that's only words and there I'm going to have a vector. So I can analyze all those documents in a vector space. That's how solar is working. I'm going to stop there. Just one small thing. That's how we cluster content because if in this space I find a lot of content I can say all this content is about Canada so I can cluster that. Okay, I have this kind of content. That's content discovery. We can do that with the same technique. So solar is using a very advanced technique to find similar content. Okay, thank you very much. I'm sorry.