Merken

Cutting-edge APIs using hypermedia at BSkyB

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
hi everyone my name is Antonomasia I worked for British Sky Broadcasting in London
and I'm here today to talk about hypermedia ADI is how we use them in the sky and what we learned so if you have any questions on when I ask you to write them down and keep them until the end I'm gonna do my best to allow few minutes for questions and also if you have any fighter questions we can take it offline feel free to approach me after the talk so I'm going to start with an introduction I'm working on the sky fills up from the environment where the strategic platform that uses loads of components agnostic in terms of languages so we have a few components built-in Python and we also use rule of create jobs so we interact with those of services that are not in our control and we found it challenging to create a uniform interface for our clients so we decided to implement hypermedia the and the orchestration we found really useful to sort of tied together all the agnostic components and when you have loads of clients for your back and services is and the work well for the clients can can be
friends is challenging if you don't have a solid platform so the decided after using hypermedia in the eyes the orchestration to extended and using for shopping basket this services so basically when clients Collins guided come or they want to buy something from the sky and the reliability products and they call that call center and they interact with shopping basket so that although of she interactions in terms of adding and removing products adding offers and so on and we found it really useful to use
hypermedia API is at that level and also it allows us to expose all the products in that kind of product catalog basically distributing idea out of the challenges that we have the sales platform was built was started more than 2 years ago and we're just celebrating to median orders last week so there is lot of interactions those of traffic on our back and services especially and we have loads of challenges so that's why I am here today to basically share with you some of the challenges and some of the things that we've learned while using hypermedia API how many of you are using the the moment hypermedia I realized a few people that's good because of this talk is going to stop at the beginning so basically I'm going to say it what hypermedia in the eyes and then we can go into a practical
example and show a very simple client-server interaction and hopefully after that you're going to have an idea of of what the design used for this kind of API so 1st thing is hypermedia API are based on breast RESTful interfaces I'm not going to insist on because this is not to talk about risk but it's very important to get across the fact that hypermedia at the eyes are supposed to be simple uniform are supposed to make full use of HTTP verbs and use mechanism like caching or compression and use the concepts of resources and updating resources in a uniform way same in a RESTful interface but I'm not going to insist so much Congress because I assume that most of us already have used or tried to use some RESTful interfaces on our services I'm going to take his father and having in mind that hypermedia API based on REST principles I'm wondering what is an API would be of the as a Google search when you go along we'll go and search for something as a human consumer of the web and all you have to do known the Google domain of knowing the global domain and do your research you are presented with a list of options on links but you don't care where that website so the applications that you're trying to look for state they can be on a server in Germany or they can be you know unless the URL itself is not very interesting from that human consumer perspective so we get API is based on the same principles that the consumers of the API most probably
current machines rather than human consumers I'm not going to care about the underlying implementation or the URL of just don't care about the name of the links that they're trying to access so we've seen that hypermedia guidance based on rest and he's trying to simulate as a sort of bulldozers let's say or a certain way and so the thing that hypermedia API add to the table the following hypermedia controls or what we call the means which is actually a they had a media controls the interactions that clients can have major application and a very important thing is in the rest of the world we outplayed resources the need to create we do all the cried operation at the very granular level so we interact with more and or maximum to resources the time hypermedia is about the interacting with the whole application state just think about the users that go on the web and they want to change something that we don't care what the changing the underneath 4 then they see the Web as a whole or if something changes of the web on the way that they continue to navigate as before so hypermedia he's all about hypermedia controls and changing the whole application state and what I mentioned earlier when I use that little example hypermedia is all about giving meaning to your application giving us amounting to your links so based on the things that hypermedia adds to the table you can pretty
much see straight away some of the advantages like loose coupling while if the the current don't need to know all all of the URL that using our implementation that makes them loosely coupled straight away so imagine the advantage of having a mobile clients there actually a type 2 applications you don't need to be employed all the time so because it's out of your control how users download the new versions from any repository that another great advantage is the fact that if you think of the applications state as a whole you can model your business interaction as you see fit and give the clients the options to navigate toward the goal so those those are some of the main advantage is obviously is designed to be simple and uniform because it inspired by the way he does all have to be about 2 remote procedure calls and message queues can be as easy as basically being their actions so now I'm seeing kind of where hypermedia API is designed and goal I guess the best thing is to actually see an example and see a client-server interaction just so we can remember more about it the example that we wanna see today is a pet shop so as you can imagine the application domain it's pretty simple you have a a basket and you can add or remove that to to the basket is designed to be very simple and just so you can sort of understand the client-server interaction and at the very very tiny level is similar to something that we do in sky with the shopping basket so hopefully you'll enjoy it that technology that we're going to use today our flask which you probably know all it's just a web framework that allows you to do routinely in a very simple way something like weight and then I I don't and rest navigator don't from the service sector and rest navigator for that class and perspective on the modules that enable you want to work with Holland Jason hypermedia type so you probably wondering what this Jason hypermedia type while hypermedia out said that we change the whole application state so let's send a response back to my clients standard not only a data structure that represents my resources which could be Jason I chose hollandaise and because this is what we use in Scotland the moment but beside your data format you need to communicate your clients where you're meetings all your hypermedia control and on be and how the structure is going to be so it's a very simplistic hypermedia type that gives you that structure anyone has seen the example how it looks like and I'm going to explain but let's have a look In the past you that RESTful API let's start with a simple comparison what do clients need to know in this scenario while class need to know quite a lot they need to know the hostname obviously but they also need to know the URL to created by asking the URL to get a catalog of pair but you have to add a picture for removal connected the basket or even the detect types so they know what to render in their front ends so they do not quite a lot and they need to hire and all those you have held that we advertise them while we develop our services but maybe there is another way and this is what hypermedia brings to the table let's just assume that this is what kinds can see when you access the root URL of your application they can see other half Jason response so this is what I was talking about how means hypertext application language so you can see a few properties which are completely arbitrary name and description so that would be the data that you want to communicate to their clients and you can see the hypermedia controls on the interactions on their underscored things properties so as long as your current understand how to pass Jason and they also understand how to to and relate to the high format they know how to interpret the response but great because all they need to know is the cost after that you can see the but did the basket name that's the semantics of the link or the name the name of the relationship that is what your clients are gone and all In reality even if your clients try not to couple to the API they still need to know something about your domain so if work with the shopping basket application the pretty much going to know that you have a basket and you can add and remove items from so they can only the basket and they can start to consume the API but what happens in reality it is if you use something like the rest of the data which is a very simple client in Python for hypermedia API you can use the holonomy data classes to basically you only need to know that the whole thing all of your API you can create a financial data instance which kind of gives you a view of the whole application and then you can start and get the data like the properties name and description that you've seen in the heart of representation and then farmers and get the links in this scenario is just the basket late but is it will just a
2nd the metal on the basket HFCs policy so you can have a list of methods if applied bringing this scenario just trying to create a basket so developers what would you they
would use to like hydrolysis instead the I know that they need to do a policy graph that they get ground meaning and that trying to create a basket using the name basket so if we find there the how do you create a basket using the navigator well we already grumbling basket and we applied create it's a very simple wrapper in rest navigator which says make a pause to the link called basket and after you create this last step you fetch the data that in this scenario I just the random ID something that you would see from among the DB database and then you can see in the next interactions life secondly you have a new link up attacking this time so probably you can explore the catalog so what client developers are gone until they're going to use let's say hydrolysis explore DAPI and says yes I've got a I've got an idea of the basket and I've got the pet with the so I'm going to continue and what the data from the
so it goes pretty much comparatively through the API but so far you have seen that the only date that that client regional is the entry point and then named relationships in the name of the links incessantly I decided that 1 of my is silently not gonna be so by 1 component but it's gonna move on a different course my clients want had the gonna die and follow the link with the matter that I didn't make enough fetch the data and grammar the next interaction things that's pretty much how it happens you can see that when you when you get the packet information packed in this scenario actually represents the whole state of your application the wavelet navigators goal this the application as a whole they give you the data and the next interactions you can see for example quantities for this for the purposes of this then I created a very
simple logic saying if the quantities there is 0 you get an underlying when when you finally anyone that part it to the basket then you get only moving to decrease the quantity so that's very simple logic just for the purposes of this example but that represents the state of your basket Saul Klein conceded that I find the means so they can 5 explored and say great oneself file the pedaling I get the next interaction I well this is great even if you want to add new relationships at runtime you can because as long as your client is not gonna use the name of your relationship it's fine for example I can I'm a new and say I at multiple pets or something like that when the client ready they're going to deploy and use the link so that's the only time when they actually need to change so with the links they've seen it surpassed so it's kind of creating a instance resources and assign it to the basket so the rest of the data in this scenario it's again very simple you grab detecting in this scenario have moved the ball picked leads but the the great thing about it is that you can advertise new types of or products in your basket and your clients would automatically you know how to render them if that data-driven for example they can you can just tell them that packed high you can be tracked or whatever age or give them additional information and then can render it straight away and follow all the links in this scenario scientists I just about the I think of other picture the basket and increase the quantity of the of the basket with 1 this means that my whole application changes my whole its state of the application so it's very important how you define the and obviously you see that the next interaction and they can build is removed but that's why I said is so easy to define business to business interactions in your application because you can just guide your clients through the API this is how the father Jason response is gonna look like and this is what the client developers are gonna look at and understand how to discover DAPI obviously you can use your mentation how support something like content your right so if you want to discover documentation about things but that's OK as long as you use it to was like 5 browser any means that the API he doesn't have to be very complicated so this is the client perspective so you're probably wondering how difficulties to use rank and create the server-side side interactions so what resources are used
recent I build using the class build build their own goal range is very easy to set property if using set property so for example this is my basket resource and I just return of property and energy and I grab the pair and just landed on some links to that and so it's pretty straightforward you're probably wondering this is getting read chapter like you have to go from 1 link to another How do I manage that well it depends on the interaction if the client only need specific information that you can make it as chatty as you want is going to be really fast but if they want everything all the time then you can actually hire allows you and the door module 2 and then the whole resource In that I response of your resource basically so I could and then and all that into the basket resource without understanding things to them but that depends about your client server interaction but as you see in even the client and server side interaction is pretty much the whole and to be honest in a large application of this things are going to be so much is going to be easy to build your entire API and constraints and the wrote on the server side is very simply use is very simple creating fast you're probably wondering what about 4 forests and all the normal HTTP response status and how how are you going to enforce the users to use your API as you want to because even if you basically allowed them to do all different interactions you still need to enforce well the answer is you don't need to forget that you have to stick to the same REST principles as you would always still and all the negative scenarios just so users even if the axis the links as they want they still get the appropriate response just like on the Web users can type pretty much anything so that that includes the example of a very simple interaction that emphasizes how easy it is to build your API both from client and server perspective obviously most the clients would be in front and technologies like our clients in in sky would be um building underlying tests for hyper agents there is a hypermedia client which is great is just that but then the Python client was used for the purposes of the standard and is not yet complete and it's very new but I think you get the point salt after going through a simple example I'm just gonna do a short recap before we go on to question um while we talked about the advantages and we've talked about challenges is basically quite difficult to design your API now because you need a different infrastructure not because you need something special is just a different frame of mind we're all used in values to RESTful interfaces interact 1 resource at the time that you need to see the whole picture all the time and that is quite challenging but for actually paid off really well because imagine if you have loads of components your clients would need to know what the end points for all these components to interact with them the matching going from q to stage 2 production and clients need to change all their mappings while there we need to know 1 entry point for our back-end services and have a mapping for each of their environments and we deal with the rest because we create the links dynamically sold that's not real world for but even in conclusion we we are still improving our API so we are applying new design techniques there is a lot of documentation on the web that helped task and there's a lot of advanced topics which you can research like profiling binding metadata to yearlings API forms that different kinds of design so all these it's pretty much it is it is great to do research on something so new basically so if only going to questions I'm just going to leave you with a list of file the reading that loads of books out there Mike Adams and I'm just going to mention great he works for lyricism and API and he's that he's done so much research on RESTful services and hypermedia API said really helped me a lot for research and he helped and so and also you have my contact details if if you want to ask any further questions after this talk because we don't have too much time for questions so as I can take questions now thank you very much 1st Christians or thank you for you with interesting due the client like and constraints and what supposed to sleep pages and To be
honest I don't know about 229 test I know that the laws of currency in the Ruby Java older front-end technologies by necessary there is 1 yet the 1 that using he is also very young and uh uh client for the defining interface each only like a few months old and because happening as starts to be used in a lot of companies probably is going to be 1 pretty soon but I don't know all about 1 and is the mean of the community a schema for your boss to but it is that something that will yes so this schema for those messages the idea hypermedia API seems to keep them as the analysis forcible to be quite forgiving just like on the geometry scheme either to actually communicate the stuff how the response as long as your clients except the content time Highland Jason they understand that they will find their interactions in the underscored links or they can find and maybe resources or they know how to grab the properties of hypermedia is not about defining the streets scheme so that you must have a product that you buy something with so if you must link and you must be young you're going to put me in the novel things will not hold claims discover these things so as long as they as long as for example in the example following the depicting would give you more information about what you actually but I haven't put loads of information because because of the purposes of the Denmark but you just send the data as Jason and most probably they would only need to know the type of the let's say scenario to memory in the front end but you send the data as properties on your have response feel free to tackle that day you need 1 OK on the last slide you have 2 challenges and advanced topics and especially especially the
advanced topics are really interesting I just wonder if you if they're not changes and models that mean that you have a satisfactory solution for all of these you just don't have the time to talk about it always the challenge now is just because the stock was supposed to be an introduction for what hypermedia API and didn't have enough time to talk about them but it would be really interesting to be based on talks on the advanced topics which to be honest it's quite a lot to talk about so I just mentioned he intended pointers if you want to find out more about it it more questions still you were here on the left side right the so called
other you just filtering with this approach so so we tried
using them from the API on here I think you don't think that we using it in a hypermedia API without using ideas in a static world and so on so just just exploring some things that we I realized we still need to use for something like that during that say you you have containers in the items and and you want to give me items of container a B and C C would be the use of those containers for example right yeah not sold only word like in sky we had some sort of thing the challenges so we sort of wanted to organize our containers or items in sort of logical structure so that the client say if if those products and those are all 1st and then I only need to know the ideas for those containers to be to be able to render the whole page in reality clients are still coupled to your domain so if you have a business sort of resources as basket products of 1st there was still need to know or if you have like inscribing had TV products and broadband products used they still need to know the high-level knowledge about those containers but it's restructuring DAPI sometimes helps and even the old clients need to couple of certain things you have to aim for clients to couple on the things that are not likely to change in your domain for a really long time but like this whole really enjoys all so be interested to know if you think that there are if you found any limitations when using hold or if there are many cases where will developers all creates influence the ignore although hypermedia approaches step outside of thought in order to interact so yeah that's that's a very good question so the limitations of power just as I mentioned in the beginning of holiday is 1 of the same simple so the hypermedia representations there are there's more complex like collection Jason D. N. A. come so that limitations these objects have doesn't support API forms on the way and you have 4 for example to submit information about something about your application so the house doesn't support that and not even a tone which is a more complex media type doesn't support API forms collection Jason started to implement so those were 1 of the limitations of the and limitations worried that there isn't a way to express metadata about your links but there is a thing called profiles which I mentioned on the advanced section that allows you to say something about your content that is outside of your content and that is 1 of the limitation of how he doesn't have that it does have documentation and all the in terms of you can expose content to your eyes to document during which which is great but those are 2 of the limitations thank you OK thank you think
Formale Sprache
Applet
Schlussregel
Term
Systemplattform
Quick-Sort
Computeranimation
Client
Web Services
Keilförmige Anordnung
Prozess <Informatik>
Last
Code
Hypermedia
Gamecontroller
Zusammenhängender Graph
Programmierumgebung
Schnittstelle
Call Center
Momentenproblem
Applet
Interaktives Fernsehen
Online-Katalog
Biprodukt
Term
Systemplattform
Medianwert
Computeranimation
Übergang
Client
Web Services
Last
Hypermedia
Vorlesung/Konferenz
Ordnung <Mathematik>
Offene Menge
Schnittstelle
Server
Web Site
Extrempunkt
Mathematisierung
Interaktives Fernsehen
Implementierung
Kartesische Koordinaten
Aggregatzustand
Computeranimation
Übergang
Virtuelle Maschine
Client
Benutzerbeteiligung
Domain-Name
Web Services
Perspektive
Uniforme Struktur
Caching
Nichtlinearer Operator
Kraftfahrzeugmechatroniker
REST <Informatik>
Mathematisierung
Mailing-Liste
Binder <Informatik>
Quick-Sort
Konfiguration <Informatik>
Arithmetisches Mittel
Zustandsdichte
Verschlingung
Hypermedia
Client
Server
Gamecontroller
URL
Aggregatzustand
Tabelle <Informatik>
Momentenproblem
Formale Sprache
Selbstrepräsentation
Versionsverwaltung
Kartesische Koordinaten
Aggregatzustand
Computeranimation
Formale Semantik
Übergang
Metropolitan area network
Deskriptive Statistik
Client
Web Services
RPC
Wurzel <Mathematik>
Datentyp
Sichtenkonzept
Dokumentenserver
Kategorie <Mathematik>
REST <Informatik>
Knoten <Statik>
Speicherbereichsnetzwerk
Konfiguration <Informatik>
Navigieren
Verbandstheorie
Verschlingung
Hypertext
Client
Dateiformat
URL
Message-Passing
Tabelle <Informatik>
Aggregatzustand
Instantiierung
Gewicht <Mathematik>
Klasse <Mathematik>
Gruppenoperation
Interaktives Fernsehen
Implementierung
Online-Katalog
Framework <Informatik>
Domain-Name
Benutzerbeteiligung
Perspektive
Endogene Variable
Datentyp
Warteschlange
Datenstruktur
Softwareentwickler
Data Encryption Standard
Mathematisierung
Mailing-Liste
Paarvergleich
Binder <Informatik>
Modul
Portscanner
Holonomiegruppe
Hypermedia
Debugging
Gamecontroller
Videospiel
Datentyp
Punkt
Graph
Datenhaltung
Formale Grammatik
Interaktives Fernsehen
Kartesische Koordinaten
Online-Katalog
Binder <Informatik>
Computeranimation
Arithmetisches Mittel
Client
Navigieren
Verschlingung
Wavelet
Total <Mathematik>
Wrapper <Programmierung>
Randomisierung
Zusammenhängender Graph
Booten
Information
Softwareentwickler
Aggregatzustand
Punkt
Browser
Kartesische Koordinaten
Aggregatzustand
Extrempunkt
Computeranimation
Homepage
Metropolitan area network
Metadaten
Client
Softwaretest
Web Services
Bit
Code
Softwaretest
Datentyp
Kategorie <Mathematik>
REST <Informatik>
Gebäude <Mathematik>
Biprodukt
Arithmetisches Mittel
Verschlingung
ATM
Server
Information
Programmierumgebung
Instantiierung
Aggregatzustand
Lesen <Datenverarbeitung>
Standardabweichung
Nebenbedingung
Subtraktion
Kontrollstruktur
Rahmenproblem
Hypercube
Mathematisierung
Interaktives Fernsehen
Mathematische Logik
W3C-Standard
Task
Benutzerbeteiligung
Multiplikation
Spannweite <Stochastik>
Bildschirmmaske
Task
Perspektive
Datentyp
Endogene Variable
Zusammenhängender Graph
Softwareentwickler
Ganze Funktion
Modul
Wald <Graphentheorie>
Rechenzeit
Mailing-Liste
Elektronische Publikation
Binder <Informatik>
Modul
Endogene Variable
Portscanner
Mapping <Computergraphik>
Energiedichte
Bildschirmmaske
Last
Mereologie
Hypermedia
Normalvektor
Mathematisierung
Applet
Interaktives Fernsehen
Aggregatzustand
Gesetz <Physik>
Räumliche Anordnung
Computeranimation
Informationsmodellierung
Client
Endogene Variable
Datentyp
Vorlesung/Konferenz
Inhalt <Mathematik>
Zeiger <Informatik>
Schnittstelle
Analysis
Softwaretest
Kategorie <Mathematik>
Nummerung
Binder <Informatik>
Biprodukt
Rechenschieber
Arithmetisches Mittel
Bildschirmmaske
Rechter Winkel
Last
Benutzerschnittstellenverwaltungssystem
Festspeicher
Debugging
Hypermedia
Information
Message-Passing
Selbstrepräsentation
Kartesische Koordinaten
Term
Komplex <Algebra>
Mathematische Logik
Computeranimation
Homepage
Metadaten
Domain-Name
Client
Bildschirmmaske
Datentyp
Inverser Limes
Vorlesung/Konferenz
Inhalt <Mathematik>
Softwareentwickler
Datenstruktur
Leistung <Physik>
Profil <Aerodynamik>
Biprodukt
Binder <Informatik>
Quick-Sort
Objekt <Kategorie>
Rechter Winkel
Hypermedia
Garbentheorie
Wort <Informatik>
Information
Ordnung <Mathematik>

