Headless WP Podcast

REST API Performance with Jonny Harris

Season 3 Episode 13

Jonny Harris is a London-based WordPress developer specializing in large-scale WordPress projects and runs the Spacedmonkey consultancy. Jonny has been developing websites for over 10 years. He is most known for his open-source work in WordPress core, where he’s worked on things like Gutenberg, multisite, and the REST API. His list of former clients and employers includes names like Time Inc. UK, Google, Unsplash, and Skyscanner. Over the last year or so, Jonny has worked with the performance team in WordPress core to make WordPress faster and more performant, so we’re here to pick his brain about the WordPress backend. 

During this podcast, we touch on these topics:

Jonny's GitHub
https://github.com/spacedmonkey
Jonny's Website
https://www.spacedmonkey.com/
Jonny's Twitter
https://twitter.com/thespacedmonkey



1
00:00:01.150 --> 00:00:29.120
Jeff Everhart: All right. Welcome to the headless Wp. Podcast. This is our first episode being recorded in 2,023. I got that. You're right. I, am Jeff Eberhardt, your host, and I am joined today, as always, by my stoked Co-host for an Aggulto, and our guest with us. Is Johnny Harris. Johnny is a London based wordpress developer, specializing in large scale wordpress projects, and he runs the Space monkey consultancy.

2
00:00:29.130 --> 00:00:59.059
Jeff Everhart: Johnny's been developing websites for over 10 years, and is most known for his open source work in wordpress core, where he's worked on things like gutenberg multi-site, and the rest. Api. His list of former clients and employers includes names like the time Ink, Uk: Google Unsplash and Skyscan, or some really big names over the last year or so Johnny has worked with the performance team and wordpress core to make wordpress faster and more preferred. So we're here to pick his brain around all things wordpress back.

3
00:00:59.070 --> 00:01:01.590
Jeff Everhart: So, Johnny Fran. How's it going?

4
00:01:02.320 --> 00:01:03.800
Jonathan Harris: Hey? Thanks for having me on

5
00:01:04.190 --> 00:01:05.950
Jeff Everhart: Yeah. Pleasure pleasure.

6
00:01:06.090 --> 00:01:14.109
Fran Agulto: Jeff stoked as always, and I think for this first year episode, You know me, man. I'm always stoked to learn new things.

7
00:01:15.210 --> 00:01:19.970
Fran Agulto: All our listeners who've been following us this past year know that

8
00:01:20.120 --> 00:01:41.280
Fran Agulto: man. I'm a dummy when it comes to the rest. Api. So I cannot wait to get educated on this, because I've been swimming in Graphql. So welcome, Johnny. I appreciate your presence on our podcast today. We're we're trying to. We try to make sure everybody is well represented. All the All the Api options are well represented.

9
00:01:41.290 --> 00:01:48.129
Jeff Everhart: but cool. Yeah. So like this is just always our kick off. Question, Johnny. So if you could just kind of give us a little bit of

10
00:01:48.210 --> 00:01:55.020
Jeff Everhart: background on you like, what was your journey into web development? How did you get into wordpress? And what did that look like for you?

11
00:01:55.860 --> 00:02:05.650
Jonathan Harris: Yeah. So I started using wordpress when I was 15 I wanted a blog, and 2,005 blogs were cool.

12
00:02:05.880 --> 00:02:19.100
Jonathan Harris: and I lit to the various. I think blogs are still cool. Lots of coming back. Blogs are coming back with the with the the slow heat. Death of Twitter, i'm.

13
00:02:19.190 --> 00:02:34.000
Jonathan Harris: But yeah, so you know. I look to the various different options, and I installed where I press 2,005. We're talking. 1 point, 5, 1, 2, something like that. I remember when plugins are added like that's how long I've been on working with word for us.

14
00:02:34.130 --> 00:02:41.179
Jonathan Harris: anyway. So I had a plug when I was at at high school, and then went off to university to degree in the computer network

15
00:02:41.210 --> 00:02:45.970
Jonathan Harris: management design. But then, had various wordpress clients on the side.

16
00:02:46.520 --> 00:03:02.889
Jonathan Harris: and then joined in a it's. I don't want to be a network engineer. I just love doing this wordpress stuff so joined us a very small agency as the as the third employee and can manage to convince them from using. Javascript spoke Java systems to using this open source thing called wordpress.

17
00:03:02.920 --> 00:03:22.509
Jonathan Harris: and the the year backlog of work they had. I completed that in 6 weeks, because I spin up super quick and they were like, oh, yeah, that's what Johnny has been talking about. As for last year like this is, this is really cool tech. And then, by the time I left there there was 12 developers working for me. I was very young. I was like 24. I was like, had ridiculous amounts responsibility for that age.

18
00:03:22.980 --> 00:03:29.119
Jonathan Harris: as I, as I want a new challenge. So I joined Timing, which is which at the time was the Uk's largest magazine publisher.

19
00:03:29.210 --> 00:03:35.710
Jonathan Harris: and what I thought I knew about wordpress and my like 6 years experience like doing my thing work, and what I was so like.

20
00:03:36.040 --> 00:03:48.079
Jonathan Harris: so cool and new, so much, I realized I knew absolutely nothing. and had a massive imposter syndrome, and spent months a few months in my life going home every day, and we're searching as much as I could about

21
00:03:49.020 --> 00:04:08.380
Jonathan Harris: object caching and database sharding, and all these cool things. And started to soon realize that I've become an expert in it. This, that that this inferiority complex is actually a good thing. And that I've I've learned a lot, and we were. We were self hosting in aws at time very early doors on aws.

22
00:04:08.390 --> 00:04:16.050
Jonathan Harris: and we had new i'd you know we'd need to red it graphs, and we we'd see random spikes in in our in our performance and stuff like that.

23
00:04:16.260 --> 00:04:19.949
Jonathan Harris: So I started creating issues on on track.

24
00:04:20.550 --> 00:04:26.010
Jonathan Harris: I realize they won't get enough attention. So I start to write my own patches and start attending the multi-site meetings.

25
00:04:26.110 --> 00:04:42.210
Jonathan Harris: And yeah, over the course of a couple of years low Key we wrote a lot of how we saw it works. So instead of it being lots of raw database queries, it now uses like a Wp. Side. Query it's just my biggest contribution into call, and I got absolutely hooked. So that was 2,013 that I was

26
00:04:42.320 --> 00:04:45.710
Jonathan Harris: doing that work, and i'm still 9 years like contributing to call

27
00:04:45.750 --> 00:05:05.290
Jonathan Harris: awesome. So what's the performance work that i'm doing at the moment is actually tickets I created in 2,013. I didn't have time to work on. I'm still working through a backlog for tickets. I create. Oh, yeah, it is. And that takes a lot of patience to trying to get your head back into a mindset of 9 years ago when you wrote the ticket.

28
00:05:05.510 --> 00:05:12.860
Jeff Everhart: Yeah. Well, there was an object caching thing. I don't want to skip ahead, but there was an object caching ticket that was just recently merged. That was like

29
00:05:12.920 --> 00:05:14.499
Jeff Everhart: 6 years old. Right?

30
00:05:14.540 --> 00:05:28.839
Jonathan Harris: Oh, yeah, yeah, I I've got a ticket 14 years old merged with not too long ago 2 years. Yeah, the stuff that I fixed that was in that's not even wordpress like before it was wordpress. I fix some of that stuff.

31
00:05:29.110 --> 00:05:37.990
Jonathan Harris: because we versus a fork. And if you realize this, I've like fixed a bunch of that stuff as well like, yeah, you know the yeah

32
00:05:38.290 --> 00:05:53.650
Jonathan Harris: like it's crazy old tickets. and I I'm: i'm very stubborn about getting that stuff done. But anyway, to my story, I was at time for a couple of years, and that was an amazing experience. What run this massive multi site? It was like one of the biggest traffic sites in the Uk and around the world.

33
00:05:54.000 --> 00:06:03.890
Jonathan Harris: then I went travelling for a bit, and then I decided to start my own consultancy. So 6 years ago I made made space Monkey limited consultancy, and I've been working with various enterprise clients to

34
00:06:03.920 --> 00:06:05.830
Jonathan Harris: to make sure wordpress scales

35
00:06:06.340 --> 00:06:18.340
Jeff Everhart: awesome. So there's 2 things I want to. I want to hop back and unpack from your background story. So you said this agency that you first worked at was using some sort of bespoke Java system to create websites for people.

36
00:06:18.700 --> 00:06:24.479
Jonathan Harris: Yeah, it was a university project. It has like comments in the code that were like

37
00:06:24.510 --> 00:06:27.860
Jonathan Harris: the module that it was for for their University project.

38
00:06:28.230 --> 00:06:36.900
Jeff Everhart: Oh, my gosh, okay, that's insane to me, and I've always kind of wondered that like, how how did people manage this stuff because I I would say I started using wordpress

39
00:06:37.420 --> 00:06:54.720
Jeff Everhart: like 2,007, 2,008. So just a couple of years after you was obviously a little bit more mature at that point, and I didn't know anything at that point like that was. I just picked it up. Use it as a content author published stuff. But I always kind of wonder that, like how are these people approaching some of these large website projects before they had the tooling that they have. Now

40
00:06:54.730 --> 00:07:08.019
Jonathan Harris: I can imagine that it was the bootstrapping process. It was an absolute nightmare because you had to like the tables you're saying, yeah, mainly. Build all the table yourself. Build all the database connections yourself, Craig.

41
00:07:08.700 --> 00:07:14.040
Jonathan Harris: Abstraction layers, I mean, jar is incredibly foremost about like you have to

42
00:07:14.320 --> 00:07:20.000
Jonathan Harris: do. You even print print 9 is 5 lines of code like it's just it's insane. And like

43
00:07:20.300 --> 00:07:28.150
Jonathan Harris: the the biggest problem they had was just like the very basic stuff you just expect from wordpress of just setting it up. That took 2 weeks to sell

44
00:07:28.280 --> 00:07:29.650
Fran Agulto: 2 weeks

45
00:07:29.720 --> 00:07:37.659
Jonathan Harris: just to spin up a oh, Wow, Imagine a: it takes 2 weeks to

46
00:07:38.220 --> 00:07:53.959
Jeff Everhart: yeah, and I've written some C sharp before that's just closest. That's close. Yeah, I mean, I worked at a.net shop one time. I mean it was exactly that, like everything you want, it took you twice as long, so everything was strongly typed, and

47
00:07:54.250 --> 00:07:56.939
Jeff Everhart: you know very for both.

48
00:07:57.070 --> 00:07:58.490
Fran Agulto: So with C Sharp.

49
00:07:58.680 --> 00:08:01.099
Fran Agulto: Do you have experiences awful? You're saying

50
00:08:01.660 --> 00:08:14.929
Jeff Everhart: I don't know I've never worked. It was all right. I came to like it at the end. but i'd much rather be right in javascript to be honest, fair enough.

51
00:08:14.940 --> 00:08:33.090
Jeff Everhart: Yeah. So the second thing is like talk. Can you talk with me a little bit about the Times multi-site setup? Because that's always interesting. And we're we're getting a lot more questions from people who are interested in doing things with multi-site. Yes, we are and the last episode Podcast episode we published was with Rob, whom are from

52
00:08:33.210 --> 00:08:39.039
Jeff Everhart: to Saratos, where They they have a multi-site, you know, set up, and they're doing headless work with it. So there's like

