Kassian's IoT Hour
Presented by: Kassian Rosner Wren
Originally aired on October 7, 2023 @ 9:30 AM - 10:30 AM EDT
Let's dig into how you can use Serverless to supercharge your IoT projects! We'll walk through setting up a remote sensor and LED with Cloudflare Workers, Workers KV, and a Raspberry Pi.
Original Airdate: September 21, 2020
English
Tutorials
Internet of Things
Transcript (Beta)
All right. Good afternoon, everyone. Welcome to the IoT Hour. I'm Kassian. And today we're going to be working on, we started working on this recently.
It's a 3Pi network.
We've got a Pi here that has lights on it that lights up different statuses.
We've got our parent Pi that sends out data and does PubSub subscriptions.
And then we've got this third Pi that we haven't set up yet that I'm going to set up today.
And that Pi is going to emulate a sensor and give back data to the parent Pi, which will then be fed out.
So let's get started. So I've already got the image etched.
So I'm going to do is I'm going to cd into volumes.
I'm going to touch an SSH file and that will allow us to SSH in.
The next thing I'm going to do is I'm going to go over to my GitHub repository.
Pi set up. Copy that file.
And then I'm going to paste it.
And then I'm going to edit it. What we're doing here is we're setting this up to run Wi-Fi.
Okay.
So that should be ready. We'll take it out of the third reader. We'll put it in the Pi.
And then we'll power the Pi on. So it's booting up and it's thinking about it and it's connecting the Internet.
While it does that, we're going to go here.
We're going to get rid of this line. Okay.
That's fine. That means it's getting ready. It's thinking about it. I'm going to wait for a little bit.
I'm going to try again. There we go.
I'm going to change the password.
All right.
Now it's done. Getting everything ready to work on.
All right.
We'll talk about what we did last week. Which was set up a Python server. It allowed us to set a test, a warning, and an error color.
We also added the child access.
Got it.
The log for child access. It's not going.
That's okay. Let's let that run for a little bit.
This is probably the biggest package there is.
All right.
A little bit longer than usual.
We are almost done. All right.
Okay.
It's done. Now it's all set up.
All right.
Cool.
That's all set up.
I'm going to stop sharing the screen for a second so I can add this theme.
All right.
That's that. I'm going to go back through here.
All right.
All right. Yes, go.
Okay.
Okay.
All right.
Let's set all that up.
All right.
All right.
All right.
All right.
Back to the SSH. Back to the SSH. Back to the SSH. Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH. Back to the SSH.
Back to the SSH. Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH. Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH. Back to the SSH. Back to the SSH. Back to the SSH.
Back to the SSH.
Back to the SSH. Back to the SSH.
Back to the SSH.
Back to the SSH.
Back to the SSH. You Alright.
All right.
I can't publish from here.
Okay. Okay.
Okay. Okay. Okay.
I see. Okay. So you can't publish on the same client. Okay.
Okay, so that's how we get the data back is we need to have a publisher and a subscriber contacts to us which is not a big deal.
Let's see. Right.
Okay.
All right. Let's see. Okay. Give me five seconds.
Awesome. Like that.
No, we want to do is want to mess with the parents and have it. Maybe change the lights or do whatever, based on the temperature data.
So, let's get the parent.
So we'll close this window. The parent.
Okay. Okay.
Okay.
Okay.
Okay.
Okay. Okay.
Okay.
Okay.
Okay. Okay.
Okay.
Okay. Okay. Okay.
So now we'll have it changed lights. Okay. Okay. Okay. Okay.
Okay.
Okay.
Okay, so we need to do is we need to find the Redis Python, get it to subscribe to the parent.
Yeah. Okay. Okay.
Okay. Okay.
Okay.
Okay. Okay. Okay.
Okay.
Okay.
Okay. So if I'm reading this right.
Okay.
Okay.
Okay. Okay. Okay.
Okay.
Okay.
Okay. Okay.
Okay.
Okay.
Okay.
Okay.
Okay.
Okay. Okay.
Okay.
Okay.
Okay.
Okay. Okay. Okay.
Okay. Okay.
Okay.
Okay.
Okay.
Okay. Okay.
Okay. Okay. Okay. Okay.
Okay.
Okay.
Okay.
Okay. Okay.
Okay.
Okay.
Okay. Okay.
Okay. Okay.
Okay. Okay.
Okay.
Okay. Okay. Okay.
Okay.
Okay. Okay.
Okay. Okay.
So everything's been pushed up to get. Let's talk about what the next time next time I'll have my sensor with me so we'll actually add the temperature and humidity sensor and start pushing data.
We will also start pushing data to the Python client and getting that information.
I will figure out what's going on there over the course of the next week.
Before we. Yeah, before we move forward. Other than that.
Yeah, not just to talk about. So, that's going to be it for the day. And I hope you enjoy the rest of Cloudflare TV programming, and I hope you enjoy the rest of your day.
Thanks. Bye bye. Bye bye.
Take the Internet faster, more secure, and more reliable. Meet our customer, BookMyShow.
They've become India's largest ticketing platform thanks to its commitment to the customer experience and technological innovation.
We are primarily a ticketing company.
The numbers are really big. We have more than 60 million customers who are registered with us.
We are on 5 billion screen views every month.
200 million tickets over the year. We think about what is the best for the customer.
If we do not handle customers' experience well, then they are not going to come back again.
And BookMyShow is all about providing that experience.
As BookMyShow grew, so did the security threats it faced. That's when it turned to Cloudflare.
From a security point of view, we use more or less all the products and features that Cloudflare has.
Cloudflare today plays the first level of defense for us.
One of the most interesting and aha moments was when we actually got a DDoS.
And we were seeing traffic burst up to 50 gigabits per second, 50 GB per second.
Usually, we would go into panic mode and get downtime. But then, all we got was an alert.
And then, we just checked it out. And then, we didn't have to do anything.
We just sat there, looked at the traffic peak, and then being controlled.
It just took less than a minute for Cloudflare to kind of start blocking that traffic.
Without Cloudflare, we wouldn't have been able to easily manage this.
Because even our data center level, that's the kind of pipe, you know, is not easily available.
We started for Cloudflare for security, and I think that was the aha moment.
We actually get more sleep now because a lot of the operational overhead is reduced.
With the attack safely mitigated, BookMyShow found more ways to harness Cloudflare for better security, performance, and operational efficiency.
Once we came on board on the platform, we started seeing the advantage of the other functionalities and features.
It was really, really easy to implement HTTP2 when we decided to move towards that.
Cloudflare Workers, which is the computing at the edge, we can move that business logic that we have written custom for our applications at the Cloudflare edge level.
One of the most interesting things we liked about Cloudflare was everything can be done by the API, which makes almost zero manual work.
That helps my team a lot because they don't really have to worry about what they're running because they can see, they can run the test, and then they know they're not going to break anything.
Our teams have been able to manage Cloudflare on their own for more or less anything and everything.
Cloudflare also empowers BookMyShow to manage its traffic across a complex, highly performant global infrastructure.
We are running on not only hybrid, we are running on hybrid and multi-cloud strategy.
Cloudflare is the entry point for our customers.
Whether it is a cloud in the backend or it is our own data center in the backend, Cloudflare is always the first point of contact.
We do load balancing as well as we have multiple data centers running.
Data center selection happens on Cloudflare.
It also gives us fine-grained control on how much traffic we can push to which data center depending upon what is happening in that data center and what is the capacity of the data center.
We believe that our applications and our data centers should be closest to the customers.
Cloudflare just provides us the right tools to do that.
With Cloudflare, BookMyShow has been able to improve its security, performance, reliability, and operational efficiency.
With customers like BookMyShow and over 20 million other domains that trust Cloudflare with their security and performance, we're making the Internet fast, secure, and reliable for everyone.
Cloudflare, helping build a better Internet.
What is a WAF?
A WAF is a security system that uses a set of rules to filter and monitor HTTP traffic between web applications and the Internet.
Just as a tollbooth allows paying customers to drive across a toll road and prevents non-paying customers from accessing the roadway, network traffic must pass through a firewall before it is allowed to reach the server.
WAFs use adaptable policies to defend vulnerabilities in a web application, allowing for easy policy modification and faster responses to new attack vectors.
By quickly adjusting their policies to address new threats, WAFs protect against cyberattacks like cross -site forgery, file inclusion, cross-site scripting, and SQL injection.