Merken

Python Not Recommended

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
at work at a company called Braintree's but we make it really easy for you to accept credit cards People and other payment methods online and mobile apps this talk is not currently under development will be shortly will find there so let's talk about the title of the talk I thought not recommended it might sound like it's a
joke but I mean it quite literally the company where I work we have something
called the radar and it contains information on the technology use whether you should use them whether you should never use them again and sort of where to look for examples and other relevant information and In the radar
find is specifically listed as currently in use but not recommended so this talk is about why we originally used it why it's not recommended now and what we selected for and what we're going to use it for the future so for some background the obvious question is what we use instead we don't quite understand something else the user general-purpose language and the answer is really Braintree lots of the printer uses Ruby by default pretty much everything but I promise this is really talk I personally am of Python person I don't love really so will we'll talk about it only as background Braintree has
bought into the Ruby ecosystems we use Rails web framework we use Capistrano for remote server management we use topic for configuration management and we use rank for sort of scripting builds and automation of so you probably
wanna what's what's it like doing Python and Ruby shaft something I've been doing for 3 years out there's a lot of jokes about Python because it doesn't have quote unquote real lambdas
which people just mean that function definitions are statements about expressions and people are like just feel that define a function One and even though functionally the same people like the syntactic difference is seen as an elegant compared to Alexa closer this is both because of this statement expression dichotomy but also because of the generally structured syntax and because in these languages magic is really easy with macros on the list were with everything in reviews magic and it's it's a little harder and I thought people don't like that it's sometimes this dismissed as a dying language because of some of the negative publicity around the slow adoption of Python 3 but I don't see as a failure I don't think the Python communities is of failure people outside the Python community sometimes see it that way and languages are also similar in a lot of ways almost 2 similar for their own good when you're ready programmer of a lot of people will sort of apply judgments the applied code to Python code without taking into account the differences medium and so if you were to apply the Braintree is a Python developer might hurt your little these people are going expected a Python code to be written like Ruby and it also means that a Python code can be a little less than but so
despite using a lot of through the 1st and foremost we believe in using the right tool for the job so you're not defined at home in this brain drain although it does happen once a while so what when you know when
when it's not the right tool for the job and we sort of found 2 million times about 1 is when you need the
JVM ecosystems and you might say don't use Jerry and you have access to everything well we found that that gets a little messy and that's it's not really good long-term solution although we have done in the past when we need a job in the short term are primarily will need to use Java of some 3rd party who may be wrote the EPI in 1999 only has doesn't have an open API spec and they'll just give library in your choices he was plotted job well where used up but there's also a lot of great tools that work best with the GTM like Apache Kafka which is a message broker for handling high-volume data feeds and Apache Cassandra which is a distributed database for handling large amounts of data out so what do we usually need the JVM well I guess said we have
tried you would be historically along with Java we haven't found it to be a great and then more recently
over the past year and a half 2 years at this point we have used closure pretty successfully although we still found that the time that you really want each other directly and so the other main time
that we find that is the right tool is when you need to write a smart proxy now our businesses basically the set between somebody wants to sell something online and the banks and card networks so we basically or smart proxy and so our our big smart proxies build up a lot of little smart proxies you can see this is the logo from a party that Braintree and people through its Office of lesser couple years ago it's
smart has a brain so it fits we have really high up time requirements we need to be available when there are temporary networking problems when we filter services it when database migrations when we did cat traffic spikes like I Gruber is it's New Year's Neuber's running tons of tons of rights and they want to charge people's credit cards and we also have a big problem with the services behind us the banks the car networks going down and we needed at the very worst case requests to fail gracefully and preferrably if the average times a short like on the order of few seconds you want those requested to succeed even know this year's behind us failed so we use them to make outgoing connections fuel appear highly available to our internal services we use them to pause incoming requests so that our internal services won't actually see any request coming in and we can do whatever we want to them but actually clients a syllable connect to us so we do custom rate-limiting we have a pretty complex rules for how much capacity different clients and different types of requests can use and we because we integrate a lot of legacy services we often find that we need to really weird SSL or persistent connection configurations at and this is something that we've often had to ourselves we also very complex we try logic and a lot of other cost of logic that we need this is worried historically used by it might seem a little odd since handling a large number of requests doing a lot of concurrency is not necessarily the 1st place you think of fun but it was actually pretty good fit for a long time specifically because of tornado 28 0 is a web server and framework for doing it and I'm walking IO 0 and you get the benefits from Python overwrapped development and easy to learn and you still get the necessary I O concurrency handle tens of thousands of requests so back in 2013 I found was in pretty good shape of brain drain was in use for several of these internal proxies service well for a couple of years and has several internal advocates that just me but other people to so what happened that I'm giving a talk called I find that recommended the platform really did tell us as we start the scale of concurrency in the framework really isn't enough nowadays we sort of expect or languages to have concurrency built as I found 3 now does and has go in many other languages do and do really expect that concurrency logic to not get in your way when you're writing business logic which we we found that the concurrency logic and train really does and it was also too much work to keep up with changes in tornado about we thought we looked at the new version is a couple of times and it would have really been a completely right to use the new the eyes and we really did want spend the time for that we didn't trust that we would be able to make those changes without breaking anything and so because we're using an outdated tornado version maintenance overheads could really pretty high you
can google things easily because people who got a newer versions it's hard to find the right stocks and you end up and callback hell because you're still using old less elegant API as so we found that logging actually has a and unsettlingly high-overhead every time we went along the lines we saw request pause and eventually those pauses add up to enough to be real significant as by scaled and then there's no s I support in I found to historically as knowledge to serve multiple SSL certificates and seems work a lot of customers use that and it was only very recently introduced into Python 2 but the version of tornado using a so old that even if Python supported the tornado version the applications that we wrote also really failed us and a lot of this ties in with those platform failures but it's also to a large extent the fall of the stock proxies really too smart the logic was all mixed in with the concurrency boilerplate making it hard to understand and they were trying to do so many things that the code ended up that was meant to 1 thing was coupled with the code is meant to be something else so when we tried to the code to do connection parsing he completely broke thing and we had to put it back in the this now unused code in the in the code is straightforward Python implementations is rescaled were not fast enough so the rate limiting code started to add an unacceptable amount of overhead to every request came in
we also found that in addition to being too smart the approaches were not support we couldn't just right certain pieces of this in logic in the proxy the business logic had be duplicated In the main application and that's something that we really don't like don't like reading the same logic twice and none of these applications were really built for horizontal scalability they all assume that a single or in some cases a small number of instances would be enough for ever and so they were designed for us to run 10 or 100 years they were designed for us to run to the 3 and so what solutions to the switch to out where the what Python obsolete in these areas so for are incoming request proxy we switch to a combination of engine access approxi along with PG bounces so in engine activated proxy were able to do approximately the same complicated rate-limiting logic and load balancing that we were able to do previously with our proxy layer and we've also moved pausing completely out of the proxy layer into PG bouncer which is basically another approximates it to the applications of PostgreSQL and we then wrote main outgoing proxy as you know JRC but this was actually a failed attempt it had all the same types of problems as Python it was still trying to write your own tool to do a job that we were an experts that and we had problems with failed persistent connections and with memory leaks in node that led us to abandon and moved to and enacts nature approxi now the key here was timing is that it's a proxy 1 . 6 had features that we really needed and so we've we've now moved to that and it allows us to remove another cost piece of code from our system are finally our sort of most complicated outgoing proxy we've decided to rewrite of enclosure using Apache Kafka and it allows us to centralize all the logic in a single application
we can build it pretty easily the horizontally scales almost linearly and of course to get as and I support with the JVM right out of box and fortunately we cancel that project because it was a high-priority take a lot of time and so instead I wrote a monkey patch of tornado to support us and I even though it's really really old version so it's not great we still have a logic duplication between different applications and we still have a sort of lack of horizontal scalability we basically run to these proxies but for now it's OK but the problems are and so but so as of late 2014 all the small
proxies for on the way out or in use but not because we wanted to but not recommended for new projects it's officials in that condition that we at Braintree and there were fewer internal advocates now this isn't because all Python developers got mad Braintree but a lot of people who used to really like Python now have moved on and prefer languages like go work closure Alexa so which have more in common with through the so you can
understand it and so which just have better concurrency primitives and I went to just declare I don't fall in any of these groups isolate I found still use it outside of work and so on this is kind of sad and it makes it
really sound like the State of Python a usually sad but that's because that's the point of the talk we definitely there is something we will
never use Python for again but actually things are looking up overall were now using Python areas where it really shows the strength instead of just sort of this this was something that encode of our base other so the 1st places data analysis this is probably surprising to exactly no 1 our business analysts have really use it to replace Excel to right to have 1 off reports and you smaller monthly tasks that don't really need be automated I data analysts have moved more and more from writing giant crazy blocks of SQL to putting more logic in Python so that the code is more maintainable and understandable to a larger group of people and these are people who may be done little programming before but are really buying in Python very rapidly which is cool and find their data scientists are really using it to replace are part of that is because of the great modeling and analysis tools that Python has but primarily it's because it's a lot easier to to deploy your solution it's a lot easier to do this sort of ETL steps that happened before you do modelling in Python than it ever was finally well the next thing is really infrastructure management and this is somewhere that historically we bought in the public wholesale we've if you preposterous full of public code up is really based tool as but recently we found that Python has really good nature and we use it to manage certain resources like IP address physical port server locations this is something we actually do with puppet we did with a bunch of Google spreadsheets and so the centralized application with a lot of the like better views into the data is really helpful but we've also use it to manage cloud instances because we run our own physical hardware for a lot of things we had a pretty unsophisticated set up for managing cloud infrastructures namely we used the a user interfaces with basically log in the website which starts at
sensors now that we're starting to do more and more things automatically indeed scaling excuse me you scaling we had to have an automated tool and Python is the right way to do that and finally we use our switches for parts slightly complicated setups what we do try and make sure that even if switches fail in a datacenter everything keeps going so everything is all networking is match and switch configurations are pretty complicated and we didn't find a good way to manage them with puppet and we found that rather than writing a custom Puppet module which is can be pretty complicated was actually easier to emulate what public does in Python and pulled from the same data source that a puppet repository does in and so all the code is in Python and it's like a hundred lines rather than writing a very complicated puppet model that would never be able to change his no understood how it worked the Python community is sort of the final thing it's a big advantage of a language in my opinion and something that has been very beneficial Braintree but we have a lot of fun the UPS we have more of the project I we post should be the Chicago Python beat up about twice a year we've done a a couple of events with pilot he's now and 1 with gender roles and we've also sponsored other events and the office and this is really help with the hiring we've hired several people now 1st heard about Braintree through these events came to Braintree even though tho they don't interact because they know we support the community and recruiting is 1 of the hardest things we do so this is this is a helpful we also find that giving talks is a great way to spread the word about Braintree and I'm not the only 1 giving Python talks 1 of my colleagues has given a couple in Chicago and was given 1 of me at Northwestern University on are customers also use python so having a support I think community makes them feel more connected to us and some of the biggest and up to the world who are customers of ours have a pretty
large graphical bases and it's much easier for them to keep using private connect to us and that includes as they migrate to Python 3 we have a Our Python library is single codebase Python to empires on 3 and a significant amount of Python 3 traffic comes the API so having that and supporting the sort of the next the future of by on has helped us and keep merchants and so now at 2015 so what the state of life and now by phone to is definitely showing its age internally and in general especially around concurrency don't think anybody really disagrees with that of and as the standard tools like a cheap proxy and annex improved more and more of word sort of losing the use case for Python being the jack of all trades the language you can use to write whatever tool you need is a little less important as the standard tools tend to be there for scaling and for high availability and data science is really important for Python speech I think it gets the foot in the door for Python at pretty much every company which is a great way to keep people like I interested and to sort of keep in your mind for when to choose a for other projects of the community is also really important it's been great present Braintree and but it's just 1 of the reasons that Python is the successful to those I thank you that's all I have i'm glad to take questions things 1st grade it's we have questions about their if you the itself will take well as have some impressive I'm having trouble understanding you also know that I'm I'm a little hard of hearing what have we got on based on the questions about that if you have any longer in terms I mean people like students or such what in the company the on the key in on the learning Python or something more how they act in your community a circuit somebody else repeat the question I just had trouble understanding and is advice for students from about using 500 something else if they come to your company or you like environment of economic learning possible also smells like Ruby stuff so what we do with the issues of the act of do they choose to learn revere to select a lot of
have so I think it we definitely be look for people who don't wanna do 1 specific thing we look for people who want to learn and what to you'd ever tools that's the job the printer I think that a lot of people we hire and a lot of students will talk to are people who maybe done have the school but are open to learning anything but I'm not sure that the question
the the non-programmers were not professional programs like that the
analyst you talked about did they choose Python because they tried other options and like closure and enlightened world because they already knew Python because you suggested what was I had to find its way into their their job so this sort of the guy started our business analysts analytics team he'd been doing a lot of our recording manually in Excel for years and he decided to learn to program and so 1st he actually went through the and he wrote a web application that we use in production for years
Teilmenge
App <Programm>
Vorlesung/Konferenz
Softwareentwickler
Chipkarte
Portscanner
Task
Elektronischer Programmführer
Dokumentenserver
Information
Quick-Sort
Computeranimation
Konfigurationsverwaltung
Benutzerbeteiligung
Datenmanagement
Rangstatistik
Netzbetriebssystem
Formale Sprache
Server
Default
Quick-Sort
Framework <Informatik>
Computeranimation
Lineares Funktional
Subtraktion
Befehl <Informatik>
Programmiergerät
Algebraisch abgeschlossener Körper
Formale Sprache
Dichotomie
Mailing-Liste
Code
Computeranimation
Arithmetischer Ausdruck
Reelle Zahl
Reelle Zahl
Softwareentwickler
Lambda-Kalkül
Lambda-Kalkül
Makrobefehl
Prozess <Informatik>
Quick-Sort
Computeranimation
Offene Menge
Prozess <Informatik>
Datenhaltung
Apache Cassandra
Applet
Programmbibliothek
Term
Message-Passing
Auswahlaxiom
Computeranimation
Serviceorientierte Architektur
Chipkarte
Proxy Server
Algebraisch abgeschlossener Körper
Punkt
Datennetz
Menge
Computeranimation
Chipkarte
Office-Paket
Chipkarte
Datenparallelität
Formale Sprache
Versionsverwaltung
Kartesische Koordinaten
Computeranimation
Metropolitan area network
Client
Gerade
Zentrische Streckung
Bruchrechnung
Shape <Informatik>
Datennetz
Datenhaltung
Güte der Anpassung
Bitrate
Softwarewartung
Dienst <Informatik>
Rechter Winkel
Ablöseblase
Server
Ordnung <Mathematik>
Overhead <Kommunikationstechnik>
Computerunterstützte Übersetzung
Fitnessfunktion
Proxy Server
Subtraktion
Wellenpaket
Mathematisierung
Zahlenbereich
Implementierung
Mathematische Logik
Systemplattform
Framework <Informatik>
Code
Benutzerbeteiligung
Multiplikation
Syntaktische Analyse
Migration <Informatik>
Datentyp
Maßerweiterung
Konfigurationsraum
Implementierung
Einfach zusammenhängender Raum
Digitales Zertifikat
Zehn
Zwei
Kanalkapazität
Schlussregel
Quick-Sort
Chipkarte
Overhead <Kommunikationstechnik>
Bitrate
Textbaustein
Term
Chipkarte
Proxy Server
Subtraktion
Quader
Natürliche Zahl
Schaltnetz
Versionsverwaltung
Zahlenbereich
Kartesische Koordinaten
Mathematische Logik
Code
Computeranimation
Lastteilung
Leck
Knotenmenge
Skalierbarkeit
Prozess <Informatik>
Datentyp
Vorlesung/Konferenz
Einfach zusammenhängender Raum
Zentrische Streckung
Addition
Expertensystem
Physikalisches System
Quick-Sort
Patch <Software>
Flächeninhalt
Rechter Winkel
Festspeicher
Projektive Ebene
Schlüsselverwaltung
Instantiierung
Metropolitan area network
Algebraisch abgeschlossener Körper
Datenparallelität
Konditionszahl
Total <Mathematik>
Formale Sprache
Gruppenkeim
Vorlesung/Konferenz
Projektive Ebene
Primitive <Informatik>
Softwareentwickler
Computeranimation
Web Site
Punkt
Datenanalyse
Natürliche Zahl
Physikalismus
Gruppenkeim
Kartesische Koordinaten
Mathematische Logik
Netzadresse
Code
Computeranimation
Task
Informationsmodellierung
Datenmanagement
Vorlesung/Konferenz
Analysis
Sichtenkonzept
Hardware
p-Block
Cloud Computing
Quick-Sort
Flächeninhalt
Tabellenkalkulation
Mereologie
Server
Decodierung
URL
Streuungsdiagramm
Verkehrsinformation
Instantiierung
Aggregatzustand
Proxy Server
Datenparallelität
Formale Sprache
t-Test
Datenmanagement
Interaktives Fernsehen
Sprachsynthese
Term
Code
Computeranimation
Gradient
Rechenzentrum
Informationsmodellierung
Programmbibliothek
Stützpunkt <Mathematik>
Vorlesung/Konferenz
Konfigurationsraum
Gerade
Videospiel
Datennetz
Matching <Graphentheorie>
Dokumentenserver
Hochverfügbarkeit
Einfache Genauigkeit
Quellcode
Modul
Ereignishorizont
Quick-Sort
Office-Paket
Geschlecht <Mathematik>
Digitaltechnik
Mereologie
Wort <Informatik>
Projektive Ebene
Programmierumgebung
Aggregatzustand
Standardabweichung
Metropolitan area network
Prozess <Informatik>
t-Test
Computeranimation
Algebraisch abgeschlossener Körper
Datensatz
Prozess <Informatik>
Web-Applikation
Vorlesung/Konferenz
Analytische Menge
Biprodukt
Optimierung
Quick-Sort
Konfiguration <Informatik>