53
00:08:39.080 --> 00:08:40.419
Jeff Everhart: I a and I think

54
00:08:40.520 --> 00:08:58.070
Jonathan Harris: a lot of this through line runs through the publishing right like these big magazines or newspapers and stuff like that. So could you talk to me a little bit about what that looked like.

55
00:08:58.860 --> 00:09:04.430
Jonathan Harris: So there was, I think, 80 sites on there, but they are incredibly high. Traffic sites.

56
00:09:04.500 --> 00:09:10.540
Jonathan Harris: And the way that the business was broken up is the various different brands were broken into categories.

57
00:09:10.580 --> 00:09:22.559
Jonathan Harris: I can't remember the name of them. They will call some those already being like, inspire and innovate and all this sort of stuff. That's not very important to to this conversation, but they they were like

58
00:09:22.690 --> 00:09:38.829
Jonathan Harris: the the the low-end male grounds, so like the the sports brands were one. There was low-end female brands that were like chat, and so forth from magazines, and then there was high, like Mary claire and install on that. So that was the those how I mentally broke up in my head.

59
00:09:38.980 --> 00:09:43.129
Jonathan Harris: and we use a multi-site we use it. Use something called a multi- network.

60
00:09:43.290 --> 00:09:51.130
Jonathan Harris: So what what people Don't realize about multi-site is? You can also have this idea of multiple networks of sites.

61
00:09:52.030 --> 00:09:54.710
Jonathan Harris: So if you've ever looked to the webpress database. You have

62
00:09:54.890 --> 00:09:58.909
Jonathan Harris: the naming of this incredibly confusing, but you have sites and blogs.

63
00:09:59.330 --> 00:10:11.759
Jonathan Harris: A site is a network and a blog is a site. If that makes any sense, it's a very, very old naming that we can't change because of that disability but you have this idea, so default multi-site is just one network

64
00:10:11.900 --> 00:10:23.930
Jonathan Harris: of sites. But you could have this idea of multiple networks. So we broke the we had one installation of wordpress. But we had multiple networks in that within that installation. What that meant is you could have

65
00:10:24.120 --> 00:10:28.900
Jonathan Harris: on one network. Some people were super admins, but they weren't superam in a different network.

66
00:10:29.110 --> 00:10:39.479
Jonathan Harris: So we had publishers that were going across all of this, all of the magazines on particular network of sites. They could go in and edit wherever they wanted, but they couldn't go in and edit the

67
00:10:39.870 --> 00:10:43.530
Jonathan Harris: the male brands, or the you know, different kind of.

68
00:10:43.570 --> 00:10:53.089
Jonathan Harris: and that was really important for the business because it it. It meant that, you know you could. You wouldn't have someone from Mary Claire editing soccer world, because that that they they had No.

69
00:10:53.990 --> 00:11:05.819
Jonathan Harris: no, no right to. Yeah. And they have no knowledge about. And for a business standpoint you have. You have an integrity of data that's around some random person. It's on the in this site.

70
00:11:06.110 --> 00:11:14.370
Jonathan Harris: and most I was incredibly useful for them, because they had, like freelances working on the on projects so they could assign to multiple brands so they could do articles.

71
00:11:14.540 --> 00:11:21.830
Jonathan Harris: and it being one sensation of wordpress meant that if we rolled out changes they would roll out across all of them when we push changes out

72
00:11:23.830 --> 00:11:33.680
Jonathan Harris: but it also, and with other problems as well, because of the self hosting and aws. We had database issues. So just everything on one massive database didn't work.

73
00:11:34.340 --> 00:11:43.290
Jonathan Harris: So we then started using a plugin called Hyper dB: which is a plugin that allows you to sha database connections, so you can have this idea in

74
00:11:43.560 --> 00:11:58.909
Jonathan Harris: in in database things of of of reed replicas sometimes called Master enslaved. That's trying to move away from that name for very obvious reasons. It's kind of problematic naming. So if I do use that, it's just. I'm just remembering the all way of saying it. But

75
00:11:59.040 --> 00:12:09.920
Jonathan Harris: you can have read replicas. So basically, you have a database, and then it's it. Whenever you write to the the master database, it will right to the other database as well.

76
00:12:10.060 --> 00:12:11.629
Jonathan Harris: So you have one

77
00:12:12.950 --> 00:12:19.899
Jonathan Harris: master database that that you write to, and you have faster read replicas what they're called

78
00:12:20.210 --> 00:12:26.389
Jonathan Harris: so front-end traffic. When it comes in you can say it if it's coming in on the front end.

79
00:12:26.420 --> 00:12:31.169
Jonathan Harris: just hit the read replicas because those are bigger, faster database instances

80
00:12:31.330 --> 00:12:45.219
Jonathan Harris: and then the the the main database, the master doesn't get taken down. So when you have this thing like what's called a round robin. So you have a single. You have 3 read replicas, and it just on a loop goes

81
00:12:45.330 --> 00:13:00.479
Jonathan Harris: first. Catch. It goes to 1 s it goes 3. So, and you just loop through. So if anything goes wrong, you can actually spin up more instances, so you can have 4, 5, 6, 7, 8, and it would just round Robin if you had. You know what we're getting made today.

82
00:13:00.490 --> 00:13:09.849
Jeff Everhart: It's wild and hyper. dB: was that that was a that was an automatic. Was that a that's what wordpress.com uses. So so what we're presscom was written on.

83
00:13:10.170 --> 00:13:11.980
Jeff Everhart: Okay, and so

84
00:13:12.110 --> 00:13:18.879
Jonathan Harris: to just to to you the thing which had to really up, because and each network had its

85
00:13:19.470 --> 00:13:22.800
Jeff Everhart: okay. So we had.

86
00:13:22.910 --> 00:13:26.780
Jonathan Harris: We had 4 networks and 4 Ps. Of database service.

87
00:13:28.570 --> 00:13:44.040
Jonathan Harris: So so that and it so we said for site, Id 1, 2, 3 go to this state, based, instance, for for the difference, and we had to have like a manual map, because there's no easy way to map it. We had like a a yaml file that we pass through, and it would. It would go for the different connections. But

88
00:13:44.050 --> 00:14:01.589
Jonathan Harris: and then we had a a global database that installed some global debt that was going across all the networks so that users are stored in their network information network options. What we'll sort no global database. It was a massive instance, and so it wouldn't go down. But that was a single point of failure. I was trying to get to get to work. But yeah, incredibly sophisticated

89
00:14:01.600 --> 00:14:07.409
Jonathan Harris: system, but it also meant that, like we could do separate billing as well. So we had this one instance. But then we could say.

90
00:14:07.460 --> 00:14:16.219
Jonathan Harris: All the traffic goes to this state. But since we can charges to this part of the business and that sort of stuff that's cool, that's: yeah, it was really cool.

91
00:14:16.310 --> 00:14:28.879
Jonathan Harris: Yeah, I'm: i'm. I'm thinking of ludicrous and stuff. So hyperdeb was plug in written for workpresscom, but it was not well maintained. I buged a bunch of people automatic to try and get it outdated. I.

92
00:14:28.890 --> 00:14:39.159
Jonathan Harris: We were obviously using it and finding bugs and stuff with it, and when we tried to upgrade to Php 7. It failed. So some weird and wonderful Php funk, feature or function that we using it didn't work.

93
00:14:40.050 --> 00:14:49.430
Jonathan Harris: we get really frustrated. We for it entirely. And I was like I don't like this because i'm all about open source, and I want to make sure this is available in the world.

94
00:14:49.640 --> 00:14:56.319
Jonathan Harris: So I was about to publish my own version of it, and then I, a friend of mine, J Jj. Who's

95
00:14:56.520 --> 00:15:00.170
Jonathan Harris: awesome if you don't follow him. Do look him up. He is the Maintainer of

96
00:15:00.280 --> 00:15:04.890
Jonathan Harris: Buddy Buddy Press, and a a 1 million other things has been on the project forever.

97
00:15:04.950 --> 00:15:09.060
Jonathan Harris: He had a fork that I called ludicrous dB. That had a few little tweaks in it

98
00:15:09.220 --> 00:15:11.140
Jonathan Harris: my message to him. Privately I was like.

99
00:15:11.210 --> 00:15:13.690
Jonathan Harris: I've like Loki, rewritten. This

100
00:15:13.840 --> 00:15:16.370
Jonathan Harris: it's awesome. This unit test is like this

101
00:15:16.470 --> 00:15:21.160
Jonathan Harris: stuff like. Do you want me to push this to your repo so, and instead of

102
00:15:21.360 --> 00:15:32.139
Jonathan Harris: another for another for another fork like we can just back on this together. And yeah, over the years we've pushed lots of changes to it. We've made sure it keeps up to track with the changes the database classes, and call

103
00:15:32.190 --> 00:15:36.329
Jonathan Harris: and maintain it. Because, you know, if anyone's out there using hyperv.

104
00:15:36.350 --> 00:15:45.139
Jonathan Harris: please please use that ludicrous Tb. It's the maintained Iptb is is, you know, 7, 8 years old at this point, and has not received any love from automatic.

105
00:15:45.400 --> 00:15:49.660
Jeff Everhart: Yeah. And there was a there was a third one, too, maybe, like Multi-dB.

106
00:15:49.920 --> 00:15:54.180
Jonathan Harris: Yeah, I mean the this is the this is part of the reason that I was saying like.

107
00:15:54.270 --> 00:16:03.500
Jonathan Harris: I didn't want to be another fork of it like it doesn't really help the problem if everyone just forking it. And I was like, No, I I trust J. To J. Is a good guy

108
00:16:03.860 --> 00:16:15.679
Jonathan Harris: I want, you know. I let's get through this together. And obviously it would have been way easier for me to let you create my rep and just push the code up and forget about it. I have to cooperate with Jj. And you have to talk about some of it. Add some out to me. But I think you know.

109
00:16:15.730 --> 00:16:19.279
Jonathan Harris: Consider that in this all all together is is worthwhile, and and

110
00:16:19.490 --> 00:16:26.260
Jonathan Harris: in in times where I've not had time to focus on it. Jj: Get to it. So you get that massive benefit and a lot of big companies that I've used it. I know

111
00:16:26.320 --> 00:16:30.450
Jonathan Harris: human maids big wordpress agency, and they've contributed back as well like

112
00:16:30.990 --> 00:16:39.509
Jonathan Harris: trying to get community wrangling community to focus on one thing that if everyone just walking. It is is the goal, because especially a lot of like performance tools.

113
00:16:39.530 --> 00:16:43.910
Jonathan Harris: Everyone wants their own thing, and they want the control of it.

114
00:16:43.960 --> 00:16:47.949
Jonathan Harris: But we'll get benefits if we all contribute together, and

115
00:16:48.190 --> 00:16:55.059
Jonathan Harris: if it means having a filter, or a hook, or or or giving users options, configuration, options, so that it can be malleable for

116
00:16:55.110 --> 00:17:07.580
Jonathan Harris: 10 different use cases so just one that adds overhead to me of the maintainer of it. But I the value it adds, of getting people like from human made to contribute to it is well worth the pain in the next it is to maintain.

117
00:17:07.710 --> 00:17:08.899
Yeah,

118
00:17:09.050 --> 00:17:16.570
Jeff Everhart: that's that's cool and so like, yeah, I had a whole separate question about ludicrous dB: and so I think we might as well just skip ahead to that, because, like.