Metadaten

Formale Metadaten

Titel Cutting-edge APIs using hypermedia at BSkyB
Serientitel EuroPython 2014
Teil 76
Anzahl der Teile 120
Autor Vasiu, Adriana
Lizenz CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen 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.
DOI 10.5446/19936
Herausgeber EuroPython
Erscheinungsjahr 2014
Sprache Englisch
Produktionsort Berlin

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Adriana Vasiu - Cutting-edge APIs using hypermedia at BSkyB In this talk I will explain what hypermedia enabled API means, I will give an example of such an API and I will take you through the implementation details and the usage of flask, dougrain and HAL in this context. Also, I will present a brief comparison with an API that is not hypermedia enabled and take you through the advantages of using the hypermedia approach. ----- In the technology community at the moment there is a lot of talk about hypermedia enabled APIs and Web as an Architecture model. More and more applications nowadays try to adopt the loosely coupled and distributed web like architecture by using hypermedia as an engine of the application state. In Sky we are successfully implementing this approach for some of our components, and we’ve learnt that the major benefit for us is the scalability that it offers: as an increasingly expanding business with a constantly growing product portfolio, scalability of all our systems is crucial. In this talk I will share some of the things we learnt, I will explain what hypermedia enabled API means, I will give an example of such an API and I will take you through the implementation details and the usage of flask, dougrain and HAL in this context. Also, I will present a brief comparison with an API that is not hypermedia enabled and take you through the advantages of using the hypermedia approach.
Schlagwörter EuroPython Conference
EP 2014
EuroPython 2014

Ähnliche Filme

Loading...