Blog - Yusuke Wada

Screenshot

Cloudflare Meetup Nagoya #3 Hono & Workers AI


Cloudflare Meetup Nagoya #3 Hono & Workers AI

I attended Cloudflare Meetup #3 in Nagoya on October 6. There I did a workshop on Hono and Workers AI as a instructor and got to see three talks. It was very exciting. Let’s see what happened!

Cloudflare Meetup

“Cloudflare Meetup” are meetups organized by the user communities. They are held not only in Tokyo and Nagoya, but also in Osaka, Fukuoka, Niigata, Okinawa, Sapporo, and other cities in Japan. I was asked by the community in Nagoya to hold a workshop.

Hono & Workers AI

The theme of the event was “Workers AI and Hono”. Hono is a web framework that runs on the edge, such as Cloudflare Workers, which I am creating. Workers AI is an AI development environment announced by Cloudflare on September 27, or a week ago!. It allows inference on GPUs on the edge.

Initially, we were going to do a D1 workshop, but Workers AI was announced and sounded exciting, so we did it. It is probably the first Workers AI workshop in the world!

Venue

This meetup took place at Ateam Inc.. It was a cool place. Thank you very much.

Photo

Attendees

Thirty-one people attended. There were a few people who came from outside Nagoya, including myself, but most of them lived in the Nagoya area.

Photo

Talks

Three talked about Cloudflare or Hono for around 15 minutes.

Tried Hyperdrive 🛸 by @aiji42_dev

Hyperdrive speeds up database connections and queries. Just like Workers AI, it was announced during Birthday Week about a week ago. @aiji42_dev, Ateam engineers measured the performance of Hyperdrive and presented their results.

HyperDrive is fast when the “Query Cache” is enabled. However, without the “Query Cache” enabled, there is an overhead to set up the Hyperdrive connection. Nevertheless, he said it is a good idea to use it because it reduces the initial connection time regardless of the distance to the DB.

Photo

Details of the testing ways and results can be found in the article.

Cacheable Presigned URL with Cloudflare Workers by @oliver_diary

He uses R2 to distribute the images. He introduced the method to create signed URLs and verify them with a Workers application. The key is that R2 content can be cached.

It is interesting to note that Workers allows detailed control of the behavior to the origin, in this case R2. I remember that I once created a similar Hono middleware.

If you want to know more, you can refer to his blog post.

Create a React/TypeScript runtime environment in the browser with Hono by @steelydylan

His talk is not related to Cloudflare, but it is related to Hono.

He hosts an online programming learning site called mosya. For the site, he is trying to create an environment that allows React apps to run only in the browser. He had Hono running on Service Worker in his demo. In other words, Hono runs on the browser, not on the edge!

I have built applications using this trick before. Check it out here: yusukebe/service-worker-magic.

Workshop

I was the instructor and held a one-hour workshop. The developers who attended did the following three things.

  1. Creating a Cloudflare Workers application using Hono
  2. Trying to touch Workers AI
  3. Creating an application using Workers AI

Workshop

In the end, all 30 developers succeeded in creating a website that can chat to AI using Workers AI’s LLM model!

Below is a screencast of the completed product, at 1.5x speed.

SC

Of course, the completed code was available, but it was great that everyone made it to deploying the AI application in time!

The materials we used during the workshop is here.

Recap

I had a very good time in Nagoya. It is very meaningful to have these meetups outside of Tokyo.

Photo

Finally, thanks to Ateam for lending us the venue and @katzueno for hosting and the giant pudding!