119
00:17:16.680 --> 00:17:36.449
Jeff Everhart: Yeah, we could talk about this forever because it so I I actually use not ludicrous. I think we use Multi dB: but so my previous job I worked at a university where we had a large multi site thing, and you know lots of departments had their sites on there, but students and teachers could also go and create their own sites like it right when I left. I think we had something like

120
00:17:36.470 --> 00:17:39.760
Jeff Everhart: 36,000 sites on this

121
00:17:39.860 --> 00:17:48.360
Jeff Everhart: but like a really not not a ton of traffic like, because at this point it's like student coursework and stuff like that. But it was a very weird

122
00:17:48.540 --> 00:18:07.069
Jeff Everhart: load pattern, because it wasn't so much read heavy as it was like right heavy. So imagine you've got thousands of students who are all have like a course assignment. Do in that same week, and they're all just like right into this one database. So that's what we ended up doing was sharding this database out using. I think Multi dB:

123
00:18:07.770 --> 00:18:11.870
Jeff Everhart: And then I had looked at 1 point at before I left it, switching to ludicrous

124
00:18:12.120 --> 00:18:18.289
Jeff Everhart: and also looked at because a lot of that sounds super complicated.

125
00:18:18.320 --> 00:18:24.819
Jeff Everhart: but I did some exploratory work, and so you said you were using aws for this. Were you all using Rds for the database piece.

126
00:18:26.120 --> 00:18:30.420
Jonathan Harris: I think we started off a rods, and we used aurora.

127
00:18:30.480 --> 00:18:34.880
Jonathan Harris: which is okay, so that has the read replication built in.

128
00:18:35.330 --> 00:18:39.920
Jonathan Harris: So it does some clever thing under the herd around like When

129
00:18:39.990 --> 00:18:54.069
Jonathan Harris: things are written to the database it creates like a big file, and it like somehow syncs to bin file between multiple database servers. It doesn't it doesn't it doesn't trigger an actual right, and I just copies the underlying thing to write to the file system.

130
00:18:54.520 --> 00:18:59.910
Jonathan Harris: I would probably explain that really awfully. It's been like 7 years since I thought about any of this stuff, but completely honest.

131
00:18:59.950 --> 00:19:23.219
Jeff Everhart: It does a bunch of that read replica stuff, and that's what I was going to say. It's like a lot of this sounds super complex. But when I went and explored this with aws. It was kind of pricey to use the Rds service, but I but I think I was able to do it with maybe just

132
00:19:23.230 --> 00:19:33.519
Jeff Everhart: vanilla vanilla, my my SQL like that that click one button. Specify your secondary. Read replica, and it would handle all of that

133
00:19:33.660 --> 00:19:42.229
Jeff Everhart: stuff 40. And that's how we ended up sharding ours. I don't forget how we did it, but it was like, yeah, we basically look at the blog Id. And then you know that

134
00:19:42.660 --> 00:19:47.420
Jeff Everhart: map to us for a particular database? but that's really neat. So like

135
00:19:47.590 --> 00:19:56.199
Jonathan Harris: a large multi site like that I would strongly recommend not running more than about a 1,000 tables for a single database, because then

136
00:19:56.600 --> 00:20:12.890
Jonathan Harris: back out some stuff and restores become an absolute nightmare if you've got, because consider an average website as what? 11 to 13 tables time by 40,000. You're talking hundreds of thousands of and it's like it's somebody completely 30 gigs.

137
00:20:12.980 --> 00:20:21.289
Jonathan Harris: Yeah. Someone completely box their site, and they say, oh, can you restore it? And you've got to restore 30 GB, and then it 2 more hours.

138
00:20:21.530 --> 00:20:25.040
Jonathan Harris: It might take more flowers, and then a ton of people might lose their data.

139
00:20:26.050 --> 00:20:44.339
Jonathan Harris: whereas you can. You can do like, because all wordpress, take what it's like. Tables are prefixed with a number, so you can do like it's like Wp underscore to. You know that side Id. You can just do a very simple bit of rejects to get that Id and then just do pass switching, depending on the Id. So if the number is above the number 1,000,

140
00:20:44.350 --> 00:20:51.089
Jonathan Harris: then go off to date by instance, 2 and 3 and 4 and 5, and then you can even do another level of automation on top of that of saying.

141
00:20:51.570 --> 00:20:52.310
if

142
00:20:52.520 --> 00:20:54.060
Jonathan Harris: database 5

143
00:20:54.170 --> 00:21:12.099
Jonathan Harris: as has reached this limit of a 1,000 tables, spin up a new database instance, using terraform or some other automation, automatically add it to the pool, and then it automatically will scale yeah, forever at that point, as long as you don't have much of that happening as well.

144
00:21:12.780 --> 00:21:16.690
Jonathan Harris: And then you're you're spreading concerns at that point, because, as I, as I say, you know.

145
00:21:17.540 --> 00:21:30.389
Jonathan Harris: if you're going to get a tax that you get Ddos and someone you know the database is a is a massive point of failure for work, right? And this you're using you. You have to have multiple levels of mitigation or object caching, c. The ends, or this sort of stuff. But

146
00:21:30.570 --> 00:21:49.739
Jonathan Harris: if someone's hitting your origin continually spamming your your database, that's it's gonna take your side down because some port at some point, the number of connections or long, especially if they, especially as as wordpress searches totally unoptimized. All you need to do take a site down is just write a script to do every dictionary word against wordpress search

147
00:21:49.910 --> 00:21:51.990
Jonathan Harris: almost impossible to cash

148
00:21:52.060 --> 00:22:11.970
Jonathan Harris: and it's gonna it's gonna hit the the server. Really. So again, this is i'm not. I'm telling secrets here. That wordpress like, you know. Anyone with a a brain could probably work this out pretty simply, but i'm! Unfortunately, search becomes a massive vector for being attacked, unfortunately.

149
00:22:12.720 --> 00:22:21.790
Jeff Everhart: And I think there did did you have? I don't know if you followed press books at all. Did you read about there?

150
00:22:22.230 --> 00:22:28.130
Jeff Everhart: They they're press books, they they've kind of forked wordpress into like a

151
00:22:28.380 --> 00:22:31.079
Jeff Everhart: a more book publishing format?

152
00:22:31.400 --> 00:22:39.490
Jeff Everhart: and so it's for for making like open educational resources, right? Like, I guess. Books. Yeah, I mean the books press books, right?

153
00:22:40.540 --> 00:22:59.640
Jeff Everhart: But they they have a giant multi-site setup, and they they did. You know some migration exactly what you said like they just couldn't couldn't handle it on one database server and ended up, you know, doing, I think, actually using ludicrous dB: and they maybe millions of tables or something. They ended up migrating, or maybe a 1 million sites. Even.

154
00:22:59.650 --> 00:23:07.900
Jeff Everhart: It was really really impressive to see Harley. Have you ever seen anybody do this with just one wordpress? Instance? Or is it mainly multi-site that

155
00:23:07.980 --> 00:23:10.210
Jeff Everhart: kinda falls prey to this.

156
00:23:12.450 --> 00:23:21.929
Jonathan Harris: I've I've seen people use ludicrous d be for single-site instances for the reed replica

157
00:23:22.170 --> 00:23:32.700
Jonathan Harris: If you're doing it for a single yeah, this: yeah, at that point you just you having multiple database instances like single tables, and then that like overhead, it's a pain in the neck at that point.

158
00:23:32.990 --> 00:23:36.369
Jonathan Harris: but you can do read replicas by just using Dns.

159
00:23:36.520 --> 00:23:38.319
Jonathan Harris: So you can say

160
00:23:40.190 --> 00:23:49.010
Jonathan Harris: You know you have one Dns endpoint. That's like Mysql dot space monkey.com, and then then you then you can have something that's sitting there in between. That's doing the

161
00:23:49.590 --> 00:23:53.040
Jeff Everhart: like engine eggs for you, then

162
00:23:53.450 --> 00:24:05.219
Jonathan Harris: some, some some again, not a Person's answer. I don't know some, some witchcraft happening there that's doing the you could use Engine X. Jeff: yeah, you could

163
00:24:05.320 --> 00:24:10.690
Jonathan Harris: some, some, some magic. I don't know and you can do that without meeting through to Chris deep.

164
00:24:11.140 --> 00:24:12.780
Jeff Everhart: Oh, hypervis!

165
00:24:12.850 --> 00:24:14.530
Jeff Everhart: Oh, wow! That's nuts!

166
00:24:14.650 --> 00:24:20.099
Jonathan Harris: So what you want to know about database stuff. Have you heard the performance projects working on

167
00:24:20.310 --> 00:24:38.910
Jonathan Harris: sqlite implementation for work press? I did see that. Yeah, that was really cool. So yeah, go for it. I mean for those that don't know so yeah, obviously standard wordpress uses mysql or ria dB: for its database infrastructure.

168
00:24:38.920 --> 00:24:48.819
Jonathan Harris: But because the database layer is kind of abstracted a little bit you can. You can, with a little bit of effort, use a different database type. So it's sequel light

169
00:24:48.910 --> 00:24:50.860
Jonathan Harris: is a very

170
00:24:51.810 --> 00:24:58.720
Jonathan Harris: not very resource intensive SQL like database that actually ships with Php.

171
00:24:58.880 --> 00:25:12.869
Jonathan Harris: So it's under the hood, the Php. Uses it for some stuff. it's actually what what you're if you're running, Mac the database layer, and many apps it's using it's like super super low lightweight database, right?

172
00:25:13.020 --> 00:25:21.699
Jonathan Harris: And what this means is If if you can use wordpress with sqlite, you don't need a that a different database server. You can literally run

173
00:25:21.960 --> 00:25:25.710
Jonathan Harris: wordpress just with vanilla Php on your site.

174
00:25:26.050 --> 00:25:36.679
Jonathan Harris: and what that means as well is, I think, Matt mon, and we demoed it in his presentation. There's this new thing called wordpress playground, which is

175
00:25:36.720 --> 00:25:47.069
Jonathan Harris: a javascript instance of wordpress. So you don't need any database or anything at all, you can actually run it on your local machine, using

176
00:25:47.220 --> 00:25:50.330
Jonathan Harris: what that's doing, is it's using

177
00:25:50.490 --> 00:26:04.559
Jonathan Harris: a horribly Mis, explain this, but let me stick with it. It's like a it's like a a web assembler allows you to transpile php into javascript on the fly.

178
00:26:04.590 --> 00:26:05.740
Fran Agulto: because

179
00:26:05.870 --> 00:26:14.649
Jonathan Harris: and because you're transplanting, Php. And because you don't need a database because you're using sequel light, you can literally run an instance of wordpress in your browser.

180
00:26:14.890 --> 00:26:23.830
Jonathan Harris: That is so that technology is so freaking cool and opens up so many different options for people. I mean, you know.

181
00:26:24.030 --> 00:26:42.700
Jonathan Harris: Wp. Engine has amazing options around like having staging environments. But I imagine having an environment. Imagine you're testing a a Pr. Or a a patch or something, and you can click a button and it automatically spins up. Your instance applies the patch to it, and you can be playing around this instance. Score around it as much. You don't break it. Close the browser window, and it's gone like

182
00:26:42.710 --> 00:26:45.780
Jonathan Harris: making wordpress that level of portable.

183
00:26:46.100 --> 00:26:59.440
Jeff Everhart: The sky is a limit when it comes to that. That's that's that's that's missing like I I wrote, I I I have one headless starter that I had, and it was like somebody was like this is great, but

