×
Eventil - Find Tech Events
Official mobile app
FREE - In Google Play
View
×
Eventil
Official mobile app
FREE - In App Store
View

Elixir & Phoenix – fast, concurrent and explicit

0 0

for the show yes so today we're going to talk about elixir and Phoenix as was mentioned and it seems very much especially this year that Alex even Phoenix had sort of a meteoric rise to popularity and fame was partly due to the great program in Phoenix burke and alex is 10 Phoenix is 1112 something like that and always talking about it but I feel most of the time people are talking about performance scalability so whatsapp is not using Alex here but they're running on line which is the basis for Alex here and there's just very very popular blog posts of them where they go like oh 1 million connections are so 2011 it's a book or some 2012 or they say that like one single machine for them and it's 2 million or over 2 million TCP connections at the same time and that it's just the amazing scalability that you get through platform and that is what most of the people are excited about when we talk about Alex here in Phoenix and then of course the Phoenix folks weren't like one of the prime features as web sockets and they made it a test run and they said like how many concurrent back circuit connections can we handle on just one server and you can see it capped out at two million connections and that was not because the server couldn't handle it anymore but the client didn't have enough sockets to connect to all of it and you can see the server is still bored so there's still room up in the air to improve upon that and even with all those clients connecting to one chat room when you would post a message it would arrive at all clients within a second and horrible him actually troll a bit and hosted a whole we could be your ticket into it and it still arrived in a couple of seconds so that was amazing and also if we look at HTTP traffic if you look at a request per second for very simple applications you know it gets a request and then rent us a view of a couple of partials and stuff you can also see Phoenix up ahead there and it's mostly compared to so Jin is more of a Sinatra like framework for go and that's sort of the competition that Phoenix's end but figs is a full-blown MVC MVC framework and the creator of the language of course just volume or tweeted reminded his 2016 almost everything you do must be using all CPUs compiling code booting running tests easy map on the winds here he created Alex e because he went out on the search like he is a ruby programming is an ex rel scored him about still a red cotton we bought great books like crafting world applications and he went in search for a platform where you know parallelism could be done well and he fell in love of the Earl nvm and he created Alex you mostly as sort of a nice interface to the Earl nvm which is sort of how we set out so in this talk I will I say Alex in Phoenix fast cocoon and explicit and I want to focus on the last part on the explicit part because the fast and the concurrent is not something that I feel is debatable that is a given but your Ruby programmers here or well most of them and I am a Ruby programmer and we're not ruling Ruby because it's a fascist language like if you care so much about performance with civil rights e + + job or whatever we actually like Ruby we like the syntax we like what we can do we like the features that we have and i'm going to show you what is there in phoenix and an alex year that makes your day to day work actually nicer and just the speed that's just an extra bonus so my name is Toby you can find me on twitter as a backdrop and also this is a lot about a lot of the things that will talk about i could give a separate talk so it's a more of an overview of things so let's get started so Alex your is a functional programming language as immutable data structures and it is first up based upon the Erlang vm which has been around since 30 years and I think it's open source for maybe 20 or 25 years and this is a platform that is used to run telecommunication system that we just cannot be done it cannot be down everything has to be super fault tolerant you have hot code upgrades and the actor model is back in back then they didn't actually know about the actor model they sort of invented it separately or well afterwards we have to fig and there it's called processes and it's different and operating system processes but you can have I think 268 million of the at the same time in one way em and they're very low cost and the whole vm was sort of constructed to let these run so each process is garbage collected individually will inform crushes it does not affect all the others and so sometimes people say to me Toby we have like celluloid for actors in Ruby and now we have whatever the socket feeling for red Fife is called I it escapes me right now I'm sorry but this is still all wrong on see Ruby which is not the best platform for that because you still have the global interpreter lock so still just one thread will execute at a time whereas the Libyan was built for this sort of stuff so enough talking let's look at some code this is an implementation of map function that I wrote so it is normal so what do we see here at first we can see it's a ruby like syntax I mean it's different that's def module not module and there's a cup of more juice and stuff but it looks very similar along on the other end is like a prologue like syntax and lots of people shy away from that but I will warn you at this point this is a wolf in sheep's clothing it looks a lot like will be but it's definitely not Ruby it's much much closer to function program which is in LA so you don't have your own mutability it's immutable its functions all the way down and so beware of that I think it's sort of a gateway drug to get Ruby people into Alex year and then you realize wait this all works differently but I'm still going to keep trying because some people are afraid of the prologue like stuff or of all the parenthesis of lists like I like both of those but still I like Alex here more personally so of course toggle function programming language we have functions as a first class citizen so it can pass them around much of a pass around Ruby prox or whatever and then we have something very important to function language we have telco optimization which is if the last call and function is to itself then it can basically be optimized into a loop which mostly consumes less memory and can also be faster which is pretty nice and there's also something that for instance you cannot yet do on the JVM inference as well you can do it on edge area but Java itself doesn't support it so Scala people had to write it in own compiler and similarly when I talked us about processes like we have scholar and occur and all the cool actors and they also can run two million of them at the same time but still the JVM wasn't built for this and JV and people will also tell you or at least they used to tell you if you want to build a system that literally can never be down used to L nvm and not the JVM one feature that we that they don't hear enough about when talking about Alex series doc testing so this up there is basically an actual unit test it will execute going to run my tests and will check if when it does this that this will be the actual output and for me that's just great I have the tests right there where need them and also my documentation doesn't go out of sync with what it does of my documentation is always right when browsing the Ruby documentation I saw and fixed many many wrong IRB examples and this just won't happen here and it's a lovely feature that would see like to see more it's much easier and functional and functional and immutable languages because you don't need to set up a whole holy object tree with this object and is this object in the right state lalalalalala no you just pass and simple data structures when you pass out simple data structures and also you try to reduce the side effects so you don't have to worry about them as much so the best ball maybe d best feature the best feature in my opinion is pattern matching which maybe you've heard about before which is we're saying this definition of new map is only called if the one argument is the empty list and for the second one we know that there's SD at least one element in the list which would then be put into hat so the first element of the list and the rest will be built into the tail list so we can have multiple method definition that method overloading which when I wants ventured out of Ruby to Crystal and Alex here I saw like well I have really missed us you know we can do this in rubin then we have to always switch with if and case and whatever and this is really nice to do and i want to alert you not matching on the type of the argument you mention on the structure which is really really powerful so as another example i have this pattern matching example where first we greet people and if we get in a map which is sort of like a ruby hash we go and grab like this one triggers when we hang it when we get both a name key and the H key and then we also at the same time extract the values of those in two variables which is super powerful it's the one feature that when a program Ruby I often try using you know with the keyword arguments and like L this doesn't work and Ruby damn it and then I'm sad yeah of course we can also match on actual values so I can have a specific age 4 p-8 in here and complement him on this awesome keyboards and of course if we don't have the age we can just do this and then we can have a sort of catch-all and those are always all executed or sort of evaluated top to bottom so the order does make a difference if i put the catch-all to the top none of the others will trigger another thing important for us Ruby developers yes we can have meta programming in the form of macros and it's more like list style macros so it's not run time it is compile time so makers are expanded at compile time and I personally believe that is enough I don't need it at the runtime because I think every meta programming that we should do is something that can or should be done at the all the compile time before their progress it's not one time so I have not come across a case where would we really really want to have it in the runtime and if you know such a case please tell me not now but later of course Alex you're also tackled polymorphism I think a rather popular method is the string blank methods from well rails or active support and what do we do here we redefine the protocol we say okay this protocol supposed to tell me if something is blank or not and then we can have different implementations of blank for different data types and that can also be your custom Lee defined structs which are sort of like well I don't want to say objects or classes but it's like a specific thing at that specific key values and all of them have to be there and you can write your own implementation for those for the protocols and what's great about their we don't have to smudge it into you know string and bliss that already have a billion methods but it lives in its own self namespace and then it just call blanked out blank and it works for the arguments and that's really nice and it's something really nice about functional programming in general that I often feel that it's easier for me to put a concept into a separate module whereas often an object on the programming it feels like I have to shove it into some class then again maybe I'm not composing my objects well enough but yeah it's easier in my opinion another really great thing about Alex it from you is that it is implemented in itself I don't know how the bootstrapping process works but this is the method in on all right from the Alexia source code and it's just so great to if you don't know how something works or if you're looking how would Alex you people solve some thinking I should go into the extra source code and understanding and contribute to it which is much like my first impression when I worked with crystal and it's just great to be able to do that contribute and look at all that myself the other thing that you see up there is optional type annotations I know people are so split about type annotations or types but it's become increasingly popular topic so it's nice that you can optionally do that and then you have an tool that goes through your code and analyzes that and shows you where potential problems might be and also we have something i'll call it interfaces here so this is lock plug it's pretty much like wreckx oh it's a middleware and the interface for plug it's like you can initialize it or you can call it an initializer book some sort of options and you can call it with a connection and options and you will return a connection so if we want to adopt this it's called behaviors in Alex here we just say okay I'm adopting the behavior of a plug and then you have to implement all these methods and otherwise you get a warning and actually like this please don't forget me by actually sort of like Java interfaces to a point because in Ruby we often do like it's all implicit we just say like oh you have to implement this method and maybe I raised in the method to warn you that you have to implement it but that's just a workaround it's not explicitly saying hey you're implemented and I like to have this feature and that's what they also mean in the title it is more explicit and it's a trade-off of course but it's cool what this plot does it again does a really brilliant use of petal magic it says if I get a connection that comes with the hat method and it just rewrites it to be a get but yeah it's from the black repository it was easiest when I could find so now of course the big elephant in room is functional programming and when I hear talk about function program I often feel like this like we're sitting right now and there's a speaker up there and he or she is going to talk about like Oh function programs the greatest thing you all should do crunchy protein at student function programming you're so far behind and I feel like it's built like Lulu Lulu do the function programming do the function program you know and I was just want to let you know I'm not like that I'm more down there with you I'm Billy Ruby programmer for i forgot to say i organized a Rube user group in Berlin right skirts culture appending Ruby for another six seven years or whatever and I'm an object program halt I was always interested in functional programming closure scholar and all that stuff and I like it and I think everyone should learn some of it because really influences your coding stand very positive way it's very cool but I'm not this hardcore person so let me tell you from this not hard core function programming perspective more the object-oriented well formerly more object during the perspective why I think it's good and what it is and why I like it so much so if it would be really obnoxious we could say function programming is about why do I call the functions and Ruby I call them on the object and function language I just have a module and then function and I pass in the object or the most important thing as the first argument and then do my thing well another way that I learned to think about functional programming from books etc is that it's more about the transformation of data because they always talk about like we don't have stage we have immutable data so what we actually do is we have some sort of input value and fruit series of steps we transform it to now could value and that's sort of abstract but if you think about web development it's pretty much what we do we get in some requests get people and then we sent that through series of transformations that in the end spits out HTML to the browser and so actually applies quite nicely and yes really great advantages and because transformation is such a comment Fein Alex ear has the famous pipe operator so there's an example from the program Alex you book by dev Thomas this is fairly normal code right we find customers and then retrieve the orders for the customers we get the taxes and then we prepare the filing and what we can see is that some sort of data always flows around there so what we can do in Alex here is we can use the pipe operator which but basically does is it sends the return value of the previous thing in as the first argument for the next thing so we don't have to use all these intermediate routes and we can just see the data flowing through a series of transformations and in the end it returns my filings if I just want to do that all in one line without a pie paper out the pipe operator then I would have to do something like this and it's sort of inside out because the first thing that I care about the DB find customers this way in the middle and then we have to go to the outside to understand what does so I hope that you all agree that this is much much nicer to read ok let's talk about the immutable data this is Ruby code and let's say accentuate the person with the attributes named Toby and age 27 or whatever and I passage to some function do something and then I want to insert that into a database what is the value of person want to insert it into the database we don't know because anything and everything could have happened in there to do something call like people can grab internet instance where it's called methods honor to it because we're passing it as a reference we don't know so the thing is if I want to figure out what's going wrong here have to dive in to do something and all other methods that person send to see where is the extra mutation very stuff going wrong and if I have an immutable data structure that's not my concern because the only thing I care about is what happened to person I can see oh it's not being like I don't resize my career soon so there's no changes to it so I know nothing is happening there which is really great and so I have to make it explicit again the explicitness to say like I expect some change to person to Q here and this is happening and I think right at least I had to track down quite a couple of bucks where some library unexpectedly modified a hash or something I was passing to it and just through being mean and freezing it and then seeing where it crashes I could see what actually happened and could fix the bar so this in my opinion really helps the readability and Weiss is a good thing this is something that I stole from Russ Alden who wrote elkin eloquent Ruby and that's not working at cognitive which is sort of D closure company and gave a talk in Berlin and he I think stole this one from Steve Jobs or some other a person he didn't remember but anyhow you can look at this in two ways you can look at it as a bicycle for dreams I can look at it as sort of handcuffs restraining you and he said and I sort of agree that ruby is more the bicycle for your dreams you can do everything you can do method missing you can reach into other objects you can do whatever you want whereas function programming it's sort of restricting you immutable data structures you just have functions and you have these other things it's so free straining you but in a good way because when we have all this power from Ruby then we need to come up with concepts you not to go too far above what we do and when we have something simple it helps to understand ability of our system and it keeps us from doing bad stuff i would say another way to think about this is in terms of principles vs Power we have all these principles and Ruby we enforce them through bekhab or for other worlds that we have because we need to solve restrict the power sometimes it's good to have that power I'm not saying that Alex and function programming is languages are powerless but there are some restrictions placed on us these principles in turn can help us make other improvements along the way or other optimizations so a lot of debt is used for instance if you into the react crowd with the immutable data structures and all the stuff that they can do and can do faster than if a structure was mutable and it's also i learned about like I learned to think about it in the way that and function program we try to minimize state we try to have as less state as possible because we're just doing its transformations where it's an object-oriented programming we often try to hide the state because people say like don't expose the state at all has to be behind an axis or not even that or something else so if all the statement we sort of lie about the to the outside sometimes we say like oh I'm just I'm not having this whereas in function program we could try to get rid of it because something that's really hard to debug is like okay I have this piece of stata how did it get there if I don't have that piece of state to begin with and can just follow a nice flow it's easier to see in my opinion and the same thing goes that whenever I give a function the same input or pure function same input I always receive the same output which is great for readability and also of course for testability because I don't have to go through a whole bunch of setup which is also white dog testing is so easy and again I again want to focus on that this is very explicit and in my opinion it improves readability greatly i'm a i would say i'm a fairly good Ruby programmer but sometimes when i get to debug into some big library and i go go okay okay this object isn't it's in the in the state was that other objects state okay well okay why did this change oh there's another object where is it coming from why did it state change what happened I don't know Alex year I start learning Alex here a year ago half a year in rota first production killed production application with it and when I would go into libraries I could just read it because it's all just simple transformations I could see where the data flows where we're stuff coming from where we're stuff going and was much easier for me to read these libraries although I'm far less experienced in Alex here than I am in Ruby so it's one two great advantages for me one thing I want to talk about is the actor oh we see that that's great I know we don't ah you don't I just see it wait a second do you see no ah yes my mouth okay this is something about you my Master's problem is a visualization of the actor model so this is one actor here and all these other actors and they just compute the Fibonacci numbers and we can send the messages so actors communicate via sending messages and you can see if I sent them enough messages and then give them some time that an actor which is the model for parallel programming you that its use they have a mailbox and when the red they're working and just computing the Fibonacci number and this is a great model in the great explicit model as well for parallelism because each of those actors itself they're completely separated from each other and they all just work sequentially what they're doing but still because you can have many of them and they all have their mailbox which Arbor consequentially they can still all run in parallel and then any end report to be sold back or send a message back to the first actor there showed here and at the same time I sometimes like to say that the actor model sort of is more object-oriented an object onto programming itself because an object on the program we always talk about oh we send messages and receive messages and we can decide handle the message or not but the most modern implementations we just have a method call and we call the method and we don't gather we don't get a message in hand that we cannot decide to throw it away because it's an ethical but with records I actually get a message actually can do stuff with it and all that stuff so that love is there and they're all running in their own threat they're all completely separate from each other and that's the only way you can communicate you can't reach into something which is super great and it's much easier to work them with locks or something so it lets no see it's death it's just the right thing yes ok and stuff to work with that is in ODP which you might have heard it stands for open telecommunication platform but it really applies to anything and it's basically a framework and set of libraries to work with distributed for tolerances or well to create them it has a database in there it has an in-memory database in there a lot of stuff to implement servers and supervisors and that's the next thing I want to briefly talk about it also it's this great thing in it which is an observer that you can start on a running note and you can inspect it you can see all your running processes which mailbox is big because of the mailboxes peak it's not getting its stuff done so it's likely bottleneck and stuff like that but you also have a visualization of this provision treaty which is you have a concept for failure that means one of the processes I can give them a supervisor and whenever they terminate for something you might have heard about the phrase let it crash then the supervisor notes and it's like okay this one crashed and now I'm going to restart it in a known good state or I'm going to do this thing I'm just going to kill it off because I don't need it anymore and so there's a concept for failing something is just saying something will always fail we all know that but here we have an explicit concept for something is failing and how do I get it back to a known good stage and what you can see here is a Phoenix application and down here you probably can't read it but this is the connection pool set up by actor which is sort of the database layer with all the different database connections and at the same time we also have umbrella applications which is you have basically one big applications that is composed of many many small applications that can work together and you can see all the applications running here on the Left which is slightly cut off but anyhow and all this is great but let me now go to Phoenix I want to say that when I wanted to learn Alex year of God a bit frightened because that all sounds a bit frightening Donald like this supervisor supervision trees the process is Ellen OTP lalalala lalalala I was like oh man I have to learn all of this just read a feast application wow that's hard it's not our this stuff is it's fun to learn it certainly explains your horizon but you don't have to learn it just to write a few certification all you have to do is you kept the core functions you have to read modules and right-front yourself because fina accepts all of this up for you you know Phoenix starts a new process when the new HTTP request is coming in and it supervises it same thing if you have connection and of course as I showed the same thing for the database connections so Phoenix is quite great it is rated inspired and where does it come from Chris McCord is the inventor and he basically invented it when he went out and she was a ruby developer as well and you want to define something where was nice to work with Ruby embark sockets and I think he also served with I think the event machine and reddit or something like that we just gave up at some point so Alex you and created Phoenix first as a web socket or channel only framework but then you realize oh well I think Josie join the team or maybe before that oh well we can actually make a full blown back from work with not much effort and so that's where it's coming from so first we have the whole flow of Phoenix of things application first you have a connection then it goes through an endpoint is routed to your controllers it might run through pipeline which is you know calling the mother words then we can go to the model and then in the end we end up interview and it's all this transformation that in the end we end up with the HTML as I talked about before so I want to take you through a quick tour of that so this is the world's fairly resembling the red welts so nothing much I can or have to say here I want to show you the pipe through browser and that is one of the pipelines that you can define individually and you have a browser pipeline that does all the stuff that you need to do for browsers you exact depth in or you want to get the session and stuff but you don't care so much about that when you build an API so the same rules file for all the API related worlds you can just say okay just get that through the API pipeline and not a browser pipeline which is really nice and explicit again we can go to the controller action looks very much like a normal controller that you might be used to but just because we don't have state we have parameters so we get the connection which is sort of the general requests that came in and also you the map where we sort of add on data if we want to use it later in the process so that's why the connection also gets passed to rendering the view and the programs that we don't need your is like the URL programs or problems that you get via post and so it's already expressed it doesn't measuring come from somewhere you always know where it's coming from then we go to the model quick overview this is for the model looks like an actual what I actually like here we have the schema in here I'm not a big fan of the active record OG database exchange so that's that and when I have to look up which attributes actually have I have to go into my structure sequel file and search for that and it's not something I like I know there's a note a gem and all this stuff actually like this and again it's more explicit it's less magic but as we sometimes learn for instance of dynamic finders magic isn't always that great or mostly evil as a thing James I work great puts it then we go to the viewer and now you go like oh that's not the view that I'm used to the view in Phoenix is more like a view help of file as I would say and so all view related methods that otherwise might have ended up on your model and up here in the viewer which is a nice addition I think personally that you always have done you always go through doubt but in the end we end up at the template and you don't have to read all of that I just want to show it looks pretty much like air be and there's also slim and Hammel implementations if you're into that so I showed you what's the time let's talk about what's different so let's talk about what gets me excited about this and one thing is change sets and this is basically validations and callbacks of combined but packaged together so we can have a new change here which means like we got a model and then we say okay we want to use the name and the user name we have a unique constraint on user name and we want to validate the length of the username and then I can have a whoops I can have a registration chainset that sort of builds up on that new change step but that's okay for registration I also want to have a password and I have some validation on the password and then I also sort of executed callback that I put the password hatch into my structure that I created so Weiss is cool why do I like this for me personally my biggest well problem will normally build threads applications has become that an active record once the application is grown considerably you have 40 or 50 validations and maybe 20 callbacks or whatever and it's a pain to just you know for testing create a new object that you want to use and at the same time all those callbacks trigger and you don't need them you always have to take care of them you always go like okay only in this situation triggers call back only in this situation because if we're honest most validation the most callbacks were built for one specific screen or maybe two screens not all of them they were really not supposed to be run all the time and if you use form object or something you can get around and that's something that I like to do but this change sets their there from the start and let the start you just say I only do the stuff that I'm really interested in I only take the parameters I'm interested in and they're only 1d validations and sort of the callbacks I'm really interested in at this point in time which makes my long-term program happiness a lot better and I can see there's a lot as a trade-off in Phoenix that you have to be more explicit about stuff so I always have to say I wanted this change yet we have to create a new change set instead of just adding a validate or callback method so it takes you a bit more time to get started but i think the long-term benefits outward outweigh the short-term gains on the other hand are they use the change set down in the controller I just get my parameters create a new registration change set and then I try to insert it into the repository this is something else that is different it is always an explicit step if you in if you interact with the database you say you have to call reprod insert or report at all or something with the repo a change that won't go or the model won't go in itself to go there and it's the world convention to only do these side effects in the controller which also think is quite nice but yeah if we manage to insert it we go and put a flash and stuff and otherwise we are out the other great thing of course is channels rates as its grand new feature that's cool and true but these roles capable scare much better and also the API is super nice and was built for that I don't have the time to go into it deeply but you basically get this handle in method where they can then so to find event that you're getting your you pet a match on that so you have a different definition for each event which is quite nice to do I didn't you can broadcast to everyone who subscribe to your channel and that's if it's a very nice sort of abstraction around that and it works with both web sockets and you can also configure to run with long Pauline another thing that I really really love about Phoenix is the mantra of using the right tool for the job so in most web frameworks we have like your own custom bowl as a problem or whatever and then if you want to go further and you have your front-end developers and they really we want to use a backpack integrating that if the SS problem is possible but it's very painful from everyone that I've ever seen in the works and Phoenix just says well no just use whatever you want like mostly probably it's NPM or maybe nowadays yarn based but we suggest you use branch as the butcher which almost nobody knows but there was a good choice it's very simple to use but you can easily just delete that and put in backpack or whatever else you want it's pretty great at the same time they also say that we have to state a base p post greater than example we want to use the database and we're going to do the stuff that the database is best suited for in a database for instance an active record if you do a uniqueness constrain on some attribute it would do that sort of on the model layer we create the database itself and see okay what's going on in the database and then go back but this can afford and it's you know vulnerable to one one time race conditions is the word and in things they say no like we can do like a unique index on the database and that's what it's good for the database can do this stuff and actually going to do the same self and razor always at the unique index to database as well but they focus more on then being better at integrating with to database somewhat it's not the old DBA days where you did everything in the database and vacation logic ship in your database but sort of a middle point between there and rails sort of the do everything on the model layer at the same time also for internationalization they didn't build their own big internationalization tool they were like oh there's Kanuga text Essman Ronson's what 20 years has been used as a standard for translations let's just integrate that let's just use that and that's a thing we're using which i think is really great because it also gives you a lot of gains very easily because you just go with these existing tools a good at their job another thing that I like and that's why I smiled a bit when there was the like in shock about TN plus 1 we have explicit pre-loading so when we fetch a user from the database and user has many videos we try to access user the videos it's as not loaded videos not loaded and then you're like oh what the hell did you look it up and then you go repo preload and then you'd 0 user videos and as we can still see here not loaded and why is that it because i'm stupid because it's an immutable data structure we popular can change user so what we have to do we have to reassign the user and then we can access the videos why do i like that i'm aware of the cost involved in where it's an active record it just loads everything out to automate automatically which is really nice you know if you get started and you just take something up its really cool but then you get all these M plus 1 arrows and all of a sudden you know your interview and you access an object an object in the office and you do a database query and you meet in the middle of a view that's never where you want to do database queries but hey it's happening I don't have you don't know about it you don't have to control over it and so a lot of my time when I do performance optimization has spent like sprinkling includes everywhere includes for you includes for you yay so I'm happy that I have to our made aware of this and I see that there's a cost involved like I need to preload this and for the future need I can think do you have to do something different or something so I'll never run into these n plus 1 queries or this other stuff because I need to be accessible again a bit more time at first but I feel it really equates the speed thing and young so now this question comes up so we go go do like seein Phoenix now right it's it's the best thing is the next great feeling and I just want to mention like no I mean it's not I hate this atmosphere of my technology is better than yours and we have to fight about it no lie still have Ruby I still love rails and I still feel a bit bad like being here like smashing way it's been an awareness there and I love ever there's so much great work and as I recap of well anyhow and I see take the technology that fits what you're doing and what you want to do and so why not do both why also not love Python PHP whatever you know it's all good technology to some extent always so I also want to talk about some stuff that you know one might not want to do alexion Phoenix so some people are feel are gonna miss the dirtiness of something that you can do Ruby so I want to talk to a developer was I go I liked well speller than Django because in Django I can't just you know go to the database in the view and stuff and just get something here and do something there and Rui I can just hack anything into the view and that's really nice I like that so people were always at some point miss taking the shortcut I feel at the same time where I we talked about is Alex it also comes from some baggage so L Lang was envisioned 30 years ago and so some things like for instance the internal representation of strings is a bit weird or if you do just one ' it's not actually string it's a characterless which is a list of the poke of the code points and stuff like that so some stuff is weird like working with dialyzer for type annotations is a bit weird to do and that's like all to the o-line heritage of course the echo system isn't that big yard I mean you can always access the airline ecosystem so integration super smoothly it's no problem at all so every major thing is basically there but it still it's not Ruby you don't have a big device thing like people are trying to work on that but still device is also not what you would do in a taxi because it's a different mantra behind that but everything that we fought we need it or we need it like posters integration for postcards and jason Burke tokens that was all they are ready to use and very nice but at the same time it's a new land that is also a chance I mean what's a bit sad is that you know application monitoring is lagging behind and everything but you can get new ideas so Phoenix phones ancestors mantra of Phoenix is not your application Phoenix it's just the HTTP interface to your application but the rest of you into your vehicle occasion should be implementing them in umbrella apps independent from Phoenix it should be and that is really appealing to me because if we have a rates application good luck getting wheels out there it's not it's not a question that you would ask or that you would want to do at the same time you can also contribute to the ecosystem so my favorite hobby time is now spent on writing a micro benchmarking library and alex 0 Benji and it's super fun it's cool that you can see that you can contribute to the ecosystem such a big way also by just during pull request to some major libraries and their second they are accepting them so before we go to PA which you probably won't have time but the typical QA first question is so would you start a new project in Alexandra dicks now and the answers of course it depends I personally feel like it's it's a for me if I want the application to live for long it's a very great and superior choice right now but I haven't had an Alex in Phoenix application that long in there so it's my team willing to learn the technology yes it's a project small enough so that we can first try it out to get people interested in all the libraries there yes but maybe go ahead and do it but on the other hand maybe your team is not interested in Ike's in figs and they don't want to jump in or maybe some crucial library is not there or it's just a project that you need to come fastened and one month you can forget about it or and half a year maybe even then yeah the Ruby ecosystem so gives you lots of advantages and it's not them either or it's it's what it is an idle but there's always considerations for your specific use case so with that amount of time and well thank you and enjoy Eric symphonies you