 Felly, gydag i'r wneud am hynny, mae'r newydd. Felly, ydych chi'n ddweud am ymddi? Hyddech chi. Mae'r cyffredin niol Stevenson. Mae'r cyffredin niol, a'r cyffredin hynny i'r cyffredin niol, ac yn ddif ar y cyfrifau cyllid yma, yn ei gwirio cyfrifau cyfrifau cyfrofiwr, rydyn ni'n ddweud o 20 llwyfau ac yn y ddyn nhw, ychydig i'r ddyn nhw i'r ddaf yn ei gwrs o'r amser o'r ysgrifio. Yn ymddangos chi wedi'i ddweud y gynnig o'r ffordd yn Shedd, o'r ffordd, sydd y gallu ymddangos. Felly y gallwn i'n amser o'n mynd i ddeud o'r ffordd yn fwyaf dyma Cymru, a'r ddweud ar y twel hwyl gyda Zypkin, sy'n dweud y ffordd yn gweithio, i fynt o'r llei'r amser o'r ddweud o'r cyllidau cael eu cyfraddol, ac mae'r ddweud yr amser. We all have an idea of what microservices are I have never met 2 people with the same idea So as far as I am concerned, microservices are just a bit It might do a little, it might do a lot Mainly seems to be rest-based from what I see Rest and Jason has won the battle in terms of communication between services eisiau i'w myfyrdd o tîm. comments mae'r cysylltwyd wedi bod yn i gynhyrch gweithgaredd. Rwy'n meddwl oherwydd cadw'n meddwl oherwydd mae'r rhan, mae'r llun genentyd aquellydd, mae'n meddwl o transatio, a mae'n meddwl o sioiaisio. Othoedd oedd y clyfydd yn gweithio, mae gyd wedi chesgliad Caerdan i'r hotel, yn Motorunio i gynnwys i'r cardio. wedi bod yn gweithio'r gweithio, ond mae'n gweithio hwnnw o'r gweithio. Ond yna'n meddwl yn ôl y gweithio ar gyfer gwladig. Rwy'n meddwl gyda 100 euros, mae'n 50 o'ch meddwl. Rwy'n meddwl 150 euros o'r gweithio ar gyfer gwladig eir. Yma'r lluneg wef, rydym yn eu gyrdd. Rwy'n meddwl o'r cyffredin. Rwy'n meddwl. Mae ymddych chi i'w ddefnyddio gyda'r ddebydd. Mae'n gwael i ddwy'n gweithio bryd, rwyf ni'n gweithio eu cynnig ar y cystafol, rwyf ni'n gweithio y byddai'r byd. Y rhaid pethau yma yn ymddiw 3, sy'n ddiw i'n ddysgu 4 a 5, ac mae'r cyfnod dweud yn ymddiw i gael oeddaf yn llwy. Dwi'n gweithio'r cyfnod, rwyf ni'n gweithio'n gweithio'n gweithio'n ddysgu'n gweithio'n gweithio. Felly, rydyn ni'n gweithio'r ysgolwyr yn ddod yn yma. A dyma'r ddod cymorth yn y cyfle, yn ddod yn ymdweithio'r brosesau o'r ddod yn ymdweithio'r ddod. Rydyn ni'n gweithio'r bod yna'r bawr? Rydyn ni'n gweithio'r ddod yn ymdweithio'r gwyl? Rydyn ni'n gweithio'r ddod yma. Rydyn ni'n gweithio'r ffordd ymdod yn ymdod yn ymdod yn cyfnod dyma, It is free open source, you can download it from Zipcan.io, it's on GitHub. It grew out of a Google project, a thing called Dapper. The idea is around tracing. What they mean by tracing is two concepts – spans and traces. A trace is just the start and stop of an operation in and out of a method, dyfodol. Mae'r pan yn ysgrif yn ysgrif iawn'r obrill o'r perthynau, os obrill o'r perthynau, obrill o'r perthynau neu yn ddefnyddio. Mae'r cyngorau hynny yn ysgrif iawn yn ysgrif iawn yn ysgrif iawn'r perthynau HTTP. Felly mae'n gweithio'r cyffredin yn ysgrif iawn, sy'n cyfwyr, ond mae'n cyffredin mae'n gog unig i gael ysgol yw gyrddwyr gyda'r unig o'r awrig yn ei cyfriflau. Mae hynny'n i'r gweithio, wrth i'r cyflwysgol, ychydig i gael y gwaith yma mae'r awrig yn cyfriflau eich 30 sefydig o'r awrig. Rwy'n meddwl fath, mae'n meddwl gwybod. Mae'r awrig yn ysgol yma, mae'n meddwl gwaith. Mae'r awrig yn cyfriflau eich ffawr. Mae'r awrig yn gweithio'r awrig yn ysgol â'r awrig yn cyfriflau eich ffawr. Mae'r brōd yn cael i'r cyd-dweithio ar gyfer o'r ddweithio, mae'r cyd-dweithio ar gyfer o'r ydymeth o'r prosesau. O'r unrhyw ydy'r ystyried yn ymgyrchu cyngorol. Mae'r cyd-dweithio ar gyfer o'r cyd-dweithio ar gyfer o'r cyd-dweithio ar gyfer o'r prosesau. Rydym, gallewch yn ôl ymwneud, iddyn nhw'n ddysgu'r tracys, a daethwn i'r mecanosu staeth ar y tracys. A wnaeth o fe wedi bod fi ymwneud hynny'n amser. Felly, wnaethodd yn gyfryd o'r staeth o beth yng nghylchol ylai'r cyfrifol. Mae'r ffordd ychydig iawn i gydag i gael ei hoffiogion. A wnaeth yw'n dech blindfold yn cael casandra. Mae'r gwaith i'r hoffiogion i'r hoffiogion. Mae'r hoffiogion yn cael mysgol. Mae'r hoffiogion yn cael memori. Mae ydy'r hoffiogion yn cael, ond nid o'r hoffiogion yn cerddau bod yn cael hoffiogion. Mae'n meddwl o'r hoffiogion i Dev and Test, bo'r hoffiogion yn hwnnw nid o rhan o'r CVM a'r hoffiogion yn cerddau. O'r cyfnodd, mae'n ffordd yn dda i'r ffordd? Mae'n ddiddordeb yn gweithio'r projag. Mae'n ddiddordeb yn oed. Ydych chi'n ymhwyllt yma, mae'n ddiddordeb ymweld ym hynny, a'r ffordd yn ddim yn ddigon. Mae'n ddiddordeb yn oed i'r ffordd yma, ac mae'n eu ddiddordeb yn ei ddiddordeb, ymdill yma, ymdill yma, ymddill yn ddiddordeb, ond mae'r ffordd yw'r ffordd. Y dyfu honno'n meddwl a'r ffordd yw'r ffordd. Rwy'n dod yn symud o'r ysgoleth, ac mae hynny'n mynd i'r ffordd yw'r ffordd. Y ffordd yw'r ffordd yn ymgyrchu, mae wedi bod yn gweithio amddangos. Y chyfyddiad y ffordd yn y ddechrau ymddangos cyfrifio gyflyry. Mae'n cael eu bod yn ffordd ar y ddau'r Gŵr, sy'n cigfaint y gallwn gwrth ddatganiad, a mynd i'r modd y gallwn gyda jech, ond y cyfnodd dylai'r analitx ac yn cael ei wneud yn fawr ar y cyfnodd. Y dylai gyda'r gyrdd amser cyfnodd, yn ei ddweud y gyrdd yn cyfnodd. Mae'r cyfnodd yn cyfnodd. Mae'r cyfnodd, mae'n ddwylo'r ddiwedd ar y cwrs, mae'r cyfnodd yn ei ddweud yn cael eu gwneud o'r mawr, which is spread across multiple J Vms with the ability to query data, to have indexes, to run processing on data, expire research, all sorts of things that you don't generally get with Java Maps. If we look at what a Hazelcaster cluster looks like, it's a collection of processes. The key part, which I've tried to get in this diagram, is that the data is striped across the processes. Yna ymy'r llwyddoch llwyth, rydyn ni'n gwybod yn ymdannu'r app i gyda'r newid yn yr oed ac yn ddyn nhw i'r cyfrifanc ar y cyfrifanc. Mae'r llwyddoch llwyth yn yr oed yn mynd i'r cyfrifanc. A oeddoni'n golygu'r cyfrifanc yn yma i gyd已ol. Rydyn ni'r cyfrifanc yn ymwneud yn ymwneud, gyda'r cyfrifanc yn ymdannu'r brocer. Ac mae'r ystyried rydyn ni'n gwybod i ddechrau'n i'r cyfrifanc, им wedi gwneud, ondweud yn bud integeriaeth yn gwahanol i gyfrifes, ac roedd y broses ddod o'r cyfrifes zyb ac yn bwysig o ddeilogio lei, ac yn dweud fel y cyfrifes yn gweithio. Roedd yn mynd i ddygiad ddod yn cyfrifes ar y cyfrifes sydd datblygu. Mae'na gydig o'r cyfrifes yn gweithio, ond dyna'r cyfrifes ac yn gweithio. Rydw i'n golygu i bwysig yn dyfod wrth gwrs, rydyn ni'n ei cynnwys hwy oherwydd mor hwn ar gynhyrchu, ond fel y gyrfa ddechrau'r cyffredin! dau dŵr yn ffordd o'ch cyffredin yma, dwi'n dechrau'r cyffredin. Rwy'n barossaeth javau. Mae'r fan ar hyn yn benach gofyn. Ond mae'r llwyr ar amlwgfa hyn. Mae'r rhai ei fawr hyn yw yn dyrniwn yn phryg, nid ychydig rwy'n credu ffair hwnnw. Rwy'n credu gyrfa, Felly mae'r cyffredin tyddai, mae'r clywodd javau perthoedd yn cyffredin ar gyfer rydyn gyfer. mae'n gweld i'r maes i'r hyfforddiad, yw lle dyn nhw ddweud achos gweithdoedd gyrhaf y mae'r pethau ei oed air. Ydych yn gofio ar y cyflodi Gwriaethu. Dau lŎlau ddweud o mynd arbennig ac yna yw ni'r ffermwyr yn wedi sut yn ymweldill ymgyllideb a'r cyllid i'r amser ar darloedd gwyrdd yn ei ffermwyr. Rwy'r ffermwyr yn ei ffermwyr i'r diwc yma. Fyny'r rhaid o ffordd ychydig, Other than this a kind of jumble that you normally have to deal with. It's nice if you've got a greenfield where you do everything right to begin with, but in big businesses they've already got apps and there might be a transition process. So, how my application looks, I am the user on the left. I talk to the web application, which is in blue and in Cloud Foundry, which makes calls to my five microservices. I'm only running one instance of each, I don't have it, it's on my laptop, it's not enough for clustering, and those are retrieving data from Hazelcast, and then what the monitoring does is it adds an extra process for the zip-kin server, and the microservices are sending rest calls to the zip-kin server saying this is a trace, the zip-kin server is saving that in Hazelcast as well, and the UI lets us browse them. So, time for a demo. Let's hope this works on the network here, so I'm in SDS, we all see that okay, yep. So what I'm going to do is I have the zip-kin server, all these objects I will start, and while I'm doing that, I will deploy my app to Cloud Foundry. The only part I had to change today is just my IP address for my app that's in Cloud Foundry to reach outside. There's better ways to do that, but this is just a demonstration. You know, really you would want to use a config server and have all that kind of stuff derived rather than hard-coded. So let's just wait for everything to start up on my laptop. How are we doing? Everything's jugging away. So while that's going, I'll start some other processes. There's my app there. Yep, my app is there. So everything is up and running, all my micro-services are running, and my app is still deploying. So while I'm waiting on that, what I'll do is I'll go to my, I did briefly mention Hazelcast as a commercial site. I can monitor my maps on my Hazelcast application so I can have a look at my credit card authorisations. I have two on this JVM. I can look at my transactions. I'm really just able to browse map content. So what I want to do here, here's my app, is it actually started yet? Let's try it and see. All right, so my app is up and running. Like I say, it's not the best web development application in the world and that's not my thing. And when I look at my users in my system, I've got seven users. I select one, let's pick me. And then what we see is there's some operations in the background you might have seen on the console. But my balance has shown me I've got a credit limit of 100 and available credit of zero. I can click down and see, oh well, I took an Uber and I've had a pizza. And this is the one that's put me out of balance. I have an authorisations. We're not interested in the app. What we are interested in though is Zipkin. So I can go to my Zipkin server. It's picked up that it has traces for app from my spring application name. That's my top level. I can see what traces are available. If I click on that trace, I can see that that top level call to find users made a call to this, which made a call to this, this call, and this call, and this call. And if we look at that, that operation took a set amount of time. It's like there's the incoming call, there's the response. So I can trace all of what's going on. The part that matters more is the visual. You can see that the end-to-end of that operation was 1.7 seconds and that that bit didn't take particularly long, but this took a large amount of time. That's the span that the trace is underneath. So that's the part that's showing me what's going on. And I can run these operations directly. I can look at my balance from a rest call, not particularly exciting. I can look at my transactions from a rest call. So these are all the microservices. So that's the demonstration app. The app isn't important. The part that matters is that to instrument it, you just turn on sampling. So the core thing is a tool called Sleuth. So it's Spring Cloud Sleuth is the thing that's wrapping up the Zipkin call. And this is where it's sending the traces. So this is just a URL. And that's the URL that I called to browse the traces. So I can see, drill down into individual operations, I can look at Microservice 3 and see what Microservice 3 is doing, and this is where we get back into the same diagram. So if you have a hierarchy of microservices, you can add traces if you've got rest calls. And then the last piece of this is these rest calls, Zipkin spans are stored in Hazelcast. We can see that the servers are there. There are two JVMs running, storing data and mirror data. So if I really wanted to, I can shut down my service, go back to my application and it's still working because I've been cheating, I'm running another copy in that window. So I'm running a cluster of two JVMs and I've only killed off one. So that was a little bit fast through the slides, but the key part really is that this is just a dependency to add. You just add Spring Cloud Starter, Zipkin to your POM or Gradle or whatever you're using. If you've got a Spring application name, that gets tagged in, if you look in the console, finding, if I find one of my microservices, then now you can see the trace information going out. There is the microservice name. There is the trace ID, which is just a UUID. So that's how it ties everything together. You're passing in the parent and you pass out the parent and child and it says, ah, this is the child of that operation. It can build up the hierarchy on the Zipkin server. So what matters is your application name in your YAML and your, here's my POM. So I'm pulling in Hazelcast, timely for my web, Zipkin for monitoring, that's it. Couldn't get much simpler than that. Could get a little simpler, but we're down to four dependencies, so it's really not that many to manage. And the part that I'm personally working on at the moment is this Zipkin storage Hazelcast. So adding Hazelcast as a storage type to Zipkin, it's still a work in progress. Zipkin is itself evolving, so this works on version 128, the current version of Zipkin 2 I'm still working on, so that will get pushed in a week or two or however long it takes me. So that's the end for today. This was just a kind of lightning cover of how you add Zipkin to applications. Very, very easy. There's lots of resources you can go and look at. The one that matters really is the Open Tracing Organisation. That tells you all about these slides are on, uploaded them to Shed so you can download them. But obviously that then you've got to log in Shed, so that's all there. The code itself is on github.com slash Neil Stephenson, that's me. If I'll stop in a second and we'll run into some questions, but if there's any question you think of afterwards, then Neil at hazelcast.com keeps it nice and easy. So that's me. Questions? So the question was, how do you set up Zipkin to use Hazelcast? So on my Zipkin server, if I look at the configuration, then all I do is add an argument Zipkin storage type equals Hazelcast. And if you're working on my build, then that creates some spring beans that Zipkin internally has an interface for storing the spans and for searching the spans. So ordinarily that goes on to something like a rows and columns database and you have to index it for fast retrieval. All that I'm doing is providing Zipkin as a client to call off the Hazelcast and I'm storing that data in Hazelcast's memory across multiple processes in a map. And I can retrieve that quickly because the maps are indexed on Hazelcast. So there's a couple of things that Hazelcast adds that are kind of useful. One is you can expire data. You can say to Hazelcast this data that I've written in, delete it after a day and it will delete it for you because otherwise your collection of traces will be enormous. It'll be run out forever and you'd have to do some sort of archiving which wouldn't be the hardest thing in the world and archiving really would mean take it out and throw it away. You're not usually interested in old trace information. This is just a thing that you can add and say let's trace what's going on in Dev and Test. And because it's HTTP protocol, it's easy to go in and out of Cloud Foundry or you don't have to mess about the routes and things. So that makes life simpler, particularly if you've got legacy applications and new applications, you're going to have that mixed deployment model. More questions? Yeah, okay. Your question is can you have it? Yes, you could do that but you would have to do it in a different way. Zipkin can only send its traces to one place so it could send it to Cassandra or to Hazelcast which wouldn't solve your problem but you can send data to Hazelcast and get Hazelcast to send it on which is what I'm doing on my database is write through or write behind on a Hazelcast map. You can attach a storage class which is responsible for every time you write into Hazelcast, write it somewhere else such as Cassandra so you would have the benefit of in-memory speed. You might expire things out of memory but hold them for longer on Cassandra and house keep them after a month. You might have today's traces in memory so you've got blazing fast access to those and historical traces for a month on disk and then discard them from there. That's how you configure the expiry. In this case it was your authorisations. Anybody that's ever done anything with credit cards you swipe your card and it just holds an amount for a couple of days until the corresponding transaction comes through. This is how we configure a map in Hazelcast. We're adding expiry. Easy peasy. Throw it away afterwards at 3600. What's that? One day? Half a day? I can't remember now. It doesn't really matter. That's an hour in fact, a bit seconds. Just as a last part, one thing around connectivity is how do processes find each other. We don't really want hard code IP addresses in 127.001 isn't a particularly scalable solution so you can have discovery plugins, you can hard code your IP addresses, you can pick them up from the zookeeper of all sorts of ways. One of the biggest challenges of Cloud Foundry is just finding where all the machines are. Somebody spins it up and that's why on my example on the front page you can get at the VCAP services and when you create Hazelcast client normally that would be inside Cloud Foundry and then you'd look up to find out where the service actually is bound to and use that IP address. More questions? We've got five minutes to lunch. No? Yeah, can you go? Yeah. If you want to run Hazelcast on Cloud Foundry you can run, let's see if the Wi-Fi is up. You can run it as an on-demand broker if you've got Pivotal Cloud Foundry so you can get ODB to spin up however many instances you care about and it'll do that by interacting with Bosch so that'll create a clustered service of whatever size you've configured for and it'll do rolling balances and all the kind of nice stuff that you want so if you're saying make some change then you take one node off the air and bring it back and then do the next one and you can do a rolling change to your cluster without ever it going off the air and Bosch is bright enough to talk to Hazelcast and say are you actually happy because it's not enough to say the JVM has started, you have to then say well make sure everything's heated itself up and it's all ready to go before you do the next one so it's fine for controlled rollout and if obviously you have a machine failure it'll start up another one for you it's no different at procedure but that's only from version 1.8 onwards which shouldn't really be a problem what are we on now, 110, 111 and then you can define it as a user in use cups and you can make your own Hazelcast service and then you need to be able to create instances off that service and then it's just a binding between the client and the server so that's that part's easy user provider service is a bit fitly but once you've done it once you just copy it and paste it for the next one so it's really not difficult to use the the pcf tile thing is just an enhancement makes it very very simple but if you're coding it by hand it's not the hardest thing in the world because it's you know Cloud Foundry foundation silver members it's like we're not honed in on Pivotal it's like Cloud Foundry runs on Cloud Foundry you've got BlueMix or any other then we're fine with that the end of the day Hazelcast is just a java process you run it inside a spring boot deployable java file trivial okay um oh one more question yes i didn't quite hear your question you're asking can when Hazelcast connects to an external store yeah i'm still not 100% sure i'm following your question but basically if an external store is only external to Hazelcast if it's internal Cloud Foundry all that really matters is the connection string information so you know what's the ip address what's the logon password if it's like a you know if that was like an up my sql instance running inside Cloud Foundry you should be able to connect to that as long as there's no kind of um the problem really is the network roots if you're outside trying to connect inside and tcp gets blocked or all that that's the the the difficulty it's not insurmountable it's just a bit fuss if everything's inside then it's a lot simpler because Cloud Foundry is just looking after the boundary okay i'm done thank you everybody enjoy lunch