184
00:26:59.760 --> 00:27:15.320
Jeff Everhart: i'd really like. I don't know anything about wordpress. I'm into Astro, but I don't know anything about wordpress like. Is there like a playground like, how do I get started, and it was like, Well, you got to download this and like maybe I can give you an export. Then you've got to import it somewhere like, I can't, really, just

185
00:27:15.670 --> 00:27:22.880
Jeff Everhart: before this. Yeah, I mean, I can't really just add you as an editor to my thing without you also being able to break it.

186
00:27:23.000 --> 00:27:35.839
Jeff Everhart: And so like this. This, I think, will solve a lot of problems and lower the barrier for people who just want to explore and learn and stuff. And I think that's amazing. That's cool thing is need to, just because, like

187
00:27:36.310 --> 00:27:39.890
Jeff Everhart: I mean that. Imagine the resource imprint of wordpress

188
00:27:40.250 --> 00:27:45.980
Jeff Everhart: and like, I don't know. If you want to think about the carbon to run all those database servers that could now be.

189
00:27:46.060 --> 00:28:04.860
Jeff Everhart: go away and like some people, i'm sure we'll still want or need a full. You know, Mysql implementation. But I can imagine all how how many work per sites are just statics static that will sign on your High Street, or, you know, like the number, or even

190
00:28:04.870 --> 00:28:11.689
Jonathan Harris: And so what like wordpress com does I don't know if they still doing this is, if you don't access the site in a certain amount of time, they actually

191
00:28:12.030 --> 00:28:21.380
Jonathan Harris: doubt they. They turn your site into a static site, and then, when you log in again. It will take it. Take a zip file out of an archive, reinstantiate your site.

192
00:28:21.420 --> 00:28:25.959
Jonathan Harris: So it has like this like work as a as automatic idea of like archiving your site.

193
00:28:26.290 --> 00:28:28.079
Jonathan Harris: But if it even if you could

194
00:28:28.220 --> 00:28:40.019
Jonathan Harris: do that with with with converting it to a database, your database to sqlite, and it has a much lower overhead, and we've been with things with equal light, is it's not great for super high traffic sites. It's not great for

195
00:28:40.370 --> 00:28:49.250
Jeff Everhart: searching as well as a bit of a weak spot. As I understand multiple authoring is that I saw at least one comment on that thread about like.

196
00:28:49.280 --> 00:29:01.389
Jonathan Harris: Maybe it was more prone to being overwritten in something. So because you're writing, the database is basically a file on the file system, right? And if you have like 20 people editing it at once.

197
00:29:01.570 --> 00:29:08.390
Jonathan Harris: Then you you have possibility of concurrency issues around files being overwritten, and all that sort of stuff long running Php: Sessions.

198
00:29:08.750 --> 00:29:15.060
Jonathan Harris: I'm not saying it's a perfect solution. It's just still really cool for local development, for very small sites.

199
00:29:15.090 --> 00:29:18.500
Jonathan Harris: maybe little little little side hustles that you got that. You just want it.

200
00:29:19.080 --> 00:29:22.790
Jonathan Harris: Throw up something really quickly, and it's not You don't worry about it scaling like

201
00:29:22.880 --> 00:29:26.639
Jonathan Harris: so so many doors for for developers to these cool stuff.

202
00:29:27.010 --> 00:29:36.770
Jeff Everhart: and it's just really neat to see innovation happening outside of the block Editor. In my opinion. so i'm happy anytime that happens.

203
00:29:36.870 --> 00:29:42.319
Jonathan Harris: it's so at the moment I'm i'm working on the webpress call performance project.

204
00:29:42.350 --> 00:29:44.859
Jonathan Harris: It's pretty exciting to work on

205
00:29:44.940 --> 00:29:50.750
Jonathan Harris: on the core performance project, because, as you say, that the Gutenberg has got so much tension over the last couple of years, and

206
00:29:51.030 --> 00:29:57.159
Jonathan Harris: you know, as as also a maintainer of the good and bad product. I'm really excited for everything that's happened there. But

207
00:29:58.010 --> 00:30:08.869
Jonathan Harris: we're a big community, and there's this space to innovate in multiple vectors in. We we have an opportunity to do some really cool stuff for almost project.

208
00:30:09.800 --> 00:30:28.089
Jeff Everhart: Yeah, that's awesome. So let me let me take a step back because we. We jumped ahead in our questions a little bit, because that that ludicrous TV conversation was so awesome. So you also done some really impressive client work. for some big names like Google on Splash. Could you talk a little bit about some of those projects?

209
00:30:28.390 --> 00:30:32.670
Jonathan Harris: Yes. So last 3 years I've been working on the Google Web Stories. project.

210
00:30:32.690 --> 00:30:42.840
Jonathan Harris: So that if you don't know, web stories are like an open version of you know, Instagram stories and all the of those sort of things that uses and technology to be super super

211
00:30:42.890 --> 00:30:51.079
Jonathan Harris: performant. So we've been building a custom react as a not not using Bloomberg at all completely. Custom, reactive custom rest Api's

212
00:30:51.210 --> 00:30:57.489
Jonathan Harris: to build an editor. So you can create stories. So it's not. You do multiple page stories.

213
00:30:57.750 --> 00:31:04.109
Jonathan Harris: There's so many cool things around that project. The the coolest thing I think we did was around video transcoding. So

214
00:31:04.380 --> 00:31:10.650
Jonathan Harris: where i'm watching out the box doesn't have any video transcoding. So we actually implemented

215
00:31:10.660 --> 00:31:24.900
Jonathan Harris: a library that will transcode videos in the browser. So it uses Web Assembly. I was mentioning earlier. So if you drag in a massive Mp. 4 4 gig by Mp. 4. It will take that the file it will use in in in your browser session will transcode it to

216
00:31:25.110 --> 00:31:33.660
Jonathan Harris: so you can take a full gigabyte file, and it will turn it into like Kilobyte size. File in in the browser and then upload the file.

217
00:31:33.890 --> 00:31:47.389
Jeff Everhart: so. Wow! That's cool. That's pretty cool. I think we need to unpack Web Assembly real quick? Just nobody's Nobody's used it before like. How how would you describe that, Johnny?

218
00:31:47.540 --> 00:31:48.540
Yeah, like

219
00:31:48.870 --> 00:31:59.350
Jonathan Harris: so Web Assembly allows you to run like I would say, like proper code, and pop pop up things in your browser. So it's not just like little javascript things we can manipulate. Dom. You can actually.

220
00:31:59.840 --> 00:32:06.420
Jonathan Harris: with relative ease for very big libraries in to to run in the browser, so you can run

221
00:32:06.750 --> 00:32:21.019
Jonathan Harris: this could be anything right. Rust or Java. Yeah, you can do. You can do like really big things. So the I I've forgetting the library, but it's a really popular library for transcriing. But there's a web assembly version of it.

222
00:32:21.210 --> 00:32:24.899
Jonathan Harris: there's some caveats around it you can't, is it? You have to

223
00:32:25.570 --> 00:32:40.740
Jonathan Harris: send some headers and stuff to to isolate? it. It it creates like sub processes in your browser, so it runs it in isolation. You have to send proper headers, security headers, and stuff to make sure it works.

224
00:32:40.860 --> 00:32:59.379
Jonathan Harris: The reason for this was it. Originally it was open, and then people were using it to you to mind Bitcoin and people's machines. Of course they were. Johnny. Yeah, I like I'm: i'm this this main website. It's really cool. What my theory you use is 100%. What's happening?

225
00:32:59.390 --> 00:33:06.780
Fran Agulto: Wow, man.

226
00:33:06.930 --> 00:33:18.130
Jeff Everhart: Power in the search for extraterrestrial life or something with that extra power. But we're mine in Bitcoin, so you have to jump through some hoops to get it to work. But once you get it working, you can really do some very, very sophisticated stuff

227
00:33:18.510 --> 00:33:31.470
Jonathan Harris: on splash! And another really interesting project. So on. Splash is one of the world's largest like open image a repository, so you can

228
00:33:31.530 --> 00:33:46.839
Jonathan Harris: integrate that into your site. So we brought a plugin that builds on top of Webpress Media library as an extra tab, which is incredibly difficult, because word prices, media, libraries written in this ancient technology called backbone and I'm. Now a Loki expert in this very ancient technology that's 0 use of the world

229
00:33:47.110 --> 00:33:50.970
Jeff Everhart: with the news that they're killing that I've never heard of that. But

230
00:33:51.120 --> 00:33:55.280
Jonathan Harris: yeah, you, you've used it every day for years, because you've

231
00:33:55.550 --> 00:34:12.090
Jonathan Harris: It's not. It's just really like before react. And all these other frameworks backbone was was the hotness and it what wordpress was right to use it 11 years ago. It's not right. It's using it today. It should. We should have rewritten the media library many, many years ago. But no one wants to touch it, because incredibly

232
00:34:12.100 --> 00:34:16.499
Jonathan Harris: difficult problem to solve with accessibility. And and these other problems.

233
00:34:16.960 --> 00:34:27.089
Jonathan Harris: with with the latest version they are playing to rewrite it. And when Matt modern wagon outside I was up in Champagne I was so excited it's the media library is such a key

234
00:34:27.199 --> 00:34:32.769
Jonathan Harris: user interface that needs so much love and needs to be so optimized. Yeah.

235
00:34:32.969 --> 00:34:38.769
Jonathan Harris: anyway. So we added, i'm splash into that. So it allowed you to click on a as a new tap called on Splash. You could search within it.

236
00:34:38.840 --> 00:34:46.869
Jonathan Harris: It woulds inside it as image blocks you could use cover. I'm just it it, and it even works with full size things so you can have your big barrier images, and it's

237
00:34:47.150 --> 00:34:56.380
Jonathan Harris: it. It hot links it from on flash, or you say bandwidth it's a bunch of really cool stuff, but it that's awesome. The best part about it was. We made sure that

238
00:34:57.540 --> 00:35:06.530
Jonathan Harris: when it won't just hot, or loading the pot, linking the images. It also downloaded the a copy locally, and that kept a reference. If you did the activate the plugin. It would

239
00:35:06.570 --> 00:35:10.219
Jonathan Harris: keep the local instance. It would revert back to the old instance.

240
00:35:10.450 --> 00:35:20.019
Jonathan Harris: And that's one of my problems I have with, and i'm not for some shade at the workpress. Industry is a lot of times. You install the plugin, and then you want them to hold into the plugin forever more like. There's no

241
00:35:20.230 --> 00:35:23.389
Jonathan Harris: real path of them like writing you on custom migration scripts.

242
00:35:23.450 --> 00:35:28.709
Jonathan Harris: you know. If you had a if it adds like a short card or a custom block. What happens when you deactivate the plugin? What?

243
00:35:28.810 --> 00:35:41.040
Jonathan Harris: Yeah. Bunch of broken blocks for a bunch of broken, short codes, right? We really, you know, spent months of work to make sure that it wouldn't do that. If you want you to extract yourself from from using the plugin, you could deactivate the bug in and

244
00:35:41.220 --> 00:35:44.729
Jonathan Harris: adding that mapping and stuff was incredibly sophisticated and difficult.

245
00:35:45.100 --> 00:35:50.030
Jonathan Harris: And then Sky scanner. We I did some very interesting work around.