Metadaten

Formale Metadaten

Titel Python Not Recommended
Serientitel EuroPython 2015
Teil 36
Anzahl der Teile 173
Autor Forsyth, Adam
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/20059
Herausgeber EuroPython
Erscheinungsjahr 2015
Sprache Englisch
Produktionsort Bilbao, Euskadi, Spain

Technische Metadaten

Dauer 21:04

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Adam Forsyth - Python Not Recommended Braintree is a Ruby shop. By default, we use Ruby and Rails for projects. We also use Ruby-based projects for much of our tooling, including puppet, capistrano, and rake. However, we strongly believe in using the right tool for the job. What that means has evolved over me, and I'll discuss what solutions we chose in the past as well as our current choices. So what's it like doing Python at a Ruby shop? You get lots of jokes about language features Ruby has but Python lacks and lots of disbelief that Python will survive the 2/3 split. People also tend to apply the best practices and conventions of Ruby to Python code as if it hey were the same. Python's major inroad at Braintree has been, surprisingly enough, as a platform for high-concurrency situations. This is a direct result of the power of Tornado as a platform for asynchronous I/O. It also helps that many Python is very approachable and many developers have at least some experience with it. Braintree has three pieces of our infrastructure using Python and Tornado -- an incoming request proxy; an outgoing request proxy; and a webook delivery service. They've served us well for 3+ years but all suffer from a number of problems. The outdated concurrency feature s of CPython / Python 2 as well as our lack of experience with and commitment to Tornado have always been an issue. As the meat of the talk, I'll speak in depth about the other issues we've encountered with each of the three applications and our short- and long- term solutions to the problems. The state as of the end of 2014 appeared dire for Python at Braintree. All the old Python code in our stack is on the way out, and Python has been specifically recommended agaist for new projects. Our Python client library is used by some of our largest merchants, and is ready for the future by supporting Python 2.6+ and Python 3.3+ in a single codebase. We also have a vibrant Python community at Venmo, our sister company. Both Braintree and Venmo support Python by attending, hosting, sponsoring, and speaking at meetups, conferences, and other events in Chicago, New York, and elsewhere. At Braintree, our Data Science team uses Python almost exclusively and they're becoming a bigger part of our business every day. We also use custom tooling written in Python to manage our infrastructure.
Schlagwörter EuroPython Conference
EP 2015
EuroPython 2015

Ähnliche Filme

Loading...