246
00:35:50.820 --> 00:36:05.799
Jonathan Harris: They had a multi site, and they had a bunch of legal documents in the legal pages they need to update. So we, I wrote, Help them write a python script that with connect to the rest, Api, and automatically you know, push changes to their legal pages.

247
00:36:05.820 --> 00:36:12.089
Jonathan Harris: and which is what inspired my talk in 2,009 around authentication

248
00:36:12.250 --> 00:36:19.570
Jonathan Harris: that I do discovery around that to do that, and i's like Well, I've done all this stuff for client work. I might as well a presentation about

249
00:36:19.610 --> 00:36:23.869
Jeff Everhart: Yeah, for sure. You got a double dip. Got a double dip where you can.

250
00:36:24.270 --> 00:36:31.139
Jeff Everhart: and that's that's a good segue to into some of the stuff that you've done on the rest. Api and I've got a bunch of questions, too, and I know we're.

251
00:36:31.620 --> 00:36:44.390
Jeff Everhart: and we're getting up up there in the time, so we can. We can feel free to condense some of this stuff like there's so much stuff that you've worked on like I don't know if this you want to talk about some of the performance features and work on the performance team. I I also know

252
00:36:44.420 --> 00:36:47.970
Jeff Everhart: for our headless listeners. You also wrote a plugin to add

253
00:36:48.330 --> 00:36:59.650
Jeff Everhart: structured block data to the rest. Api, which I think is really cool. and we're working on ways to do that right now with Dwp Graphql. And like. Obviously, you have this deep expertise and

254
00:36:59.720 --> 00:37:07.470
Jeff Everhart: the Api and authentication so like anything you want to talk about, and any of that stuff

255
00:37:07.900 --> 00:37:13.509
Jonathan Harris: My experience of headless is in 2,017. I wrote a project for a large social network.

256
00:37:13.770 --> 00:37:25.889
Jonathan Harris: that you you that you know that you're probably on. I can't talk about, but it's it's it's blue. I'll give you that

257
00:37:26.370 --> 00:37:46.590
Jonathan Harris: and it's not Twitter, so that that's not. That's my first thing. Hmm. Twitter, or better so at the time we were I some customer, so we're building a a a site for them. It was a headless site. It was reactors very, very early days of react as well. and

258
00:37:46.600 --> 00:37:51.270
Jonathan Harris: again we had to write a custom. I wrote for that for the first header site. I did.

259
00:37:51.410 --> 00:37:55.420
Jonathan Harris: we have to write a very custom login process for

260
00:37:55.540 --> 00:38:07.910
Jonathan Harris: That's Blue Social network. You might imagine, that use like Jwt tokens and and that providers login and stuff like that. So and that incredible amount of stuff from that. And

261
00:38:08.480 --> 00:38:11.979
Jonathan Harris: typically when I contribute to something, it's like, I

262
00:38:12.190 --> 00:38:26.680
Jonathan Harris: I did learn it very deeply, and then I turn around and go. Oh, crap! I'm. Now the guy that knows the most in the world about this, so I probably should start pushing this information back in the world I have the I if that's a responsibility at that point that that sort of stuff, the rest Api team

263
00:38:26.690 --> 00:38:34.680
Jonathan Harris: did an amazing job, and the rest. Api. Is. It's just freaking awesome at the code is so solidly written like this. It's obviously written with such

264
00:38:34.990 --> 00:38:38.939
Jonathan Harris: architecture in mind. But a lot of that team was really burnt out of the time.

265
00:38:39.130 --> 00:38:49.930
Jonathan Harris: all right. So they spent literally years pushing this stone up the hill, and a lot of them left and and left it with basically 2 maintainers, and I was like I I can help here. I

266
00:38:50.060 --> 00:39:01.770
Jonathan Harris: even if it's just, you know, answering tickets and and helping room stuff. I I will help wherever I can. So yeah, I've been maintaining the rest. Api for for a number of years with Gutenberg being so rest.

267
00:39:01.870 --> 00:39:11.050
Jonathan Harris: but you know, restful, and in it's reaction. I've it's been so important to do one of the things that I've been a really well advocate for is

268
00:39:11.700 --> 00:39:25.010
Jonathan Harris: is making the rest api useful for everything. So you know, like it's all very good, well and good. The the the rest. Api's work for Gutenberg, but i'm thinking about your listeners like people who want to use

269
00:39:25.140 --> 00:39:32.320
Jonathan Harris: the rest Api for for headless, for their own plugins and stuff like that. Just building it for one use. Case is not, really.

270
00:39:32.740 --> 00:39:46.020
Jonathan Harris: It's not really funny to the community, and it's kind of short-sighted because if you just build it, if you just build your rest. Api for one client. What happens when there's another client, You know, when when Google works, not a thing anymore, in 10 years time we're using Guten by

271
00:39:46.320 --> 00:39:57.489
Jonathan Harris: 30, or whatever is, and it's not. It's using a completely different technology. Writing ourselves into a corner of just assuming it's going to be. This one client is going to be in Javascript.

272
00:39:57.660 --> 00:40:04.079
Jonathan Harris: It's full hardy, and we need to remember this is a multi-generational project. We we're 20 years into work.

273
00:40:04.210 --> 00:40:18.239
Jonathan Harris: That's Why it's not stopping anytime soon, right in in 10 years time. Whenever I think about anything I write anything I push into call, i'm thinking about we could be dating this code in 20 years time like that's not insane to say.

274
00:40:18.420 --> 00:40:26.460
Jonathan Harris: not at all. So yeah, I I i'm. I'm real advocate for for you know users and stuff like that one of the biggest

275
00:40:27.120 --> 00:40:31.080
Jonathan Harris: I'm trying to fill gaps in the rest. Api at the moment. So one of the the

276
00:40:31.260 --> 00:40:36.010
Jonathan Harris: the things that were really bugging me were like menus, one in in in. So I added menus.

277
00:40:36.320 --> 00:40:43.399
Jonathan Harris: But many, you know, menus and menu items have different issues around security, because you never know when a menu is being used, or if it's public or not.

278
00:40:43.610 --> 00:40:46.779
Jonathan Harris: I don't know post or a page, Can you can assume that it's

279
00:40:47.010 --> 00:40:53.410
Jonathan Harris: public, whereas a menu, it might be on a hidden page might be drafted. It may be

280
00:40:53.710 --> 00:41:09.660
Jonathan Harris: on a hidden page where it's like you got, an it's internal Internet. It's got like redundancies, or you have no idea what the many items could say. So you've got to treat menu items as sensitive data, which is a bit annoying, because I would love to have made the data public, and it's assumed it's public from this from the start.

281
00:41:09.820 --> 00:41:14.970
Jonathan Harris: Unfortunately, the men use endpoint. I have to put authentication on it. So you have to be logged in to be able to.

282
00:41:15.140 --> 00:41:22.900
Jonathan Harris: That's like These are sort of problems that you have when you, when you you can't just assume that all data is public and what you're dealing with

283
00:41:23.390 --> 00:41:27.809
Jonathan Harris: the menus. One I really passionate about been working on the themes and

284
00:41:28.230 --> 00:41:36.320
Jonathan Harris: plugins endpoints as well. So I I to get to the point where the press Api has full feature parity with the Cms. So you can

285
00:41:36.540 --> 00:41:41.570
Jonathan Harris: the moment you can activate themes, and you can activate in install themes within the rest. Api.

286
00:41:41.640 --> 00:41:42.479
Jonathan Harris: So like

287
00:41:42.660 --> 00:41:43.500
Jonathan Harris: you know

288
00:41:43.550 --> 00:41:50.700
Jonathan Harris: what protesters are very poor job around like dependency management. But if you can use the rest Api to say like, oh, we detect this plug in these

289
00:41:50.940 --> 00:42:01.169
Jonathan Harris: click this button to install woocommerce, and it makes the rest Api call, and it just goes away and does that like there's so many Ui experiences that we can do that would be amazing, because you have the

290
00:42:01.730 --> 00:42:12.060
Jonathan Harris: but you also kind of to get rest of you guys in the call. You kind of have to use it through. Yes, I will go and break needs it. So then, that's how we managed to get it in, and that's you might just sneak in by.

291
00:42:12.300 --> 00:42:20.589
Jonathan Harris: But so things can i'm working on the same thing for them to get activate and update, and so themes within the rest. Api

292
00:42:20.680 --> 00:42:36.890
Jonathan Harris: at that point where somewhat feature parity with with all the functionality in call. And I really hope somebody listen to this comes along and says right. We're done with standard wordpress user interface. We're going to rewrite it all in react. We've got enough rest, Apis, that we can do everything, and we can.

293
00:42:36.900 --> 00:42:41.349
Jonathan Harris: even if you just use it as like a remote control, so you could use, You could have

294
00:42:41.960 --> 00:43:00.820
Jonathan Harris: recent software that sits there. You connect it to your various webpress sites using to work us. Has this idea of application passwords now? So that's some functionality. We worked on so you could. We could register your your remote client, and you could, you could, you know, manage all your sites. You could get notifications. You could push things like.

295
00:43:00.830 --> 00:43:06.479
Jonathan Harris: There's so many option opportunities to the rest. Api. And i'm just i'm excited to see what the community does with it, and then

296
00:43:06.740 --> 00:43:10.379
Jonathan Harris: hope it's open source on that I can use it, and it's not not find some sort of payable.

297
00:43:10.690 --> 00:43:12.349
Jeff Everhart: but yeah, that's one.

298
00:43:12.580 --> 00:43:26.709
Jeff Everhart: Sorry I was just gonna say, I mean, that's exactly what I thought was like when you were said, oh, we're almost a feature parity. I was like great. Now we can rewrite all the user interface of the users like it's just it's just some of these pieces. Just need a little bit of love and attention like now dating

299
00:43:27.760 --> 00:43:34.289
Jonathan Harris: and the last thing like that I want to talk about is like the one of the things that's not in the rest. Api: Our block data.

300
00:43:34.360 --> 00:43:41.450
Jonathan Harris: so like, okay, people don't know blocks are still just like blob of HTML comments, and it's

301
00:43:42.160 --> 00:43:44.250
Jonathan Harris: a pain like it's it's awful like

302
00:43:44.390 --> 00:43:56.549
Jonathan Harris: from a visually. It doesn't look great and you can't unless you instantiate a bunch of like no like drop Gutenberg libraries. You can't easily pause that into usable data.

303
00:43:56.850 --> 00:44:02.019
Jonathan Harris: but there are there is some stuff in call already. It allows you to turn those comments into

304
00:44:02.270 --> 00:44:03.829
a massive Jason object.

305
00:44:04.150 --> 00:44:12.880
Jonathan Harris: So I've written a plugin that basically says, right, convert the block into Jason Object, Render it out, and then make this

306
00:44:12.900 --> 00:44:14.650
Jonathan Harris: data available as Jason

307
00:44:14.810 --> 00:44:21.950
Jonathan Harris: once it's in Jason, then you have some amazing opportunities from a headless perspective. Right? So instead of

308
00:44:22.480 --> 00:44:27.740
Jonathan Harris: so, instead of being this massive Hmr block that you don't have to pause and muck around with every time you render the page.

309
00:44:27.850 --> 00:44:43.039
Jonathan Harris: You could use this this plugin to say right for the instead of rendering the content I've now got an a an array of of of Jason objects where this is an image block, and I know the image sources this and the out is this and the

310
00:44:43.050 --> 00:44:58.929
Jonathan Harris: then I can take that, and render that into whatever you know. I'm assuming you'd want to write and react. But you could. You could render it in whatever technology you want, because you have the data in like a Jason format. The sky's a limit you can. You could use python. You could use whatever technology you want and render it out where you want

311
00:44:58.940 --> 00:45:05.090
Jonathan Harris: that that that that's one massive opportunity that Gutenberg is given us to give us structured data

312
00:45:05.510 --> 00:45:13.379
Jonathan Harris: out out of the content of the post before it was just a H. Seem upload that you can do nothing with once. Everything's, blocks, and everything can be passed down. You can then

313
00:45:13.900 --> 00:45:25.269
Jonathan Harris: say it for this block I can render using this from the javascript component. And this is that, and you can. You can. Do you know, if it doesn't do that full back to HTML rendering like there's so many options. And

314
00:45:25.280 --> 00:45:34.180
Jonathan Harris: I just want to sing and shout about this this plugin, and I i'm sure i'm sure it's whatever. But I did it for a client project, and to be fair, I haven't.

315
00:45:34.320 --> 00:45:41.220
Jonathan Harris: I could have been working on web stories and other things. I haven't really had time to work on it. But I do want to look back on it at some point, because again.

316
00:45:41.550 --> 00:45:43.509
Jonathan Harris: with everything being blocks.

317
00:45:43.740 --> 00:45:50.149
Jonathan Harris: this plugin becomes even more useful. So now that now that widgets are blocks, we already have structured data.

318
00:45:50.250 --> 00:45:55.920
Jonathan Harris: also editing you, could you could you could get structured data out of your of your entire page layout

319
00:45:56.180 --> 00:46:02.209
Jonathan Harris: like there's so many, so many amazing things that can come out of having structured data around basically every

320
00:46:02.400 --> 00:46:07.549
Jonathan Harris: aspects of not only the content, but even all the customizations like widgets. And for everything can all be

321
00:46:07.660 --> 00:46:11.649
Fran Agulto: cause Jason like, yeah.

322
00:46:11.760 --> 00:46:14.669
Jeff Everhart: because it's a

323
00:46:15.550 --> 00:46:23.529
Jeff Everhart: How does your plugin handle inner blocks? Because that's one of the things that I hear. Internally, people

324
00:46:23.660 --> 00:46:32.289
Jeff Everhart: inner blocks work right? Because that's like when you write a block I think there's an inner blocks component, and it's not like registered in the block Jason file.

325
00:46:32.490 --> 00:46:40.430
Jonathan Harris: So so what it does is there's a there's an a property of the Jason object in a blocks, and that will be an array

326
00:46:41.000 --> 00:46:42.660
Jonathan Harris: of nested blocks.

327
00:46:42.700 --> 00:46:45.010
Jonathan Harris: But I can that can go

328
00:46:45.760 --> 00:46:48.449
Jeff Everhart: Mo: so do all the levels now.

329
00:46:48.530 --> 00:46:49.709
Jeff Everhart: Okay. So

330
00:46:49.770 --> 00:46:50.859
Jonathan Harris: imagine

331
00:46:51.190 --> 00:46:53.319
Jonathan Harris: imagine you've got like a columns

332
00:46:53.480 --> 00:46:55.000
Jonathan Harris: layout, right?

333
00:46:55.050 --> 00:46:58.780
Jonathan Harris: So that that's a column block with the in a block of a column.

334
00:46:58.910 --> 00:47:00.919
Jonathan Harris: and then within that you could have.

335
00:47:01.150 --> 00:47:10.260
Jonathan Harris: and a paragraph, and then you have an image, and, like I could be like to get incredible levels of.

336
00:47:11.460 --> 00:47:18.569
Jonathan Harris: I can't do much about that in my plugin, because that is just how it is. That's how it the data is structured. But it can.

337
00:47:18.660 --> 00:47:32.029
Jeff Everhart: You can get pretty nuts off for a while. Yeah. And I think when we talked to Rob from the Ceratos last time, I think his his team. They're using block data, but I think that they might be. They might have wrote their own parser

338
00:47:32.040 --> 00:47:41.260
Jeff Everhart: and react like using react. But I think the solution that they came to like mitigate some of that problem was like they just

339
00:47:41.310 --> 00:47:51.929
Jeff Everhart: disabled a bunch of like the layout blocks, so like you couldn't add columns, and that everything you know you could assume with some degree like how many levels this was going to go, because

340
00:47:52.040 --> 00:47:56.659
Jonathan Harris: the the blocks weren't there. The biggest problem is around. So

341
00:47:57.260 --> 00:48:05.710
Jonathan Harris: look, Most block attributes are stored in that in HTML comment. So when you you have a HTML comment, you can have like attributes which is like a Jason object.

342
00:48:05.770 --> 00:48:09.929
Jonathan Harris: But those are easy to pass because I can just grab those out of the HTML comment. Yeah.

343
00:48:09.980 --> 00:48:15.520
Jonathan Harris: But with blocked. You can also have attributes that are within HTML:

344
00:48:15.800 --> 00:48:18.720
Jonathan Harris: So for the image block the source is stored.

345
00:48:18.860 --> 00:48:24.169
Jonathan Harris: You get that by pausing the HTML of the image tag and getting the source attribute.

346
00:48:24.280 --> 00:48:27.420
Jonathan Harris: So in Php I've had to instantiate a library called

347
00:48:27.590 --> 00:48:29.110
Jonathan Harris: the Query, I think it's called

348
00:48:30.750 --> 00:48:32.879
Jonathan Harris: P. Query.

349
00:48:33.030 --> 00:48:36.699
Jonathan Harris: and it. It has to pass the HTML and say.

350
00:48:36.760 --> 00:48:43.230
Jonathan Harris: Find the image tag, and find me the source. Attribute for this, and that's incredibly resource intensive because

351
00:48:43.530 --> 00:48:58.189
Jonathan Harris: it's not redesigned to part Xml on the fly right. And one of the things I need to do to improve the bug in ideally Gutenberg would not store its attributes in HTML, because that's pretty nasty way of doing it. I don't. I understand why it was done.

352
00:48:58.200 --> 00:49:06.880
Jonathan Harris: But from a data integrity standpoint it's a bit weird for me. I don't in some way it's done that way. I'm sure there's a technical reason and back to compatibility, and it was probably the reason.

353
00:49:07.080 --> 00:49:14.709
Jonathan Harris: but it makes it incredibly difficult to pause it in different languages, because, unless it still doesn't attribute that it's easy to you, you have to do the HTML and stuff

354
00:49:14.790 --> 00:49:27.560
Jonathan Harris: so i'm my plans. If I get some time in February and one of the work of Asia and one of my flight, and i'm gonna have nothing better to do. I probably won't watch the films. I'll probably hack on trying to add some caching and performance work on that

355
00:49:28.080 --> 00:49:40.559
Jeff Everhart: very cool and and the reason like I I know that I I just kind of wonder about the HTML comments thing, and why that choice is made, and somebody described that to me recently was like that was a backwards compatibility thing

356
00:49:40.580 --> 00:49:46.950
Jeff Everhart: like because I look at the structured block data, and i'm like this kind of seems like the better way to store this

357
00:49:47.100 --> 00:49:52.549
Jeff Everhart: like this is a better representation than I think what the HTML is. And do you have any insight on that like

358
00:49:52.610 --> 00:50:00.560
Jonathan Harris: Why, that the comment decision was made as a as I, as I maintain, a good by project. Yeah. So the reason was is so that you could

359
00:50:00.590 --> 00:50:05.539
Jonathan Harris: upgrade to Gutenberg, edit your site, and then, if you didn't like it, you could downgrade.

360
00:50:05.630 --> 00:50:08.670
Jonathan Harris: So the downgrade process was not

361
00:50:08.930 --> 00:50:25.660
Jonathan Harris: my only the my biggest issue is that makes sense. It comes to post content, right? If you was still the classic editor you want to downgrade. Unfortunately, those Hmo comments now being used for everything. The full site editing is actually using 2 hidden post types called

362
00:50:26.340 --> 00:50:36.250
Jonathan Harris: like Wp. Layout and W. I don't know the Wp. Template, and they also have that HTML comment system. That's because because of

363
00:50:36.640 --> 00:50:40.250
Jonathan Harris: the technology they've built. That's it makes sense to do that. But

364
00:50:40.360 --> 00:50:50.999
Jonathan Harris: and an idea where we would have not create, not create a new custom post, that we would create a new database table, that Jason blob, and does this like properly, and doesn't a scalable way

365
00:50:52.100 --> 00:50:54.950
Jonathan Harris: It wasn't done that way. And I

366
00:50:55.070 --> 00:51:02.159
Jonathan Harris: Yeah, I would. I would've done it different. I understand why they did it that way back back was compatible with all this stuff, and it's easier to to do. But

367
00:51:02.910 --> 00:51:11.319
Jonathan Harris: at some point I think there's going to be some enterprise person enterprising, that goes out. That will strip all that data out of the post table and create a new table that

368
00:51:11.490 --> 00:51:28.709
Jonathan Harris: stores it in a in a different way. That's more scalable, I mean, I think. my school has this idea of, like Jason Fields, like a field that's designed to store Jason objects at least Postgres does, and that's query of all too like you can for Jason Blobs. And then say, I want.

369
00:51:28.720 --> 00:51:31.910
Jeff Everhart: you know. Look inside this and find me something with this.

370
00:51:32.130 --> 00:51:35.139
Jeff Everhart: you know, and it's fast. It's very fast. So

371
00:51:35.380 --> 00:51:37.729
Jonathan Harris: one of the biggest problems around having

372
00:51:37.830 --> 00:51:41.809
Jonathan Harris: all the blocks, the markup in the post content is means they're searchable.

373
00:51:42.910 --> 00:51:58.410
Jonathan Harris: So go on any wordpress site now, and search for the word paragraph it. Every single post on your site will show up, because the word paragraph appears on every single in every single block, because the plot has the what is W

374
00:51:58.470 --> 00:52:01.779
Jonathan Harris: Text is in every bit of every wordpress site

375
00:52:02.240 --> 00:52:03.810
Jonathan Harris: so you could. Yeah, if you want to.

376
00:52:03.830 --> 00:52:21.590
Jonathan Harris: I'm going to mess around with it. Yeah, yeah, well go to a very large wordpress site for you. You'll get to do it. We get 40,000 next pages, because it'll be every single place in the site. That's not

377
00:52:22.070 --> 00:52:36.100
Jeff Everhart: so we got just a couple of questions left. Johnny. You still got a couple of minutes. I know we're pumping. Okay, cool. So yeah, I definitely wanted to give you a chance like there was so much cool performance stuff that that you all worked on so definitely wanted to give you an opportunity to share that. Because I think like

378
00:52:36.240 --> 00:52:41.920
Jeff Everhart: anything that just makes wordpress faster is is awesome in my

379
00:52:42.320 --> 00:52:50.239
Jonathan Harris: So in in 2,000 November 2,021 Google and yose. This idea of the

380
00:52:50.270 --> 00:52:57.259
Jonathan Harris: how much project out there as a performance expert I was like, oh, yeah, i'm i'm well up for this, and then

381
00:52:57.670 --> 00:53:03.809
Jonathan Harris: got a team together. The company I was working for to to start contributing to to core. So

382
00:53:03.830 --> 00:53:14.200
Jonathan Harris: yes, and all the other companies been working on these sort of pretty big bang things. So I think we've probably seen Google's working on converting all images to webp. Unfortunately.

383
00:53:15.370 --> 00:53:23.859
Jonathan Harris: I said no to that idea. And Google Google team are currently in talks with them to try. And you know, push that in an initiative forward.

384
00:53:23.910 --> 00:53:35.920
Jonathan Harris: I decided to go back to my list of like 60 issues that I found while I was working at time. I just had this massive grocery list of like bugs on issues that bugging me, and I was like.

385
00:53:36.170 --> 00:53:51.599
Jonathan Harris: Oh, what do you want to work on? I'm like, oh, these things that I wrote 9 years ago I just would love all this stuff. How do you keep find this stuff? Yeah, I found it 9 I the the how. All the tickets are man like like what man man has to work for this backlog of

386
00:53:51.640 --> 00:53:55.630
Jonathan Harris: of changes. So I thought, if it's like just

387
00:53:55.660 --> 00:53:59.879
Jonathan Harris: the biggest thing is about how data is loaded in wordpress.

388
00:54:00.040 --> 00:54:00.930
Jonathan Harris: So

389
00:54:01.510 --> 00:54:08.069
Jonathan Harris: if you don't load the data properly, it will do a single database query to get every single one, so i'll give you an example.

390
00:54:08.090 --> 00:54:12.729
Jonathan Harris: Say, say you're on a page where every article is written by a different user

391
00:54:12.990 --> 00:54:24.179
Jonathan Harris: What press would do is every time you loop through. It gets the author information, because obviously sometimes sometimes you render the little avatar in the name excellent article. But it would do a single database query to say.

392
00:54:24.480 --> 00:54:32.409
Jonathan Harris: get me, author, one for the first post and an author to your street. So for every time you were rendering 10 posts. It was doing 10 database queries

393
00:54:32.520 --> 00:54:38.640
Jonathan Harris: incredibly wasteful. We know to start the what all these these these are. So instead of doing it.

394
00:54:39.040 --> 00:54:46.120
Jonathan Harris: a single database query for each one. Just do one database query to get 1, 2, 3, 4, 5, Get get all the users in one database query.

395
00:54:46.350 --> 00:54:57.569
Jonathan Harris: and i'll, and it's massively simplifying stuff, but that's so much of the work I've been doing over the last year. It's just making sure that data is loaded properly in a in a way that makes sense so preemptively loading post matter.

396
00:54:57.800 --> 00:55:12.390
Jonathan Harris: loading terms where we where it makes sense, planning off terms where you don't, you know, for posts that don't have terms, or Meta, or any method associated like hidden post types. Don't don't bother to do the database query for the post met and stuff like that.

397
00:55:14.110 --> 00:55:24.550
Jonathan Harris: it's sort of a and no better example in this is like for the rest Api. So we did tons of work around running. So use a tool called Query Monitor to analyze the number of queries that we went on the page

398
00:55:24.870 --> 00:55:26.739
Jonathan Harris: and a standard

399
00:55:26.890 --> 00:55:33.570
Jonathan Harris: hit. The post endpoint was hitting was getting that 350 database queries.

400
00:55:34.110 --> 00:55:40.840
Fran Agulto: Wow, wow! I was like, even when I did the I run the profile. I was like

401
00:55:40.910 --> 00:55:50.429
Jonathan Harris: i'm sitting in. I'm sitting there going. Whoa! That Doesn't seem right. That seems absolutely not because it was just in tons of places, so it wasn't it wasn't in the office properly.

402
00:55:50.440 --> 00:56:05.929
Jonathan Harris: It often does a permission check to see if the parent post, if you have access to the parent post wasn't learning the parents, like the so many obvious things, and all the changes in a lot of places where one or 2 lines of of code changed. But you I would just see these numbers sort of

403
00:56:06.030 --> 00:56:07.740
Jonathan Harris: pull off off a cliff.

404
00:56:07.850 --> 00:56:12.770
Jonathan Harris: So once you know the data properly, you're you're seeing the data. So I think this one was one

405
00:56:13.460 --> 00:56:18.560
Jonathan Harris: That base was one wrest Api, created by now from 350 to 15,

406
00:56:21.180 --> 00:56:29.330
Jonathan Harris: and then when you're lowering that that if that's not. It's not like, yeah, that's okay. When you step away from your keyboard and sort of guy, right?

407
00:56:29.450 --> 00:56:43.600
Jonathan Harris: I've I've at my beer tonight like this. yeah, it's awesome. So my, and that is similarly around like so the recipient has this idea of like links. So when you have a main object you have like links in it.

408
00:56:43.680 --> 00:56:55.330
Jonathan Harris: So you it so for a post, for example, it will link to like it's, comments. It will link to its revisions, and it's also like a linked data and all that sort of stuff, all the stuff linked together.

409
00:56:55.340 --> 00:57:03.840
Jonathan Harris: But you have this idea in the best Api being the past field. So you can say I just want the Id, and I just want the post content. So you just get a smaller response.

410
00:57:04.380 --> 00:57:08.859
Jonathan Harris: but it was still running all the database queries to get all these this link data.

411
00:57:09.130 --> 00:57:17.120
Jonathan Harris: and that was incredibly wasteful like you, you, you know. In some cases it'd be like 5 or 6 different queries to get all that data

412
00:57:17.740 --> 00:57:22.319
Jonathan Harris: for each post. So every time you get revisions you have to do a single database through to get it.

413
00:57:22.820 --> 00:57:28.159
Jonathan Harris: Just if if you don't pass links in the fields, don't bother to run that. And again we were seeing

414
00:57:28.330 --> 00:57:29.629
Jonathan Harris: it go from

415
00:57:29.930 --> 00:57:31.749
Jonathan Harris: 15 queries down to 2,

416
00:57:31.910 --> 00:57:45.550
Jonathan Harris: and it was like, oh, cool, like, awesome. That's awesome. And considering Google Google is on record. They do index your rest Api's because they all public data and Google will will.

417
00:57:45.590 --> 00:57:49.830
Jonathan Harris: Well, they they They will pause your rest of your eyes, and they will pause your

418
00:57:50.000 --> 00:57:51.840
Jonathan Harris: Rss feeds as well.

419
00:57:52.000 --> 00:58:10.139
Jonathan Harris: Because Google, you, You're basically given Google and your data in this very user friendly fashion. Why wouldn't they pause it. Why wouldn't they take that data? and if you consider that the the rest Api is getting hit by Google, it might be hit by users. If you're using something like infinite scroll, or you're using a headless site.

420
00:58:10.150 --> 00:58:15.929
Jonathan Harris: making those best Api's as perform as possible. Like is really important. It's important.

421
00:58:16.270 --> 00:58:28.429
Jeff Everhart: And it's that type of work I feel like that is super valuable, because, like that, like you said, to go from 3, 50 to 50 to like that's a huge improvement. Yeah, but it's not like

422
00:58:29.220 --> 00:58:31.969
Jeff Everhart: I don't know, like I look at some of that. Work, and i'm like

423
00:58:32.630 --> 00:58:41.499
Jeff Everhart: people. Don't think that's cool like. That's the sad thing. It's like performance. Nerds like people like us were like, oh, wow! That's awesome, but it's not.

424
00:58:41.540 --> 00:58:50.230
Jeff Everhart: It's not splashy. It's not like check out this new, cool, new feature. so I'm: I'm like super height that that stuff is getting worked on. So

425
00:58:50.410 --> 00:58:52.640
Jeff Everhart: thank you to you and the team for

426
00:58:52.740 --> 00:58:54.229
Jeff Everhart: yeah, spearheading that.

427
00:58:54.950 --> 00:59:06.780
Jonathan Harris: And I and why I try and do with my Twitter account. I try and make these some of these numbers sexy like trying like sharing graphs of like. The the number was here and now it's down here like that, and and people are like.

428
00:59:06.790 --> 00:59:25.359
Jonathan Harris: Why is that important? Because it's like. Well, if you're getting a 100,000 requests 100,000 times 350, you can take your database server down. Yeah. And and having work for large, you know, a big you know somebody's enterprise clients who who who manage to upset some people

429
00:59:25.380 --> 00:59:31.769
Jonathan Harris: people to try and did us your site. They they will attack your side by coming tons of traffic at you.

430
00:59:31.900 --> 00:59:33.959
Jonathan Harris: and that, you know.

431
00:59:34.190 --> 00:59:38.630
Jonathan Harris: making those numbers smaller, will will massively mitigate those sort of problems

432
00:59:38.640 --> 00:59:56.540
Jonathan Harris: instead of it being a 1,000, a 100,000 requests, it might, they might need to do 200,000 request or a 1 million requests, and then the the hackers resources ends up, being diminished because they don't have service to do this sort of stuff, so that's when it becomes important. It's. It's not a sexy number in itself, but what it means for you. And

433
00:59:56.550 --> 01:00:06.559
Jonathan Harris: yeah, it means you can turn database server off. You can lower your your plan. So you don't need to have to be on the Enterprise plan for some hosting company like Wp. Engine.

434
01:00:06.580 --> 01:00:15.589
Jeff Everhart: i'm. It's good. It's good. It's good.

435
01:00:16.190 --> 01:00:26.949
Fran Agulto: Go ahead. No, I I was just gonna say real quick, Jeff. This reminds me a lot of the issues we solve internally when people like you know, Johnny, like lowering that

436
01:00:27.160 --> 01:00:37.000
Fran Agulto: sir, betting your wordpress server. So you don't d toss it that happens in headless with next Js when you're like pretty fetching and getting getting this in the

437
01:00:37.080 --> 01:00:49.300
Fran Agulto: getting the static paths, remember. And and you're taking because you're asking wordpress for all that stuff, and like, I said, it's it's. It's important that we optimize these things that are unsexy.

438
01:00:49.320 --> 01:00:52.190
Fran Agulto: because at the end of the day these unsexy things.

439
01:00:52.480 --> 01:01:05.499
Fran Agulto: these are the things that most people, when they have like a business critical site, are having issues with. But it's just not on the front end. It's not on the yeah. So, anyway, it's not a feature.

440
01:01:05.530 --> 01:01:17.340
Jonathan Harris: I think I think people, I think, assume that the rest Api is a back end feature that it's just for good work, and it's, and it's never going to be hit publicly. But with the with the surgeons of the headless stuff that is not true.

441
01:01:17.350 --> 01:01:25.820
Jonathan Harris: Tons of traffic is hit or hitting these pages, we shouldn't we shouldn't need to use, c. The ends and stuff to protect against that. It should just scale out of the box

442
01:01:26.380 --> 01:01:35.250
Jeff Everhart: i'd really love to see like I will. This is probably impossible, but I feel like what would make this sexy to people is, if you were like, all right.

443
01:01:35.770 --> 01:01:47.070
Jeff Everhart: What did that? So on one site one Api call like we made? I don't know 200. We removed 260 database queries If you were to extrapolate that out

444
01:01:47.100 --> 01:02:00.399
Jeff Everhart: in terms of resource, usage, or electricity across every wordpress site. It's probably like, you know, you saved enough electricity in one day to like power. Croatia, carbon footprint lower, like

445
01:02:00.410 --> 01:02:07.609
Jeff Everhart: I. I really feel like there's that that n is large enough that even these small tweaks in the aggregate

446
01:02:07.750 --> 01:02:08.459
Jeff Everhart: like

447
01:02:08.780 --> 01:02:16.919
Jeff Everhart: I I mean, that's just you just made humanity better like I don't know what one of the things we worked on. I I worked on in call was lazy letting images.

448
01:02:17.110 --> 01:02:21.980
Jonathan Harris: So this is the idea of adding, an you can add this little actually to an image and say.

449
01:02:22.030 --> 01:02:27.509
Jonathan Harris: Don't. Download this image until it's in it's in viewport, or is about to be scroll down

450
01:02:27.740 --> 01:02:41.019
Jonathan Harris: that that is incredibly powerful when you think about it. So I traveled around South America and saw some real yeah. And you know, sometimes I was in places where I had 2 G connections.

451
01:02:41.940 --> 01:02:57.100
Jonathan Harris: and I was trying to load the BBC. News homepage, and that's a well optimized page. We fairly got some good engineers there, but I the images went down, and I couldn't see the the page, and it was chewing through my data. I could. I can access it but lazy loading images. It means that the page can render, and it when you ha, when it

452
01:02:57.180 --> 01:02:59.099
Jonathan Harris: can kick in, and when you can get it.

453
01:02:59.230 --> 01:03:00.669
Jonathan Harris: and that makes the webin

454
01:03:00.860 --> 01:03:04.109
Jonathan Harris: a much more accessible place, because not everyone has

455
01:03:04.280 --> 01:03:09.399
Jonathan Harris: this crazy fiveg connections and a a half gig connection that I've got here like

456
01:03:10.160 --> 01:03:10.740
it.

457
01:03:10.930 --> 01:03:22.620
Jonathan Harris: We we are about democratizing, publishing, and I do. I do fundamentally believe in that, and and how people get out of poverty, and how they can make their lives better in these incredibly poor parts of the world. It's information

458
01:03:22.980 --> 01:03:26.369
Jonathan Harris: they're loading a web page about how to get clean water

459
01:03:26.520 --> 01:03:34.950
Jonathan Harris: or health care, or something like that that information could be life-saving in in those in in those developing countries. So

460
01:03:35.120 --> 01:03:36.319
Jonathan Harris: Yeah, I mean.

461
01:03:36.550 --> 01:03:42.650
Jonathan Harris: we we're incredibly privileged in in in the world that we live in, that I just have fast in that. If you everywhere I go I can.

462
01:03:42.670 --> 01:03:49.819
Jonathan Harris: My, my, my local High Street, and there's 10 coffee shops with insane. Internet but that is not the majority of the world.

463
01:03:50.500 --> 01:03:54.009
Fran Agulto: Yeah, that's a good idea. Democratizing.

464
01:03:54.160 --> 01:03:55.680
Jeff Everhart: publishing. Yeah.

465
01:03:55.860 --> 01:04:08.770
Jeff Everhart: So we've got. We've got 2 more questions left, and these are somewhat fun questions. I like to ask this to all of our guests. So if you could wave a magic wand and change one thing about wordpress core that would make it easier to create headless sites. What would it be?

466
01:04:13.910 --> 01:04:14.629
Jeff Everhart: And

467
01:04:14.910 --> 01:04:32.449
Jonathan Harris: And I feel like there's that you've actually suggested 5 things already. I feel like you did already. One thing i'm keen to work on is to make the recipient more performance. So i'm going to. I'm going to try and build a a caching plugin. That's clever, that that will

468
01:04:32.610 --> 01:04:43.000
Jonathan Harris: cash all those requests, and then do caching validation around that. So i'm putting my money where I'm not going to wave. Imagine I'm going to write the code. There you go. You don't need magic.

469
01:04:43.070 --> 01:04:51.740
Jonathan Harris: No, I i'm the i'm the i'm the coolest. So I get the a lot of the things I would have said I would away the magic one. I have had a chance to

470
01:04:51.770 --> 01:04:52.909
to fix stuff.

471
01:04:53.160 --> 01:05:01.479
Jonathan Harris: so i'm going to the money. My mouth is. I'm. On going put myself in public to say this. I'm gonna try and write a plugin that will hash a lot of those those like post and

472
01:05:01.600 --> 01:05:06.339
Jonathan Harris: term endpoints, and then do some clever fashion validation. Oh, that would be super cool.

473
01:05:06.880 --> 01:05:20.820
Jonathan Harris: super cool cause that yeah, yeah, that that would be super cool. For the rest, Api. The other one would be the thing I mentioned before around having blocked data structured block data in the rest. Api. Is that to not be a plugin? I love that to just be in call.

474
01:05:21.260 --> 01:05:30.510
Jeff Everhart: Yeah, I think that would be really cool. I think that would be really cool. and I think to like, I know Jason Jason Balls for a number of kind of like

475
01:05:30.610 --> 01:05:42.249
Jeff Everhart: treaties on, you know, like decoupled that site stuff in the block editor, and I guess really like the the other one. I'm the other sticking point is that it doesn't validate

476
01:05:42.490 --> 01:05:51.029
Jeff Everhart: block data, either, Like if I were to try to post block data right? That's gotta run through the front end. Javascript: Gutenberg thing.

477
01:05:51.600 --> 01:05:52.870
Jonathan Harris: Yeah, it's not.

478
01:05:52.990 --> 01:05:57.020
Jonathan Harris: It's not very decoupled, is it you? You really do still have to, even if you're

479
01:05:57.250 --> 01:06:02.129
Jonathan Harris: it implies you in this javascript. Well, then, you can. You can install these packages you can do it.

480
01:06:02.190 --> 01:06:14.900
Jonathan Harris: But in you know once, if you're you're pushing from a python application, or you know Ruby, or something else that doesn't know anything about the block that you you can't just just assuming that your client is javascript.

481
01:06:15.000 --> 01:06:19.290
Jonathan Harris: especially as our fast technology web technology moves. I think that some wise

482
01:06:19.350 --> 01:06:23.919
Jonathan Harris: and to and in the future, in, when javascript's not the cool new hotness in

483
01:06:23.940 --> 01:06:27.049
Jonathan Harris: 5 years time

484
01:06:27.100 --> 01:06:40.410
Fran Agulto: that assembly? Yeah, hopefully, i'll be retired by them. But

485
01:06:41.140 --> 01:06:42.999
Fran Agulto: do we do? We have to

486
01:06:43.290 --> 01:06:55.119
Fran Agulto: do? We have one question left, Jeff, the the last one that I here for your fun. Question: okay, Johnny. Last question of the podcast. We appreciate you, but I I I got a super grateful for you being on here

487
01:06:55.130 --> 01:07:08.259
Fran Agulto: because this was a whole educational piece for me. I learned a lot about wordpress core and blocks and the database actually for workpress and optimization of rest, because I didn't realize like

488
01:07:08.450 --> 01:07:25.309
Fran Agulto: Jason Ball has the smart cache plugin right now for Wp: graph. Ql: that that gets your data gets it fast and gets it accurate. so that you're not banging your wordpress over to do that on the rest end Stokes, with that that that is super sick. but when you're not

489
01:07:25.320 --> 01:07:28.900
Fran Agulto: doing code and not messing with wordpress, Johnny like

490
01:07:29.120 --> 01:07:30.800
Fran Agulto: for fun. What what do you?

491
01:07:30.860 --> 01:07:32.290
Fran Agulto: What do you do to

492
01:07:33.110 --> 01:07:34.689
Fran Agulto: to decompress? Man?

493
01:07:35.550 --> 01:07:53.049
Jonathan Harris: I love to travel? I've been to 50 countries. At this point I plan to go to another 8 this year. and I love I love. I just love traveling. I've been around a lot of the Us. And Canada as well. So not countries. But I've been like probably 15 States, or something like that.

494
01:07:53.350 --> 01:07:56.599
Jonathan Harris: I love photography as well, so I think

495
01:07:56.930 --> 01:08:06.749
Jonathan Harris: it's a it's it goes along with travel as well, so like taking folks to stuff. I I've seen a a as a Bret. I'm so lucky like I can go to

496
01:08:06.870 --> 01:08:09.459
Jonathan Harris: a European country on a weekend, and it cost me like

497
01:08:09.950 --> 01:08:18.829
Jonathan Harris: 100 bucks to get a flight like it so cheap. It's 2 h on a plane like it's. It's nothing. I can go to another country. It's absolutely amazing. But yeah, travel. I think it's.

498
01:08:18.939 --> 01:08:27.859
Jonathan Harris: It's never not enriched me every time I go I just realizing that, like the well, your your way of living is one way of living and another way of living

499
01:08:28.000 --> 01:08:31.669
Jonathan Harris: particularly traveling around South America. I mentioned it very briefly a minute ago, but like

500
01:08:32.000 --> 01:08:39.859
Jonathan Harris: seeing poverty and seeing that it was incredibly eye-opening, and when we so passionate about making the web performance, because I see

501
01:08:40.359 --> 01:08:55.450
Jonathan Harris: oh, it saves one the second time of my time here in my fast connection that could be the the difference between it loading or not loading in a country where, when you want 2 G connection, so it just yeah got to be reaching to travel

502
01:08:55.540 --> 01:08:59.879
Fran Agulto: the 15 years ago I did a mission trip with my mom

503
01:09:00.380 --> 01:09:09.360
Fran Agulto: to, and this kind of goes on to your point about like just eye opening a place in poverty that there was like. No. We we went to Calcutta, India.

504
01:09:09.569 --> 01:09:22.890
Fran Agulto: which was, I mean, the this number one, the infrastructure in these poor places in India is terrible. But yeah, it just opens your eyes, or, like man, I I come from a we all the 3 of us here come from a great.

505
01:09:22.970 --> 01:09:29.889
Fran Agulto: We have privilege, and that's okay, because we have these tools and these computers our hand to like, Johnny said.

506
01:09:29.899 --> 01:09:47.409
Fran Agulto: make the world a better place by giving more information out through the web and everything like that. So that. That's awesome to hear man and I will tell you this if you ever. I don't know when you're coming back to the States, Johnny, but I you're super cool. If you're ever in Austin, Texas man. That's where I live.

507
01:09:47.600 --> 01:10:00.790
Jeff Everhart: Don't look me up all you know me and grab a I get it. We'll get a wordpress me to pop up where it's

508
01:10:01.190 --> 01:10:10.550
Jeff Everhart: awesome. Well, thank you, Johnny, so much for your time. This has been like France, and I think, super educational, all of us definitely for our listeners.

509
01:10:10.560 --> 01:10:22.750
Jonathan Harris: thanks for listening to me, and I get to know that about wordpress which is my favorite to what to know about. So I I always try this waffle I can. I can just waffle for hours about this stuff. And yeah, if you ever want to happen back on again, i'd be more than

510
01:10:22.800 --> 01:10:36.619
Jeff Everhart: well, I feel like we were sure. Yeah, more stuff. I yeah, there's definitely there. I mean, in there was. We could have done a whole hour on just you know, Chris dB. Or just the rest of the Api so definitely. Well, so we will. We will hit you up

511
01:10:36.770 --> 01:10:54.859
Jeff Everhart: and have you back on again. And if, like, I said, we'll definitely share some links to your projects, your sites and plugins and stuff in the show notes, so can get you a little bit of publicity there. But again, thank you so much for being gracious with your time, and thank you for your work on the rest. Api like, I said. I mean

512
01:10:54.890 --> 01:11:02.869
Jeff Everhart: that probably saved the enough of enough electricity to power Croatia for a day so like that's really that's really cool work and impactful.

513
01:11:03.580 --> 01:11:08.649
Jeff Everhart: All right, Y'all all right. Yeah. Sure's Rock on. Thanks. Bye, bye.