Category Archives: Google Developers Blog

News and insights on Google platforms, tools and events

Manage your passes from Google Pay’s Business Console

Posted by:

Ryan Novas, Product Manager, Google Pay’s Business Console

Jose Ugia, Developer Relations Engineer, Google Pay

Last year we launched Google Pay’s Business Console, a platform that helps developers discover, integrate with, and manage Google Pay features for their businesses. Since then, integrating Google Pay products has become easier and faster, with features like a common business profile and a unified dashboard.

Today, we are adding Passes as a new section to Google Pay’s Business Console, so you can manage all your Google Pay resources from one place. You can find the new Passes section in the console’s left-hand navigation bar, and from there, access your tickets, loyalty programs, offers and other passes resources.

Google Pay’s Business Console features a more familiar and intuitive user interface that helps you reuse common bits of information, like your business information, and lets you easily navigate and discover Google Pay products, such as the Online API. Visit Google Pay’s Business Console today, and start managing your current Google Pay products, or discover and integrate with new ones.

The new Passes section in Google Pay’s Business Console lets you request access to the API and manage your passes alongside other Google Pay resources.
The new Passes section in Google Pay’s Business Console lets you request access to the API and manage your passes alongside other Google Pay resources.

Here is what early users are saying about managing Passes in the console:

“The cleaner and consistent look of Google Pay's Business Console helps us manage our Google Pay resources more intuitively." Or Maoz, Senior Director of R&D at EngagedMedia said.

The user management additions also helped EngagedMedia better represent their team in the console:

“The new user roles and controls on Google Pay's Business Console help us handle permissions more intuitively and accurately, and allow us to assign roles that better reflect our team structure more easily.”

We are committed to continuously evolving Google Pay’s Business Console to make it your go-to place to discover and manage Google Pay integrations. We’d love to hear about your experience. You can share feedback with us from the “Feedback” section in the console. We’re looking forward to learning how we can make Google Pay even more helpful for you in the future.

Learn more

Want to learn more about Google Pay?

Upload massive lists of products to Merchant Center using Centimani

Posted by Hector Parra, Jaime Martínez, Miguel Fernandes, Julia Hernández

Merchant Center lets merchants manage how their in-store and online product inventory appears on Google. It allows them to reach hundreds of millions of people looking to buy products like yours each day.


To upload their products, merchants can make use of feeds, that is, files with a list of products in a specific format. These can be shared with Merchant Center in different ways: using Google Sheets, SFTP or FTP shares, Google Cloud Storage or manually through the user interface. These methods work great for the majority of cases. But, if a merchant's product list grows over time, they might reach the usage limits of the feeds. Depending on the case, quota extensions could be granted, but if the list continues to grow, it might reach a point where feeds no longer support that scale, and the Content API for Shopping would become the recommended way to go forward.


The main issue is, if a merchant is recommended to stop using feeds and start using the Content API due to scale problems, it means that the number of products is massive, and trying to use the Content API directly will give them usage and quota errors, as the QPS and products per call limits will be exceeded.


For this specific use case, Centimani becomes critical in helping merchants handle the upload process through the Content API in a controlled manner, avoiding any overload of the API.


Centimani is a configurable massive file processor able to split text files in chunks, process them following a strategic pattern and store the results in BigQuery for reporting. It provides configurable options for chunk size and number of retries, and takes care of exponential backoff to ensure all requests have enough retries to overcome potential temporary issues or errors. Centimani comes with two operators: Google Ads Offline Conversions Uploader, and Merchant Center Products Uploader, but it can be extended to other uses easily.


Centimani uses Google Cloud as its platform, and makes use of Cloud Storage for storing the data, Cloud Functions to do the data processing and the API calls, Cloud Tasks to coordinate the execution of each call, and BigQuery to store the audit information for reporting.

Centimani Architecture

To start using Centimani, a couple of configuration files need to be prepared with information about the Google Cloud Project to be used (including the element names), the credentials to access the Merchant Center accounts and how the load will be distributed (e.g., parallel executions, number of products per call). Then, the deployment is done automatically using a deployment script provided by the tool.


After the tool is deployed, a cloud function will be monitoring the input bucket in Cloud Storage, and every time a file is uploaded there, it will be processed. The tool uses the name of the file to select the operator that is going to be used (“MC” indicates Merchant Center Products Uploader), and the particular configuration to use (multiple configurations can be used to connect to Merchant Center accounts with different access credentials).


Whenever a file is uploaded, it will be sliced in parts if it is greater than the number of products allowed per call, they will be stored in the output bucket in Cloud Storage, and Cloud Tasks will start launching the API calls until all files are processed. Any file with errors will be stored in a folder called “slices_failed” to help troubleshoot any issues found in the process. Also, all the information about the executions will be stored temporarily in Datastore and then moved to BigQuery, where it can be used for monitoring the whole process from a centralized place.


Centimani Status Dashboard Architecture

Centimani provides an easy way for merchants to start using the Content API for Shopping to manage their products, without having to deal with the complexity of keeping the system under the limits.


For more information you can visit the Centimani repository on Github.


Taking the leap to pursue a passion in Machine Learning with Leigh Johnson #IamaGDE

Welcome to #IamaGDE - a series of spotlights presenting Google Developer Experts (GDEs) from across the globe. Discover their stories, passions, and highlights of their community work.

Leigh Johnson turned her childhood love of Geocities and Neopets into a web development career, and then trained her focus on Machine Learning. Now, she’s a staff software engineer at Slack, a Google Developer Expert in Web and Machine Learning, and founder of Print Nanny, an automated failure detection system and monitoring system for 3D printers.

Meet Leigh Johnson, Google Developer Expert in Web and Machine Learning.

Image shows GDE Leigh Johnson, smiling at the camera and holding a circuit board of some kind

GDE Leigh Johnson

The early days

Leigh Johnson grew up in the Bronx, NY, and got an early start in web development when she became captivated by Geocities and Neopets in elementary school.

“I loved the power of being able to put something online that other people could see, using just HTML and CSS,” she says.

She started college and studied Latin, but it wasn’t the right fit for her, so she dropped out and launched her own business building WordPress sites for small businesses, like local restaurants putting their menus online for the first time or taking orders through a form.

“I was 18, running around a data center trying to rack servers and teaching myself DNS to serve my customer base, which was small business owners,” she says. “I ran my business for five years, until companies like Squarespace and Wix started to edge me out of the market a little bit.”

Leigh went on to chase her dream of working in the video game industry, where she got exposed to low-level C++ programming, graphics engines, and basic statistics, which led her to machine learning.

Image shows GDE Leigh Johnson, smiling at the camera and standing in front of a presentation screen at SFPython

Machine learning

At the video game studio where she worked, Leigh got into Bayesian inference.

“It’s old school machine learning, where you try to predict things based on the probability of previous events,” she explains. “You look at past events and try to predict the probability of future events, and I did this for marketing offers—what’s the likelihood you’d purchase a yellow hat to match your yellow pants?”

In the first month or two of trying email offers, the company made more small dollar sales than they typically made in a year.

“I realized, this is powerful dark magic; I must learn more,” Leigh says.

She continued working for tech startups like Ansible, which was acquired by Red Hat, and Dave.com, doing heavy data lifting.

“Everything about machine learning is powered by being able to manipulate and get data from point A to point B,” she says.

Today, Leigh works on machine learning and infrastructure at Slack and is a Google Developer Expert in machine learning. She also has a side project she runs: Print Nanny.

Image shows circuit board with fan next to image of its schematics

Print Nanny: Monitoring 3D printers

When Leigh got into 3D printing as a hobby during the COVID-19 shutdown, she discovered that 3D printers can be unreliable and lack sophisticated monitoring programs.

“When I assembled my 3D printer myself, I realized that over time, the calibration is going to change,” she says. “It's a very finicky process, and it didn't necessarily guarantee the quality of these traditional large batch manufacturing processes.”

She installed a nanny cam to watch her 3D printer and researched solutions, knowing from her machine learning experience that because 3D printers build a print up layer by layer, there’s no one point of failure—failure happens layer by layer, over time. So she wrote that algorithm.

“I saw an opportunity to take some of the traditional machine intelligence strategies used by large manufacturers to ensure there’s a certain consistency and quality to the things they produce, and I made Print Nanny,” she says. “It uses a Raspberry Pi, a credit card-sized computer that costs $30. You can stick a computer vision model on one and do offline inference, which are basically predictions about what the camera sees. You can make predictions about whether a print will fail, help score calculations, and attenuate the print.”

Leigh used Google Cloud Platform AutoML Vision, Google Cloud Platform IoT Core, TensorFlow Model Garden, and TensorFlow.js to build Print Nanny. Using GCP credits provided by Google, she improved and developed Print Nanny with TensorFlow and Google Cloud Platform products.

When Print Nanny detects that a print is failing, the user receives a notification and can remotely pause or stop the printer.

“Print Nanny is an automated failure detection system and monitoring system for 3D printers, which uses computer vision to detect defects and alert you to potential quality or safety hazards,” Leigh says.

Leigh has hired team members who are interested in machine learning to help her with the technical aspects of Print Nanny. Print Nanny currently has 2100 users signed up for a closed beta, with 200 people actively using the beta version. Of that group, 80% are hobbyists and 20% are small business owners. Print Nanny is 100% open source.

Image shows a collection of 3D-Printed parts

Becoming a GDE

Leigh got involved with the GDE program about four years ago, when she began putting machine learning models on Raspberry Pis and building robots. She began writing tutorials about what she was learning.

“The things I was doing were quite hard: TensorFlow Light, the mobile device of TensorFlow—there was a missing documentation opportunity there, and my target platform, the Raspberry Pi, is a hobbyist platform, so there was a little bit of missing documentation there,” Leigh says. “For a hobbyist who wanted to pick up a Raspberry Pi and do a computer vision project for the first time, there was a missing tutorial there, so I started writing about what I was doing, and the response was tremendous.”

Leigh’s work caught the eye of Google staff research engineer Pete Warden, the technical Lead of the TensorFlow Mobile team, who encouraged her, and she leveraged the GDE program to connect to Google experts on TensorFlow and machine learning. Google provides a machine learning course for developers and supports TensorFlow, in addition to its many AI products.

“I had no knowledge of graph programming or what it meant to adapt the low-level kernel operations that would run on a Raspberry Pi, or compiling software, and I learned all that through the GDE program,” Leigh says. “This program changed my life.”

Image shows 1 man and three women smiling at the camera. Leigh is taking the photo selfie-style

Leigh’s favorite part of the GDE program is going to events like TensorFlow World, which she last attended in 2019, and GDE summits. She hadn’t travelled internationally until she was in her 20’s, so the GDE program has connected her to the international community.

“It’s been life-changing,” she says. “I never would have had access to that many perspectives. It’s changed the way I view the world, my life, and myself. It’s very powerful.”

Leigh smiles at the camera in front of a sign that reads TensorFlow for mobile and edge devices

Leigh’s advice to future developers

Leigh recommends that people find the best environment for themselves and adopt a growth mindset.

“The best advice that I can give is to find your motivation and find the environment where you can be successful,” she says. “Surround yourself with people who are lifelong learners. When you cultivate an environment of learning around you, it's this positive, self-perpetuating process.”

#IamaGDE: Katerina Skroumpelou (Athens, Greece)

The Google Developers Experts program is a global network of highly experienced technology experts, influencers, and thought leaders who actively support developers, companies, and tech communities by speaking at events and publishing content.

Katerina Skroumpelou, who is based in Athens, Greece, is a Senior Software Engineer at Narwhal Technologies, a consulting firm whose product Nx lets developers build multiple full-stack applications and share code among them in the same workspace. She is a Google Developer Expert in Maps and Angular.

Image shows  Katerina Skroumpelou looking straight ahead at the camera. She is seated behind a laptop with a red cover covered in stickers

Becoming a Google Maps Platform developer

Skroumpelou has always had a deep love of maps.

“My father used to have old maps books, and I’ve always been obsessed with knowing where I am and having an understanding of my surroundings, so I’ve always liked maps,” she says.

After learning to code in high school, Skroumpelou decided she wanted to be a programmer and spent a year studying computer engineering at the National Technical School of Athens, but she wasn’t excited about it, so she pursued a Master’s in architectural engineering there, instead. Then she earned her master’s degree in spatial analysis at University College London.

“They have a Center for Advanced Spatial Analysis--everything to do with maps, spatial data, and analysis, which combined my love of maps, space, and programming,” she says. “My master’s combined my passions, and I got into programming and maps--we created them with code.”

Skroumpelou returned to Greece after her master’s and took postgraduate courses at the National Technical School of Athens to get a more solid foundation in programming. She landed a job as a web developer at the National Centre for Scientific Research “Demokritos,” which works on European Union-funded security and safety research projects. Her first project was to build a system to help manage a fire department fleet.

“I had to work with maps and annotate on the map where a fire could break out, and how the fleet would be distributed to put it out, so I started working with Google Maps then,” she says. “For another research project on airport security, I imported information into a Google Map of the airport.”

She also learned Angular on the job. Skroumpelou moved on to several software engineering jobs after that and continued to work with Angular and build Google Maps projects in her spare time.

Getting involved in the developer community

Skroumpelou’s first foray into the Google developer community began when she was learning Angular for her job at the research center and watching conference talks on Angular online.

“I thought, hey, I can do that too, and I started thinking about how to get involved,” she says. “I reached out to the Angular Connect London conference, and my talk was accepted. It wasn’t strictly technical; it was “From Buildings to Software,” describing my journey from architectural engineering to software engineering.”

Since then, Skroumeplou has spoken at Google Developer Groups events, local meetups, and DevFest. She became a GDE in 2018 in Angular, Web Technologies, and Google Maps Platform and finds it incentivizes her to use Google tools for new projects.

“Apart from the feeling that you’re giving back to the community, you gain things for yourself on a personal level, and it’s an incentive to do even more,” she says.

She appreciated meeting other developers who shared her passion.

“I’m a very social person, and it really feels like we have common ground,” she says.

Image shows Katerina Skroumpelou presenting onstage at a conference. Behind her is a podium and a wall covered in a planetary theme

Favorite Google Maps Platform features

Skroumpelo’s favorite Google Maps Platform features are Cloud-based Maps styling, the drawing library, and the drawing manager.

“I used the drawing library a lot when I was working at the research institute, drawing things on the map,” she says. “Being able to export the data as JSON and import it again is cool.”

She used the styling feature while building a friend’s website and styled a map to go with the brand colors.

“It looks neat to have your brand colors on the map,” she says. “You can remove things from the map and add them back, add geometries, points, and other things, and draw it as you want.”

She speaks highly of Google Maps Platform’s out-of-the-box interactive features for users, like the JS repository, which has examples developers can clone, or they can use NPM to generate a new Map application.”

“It makes building a map or using it much easier,” she says, adding, “The Google Maps Platform docs are very good and detailed.”

Image shows a map of London illustrating loneliness in people over the age of 65

Future plans

Skroumpelou plans to stay with Narwhal Technologies for the long term and continue to work with Google Maps Platform as much as possible.

“I really like the company I’m working for, so I hope I stay at this company and progress up,” she says.

Image shows Katerina Skroumpelou looking off-camera with a smile. She is standing behind a podium with a laptop with a red cover covered in stickers

Follow Katerina on Twitter at @psybercity | Check out Katerina’s projects on GitHub

For more information on Google Maps Platform, visit our website or learn more about our GDE program.

Machine Learning Communities: Q3 ‘21 highlights and achievements

Posted by HyeJung Lee, DevRel Community Manager and Soonson Kwon, DevRel Program Manager

Let’s explore highlights and achievements of vast Google Machine Learning communities by region for the last quarter. Activities of experts (GDE, professional individuals), communities (TFUG, TensorFlow user groups), students (GDSC, student clubs), and developers groups (GDG) are presented here.

Key highlights

Image shows a banner for 30 days of ML with Kaggle

30 days of ML with Kaggle is designed to help beginners study ML using Kaggle Learn courses as well as a competition specifically for the participants of this program. Collaborated with the Kaggle team so that +30 the ML GDEs and TFUG organizers participated as volunteers as online mentors as well as speakers for this initiative.

Total 16 of the GDE/GDSC/TFUGs run community organized programs by referring to the shared community organize guide. Houston TensorFlow & Applied AI/ML placed 6th out of 7573 teams — the only Americans in the Top 10 in the competition. And TFUG Santiago (Chile) organizers participated as well and they are number 17 on the public leaderboard.

Asia Pacific

Image shows Google Cloud and Coca-Cola logos

GDE Minori MATSUDA (Japan)’s project on Coca-Cola Bottlers Japan was published on Google Cloud Japan Blog covering creating an ML pipeline to deploy into real business within 2 months by using Vertex AI. This is also published on GCP blog in English.

GDE Chansung Park (Korea) and Sayak Paul (India) published many articles on GCP Blog. First, “Image search with natural language queries” explained how to build a simple image parser from natural language inputs using OpenAI's CLIP model. From this second “Model training as a CI/CD system: (Part I, Part II)” post, you can learn more about why having a resilient CI/CD system for your ML application is crucial for success. Last, “Dual deployments on Vertex AI” talks about end-to-end workflow using Vertex AI, TFX and Kubeflow.

In China, GDE Junpeng Ye used TensorFlow 2.x to significantly reduce the codebase (15k → 2k) on WeChat Finder which is a TikTok alternative in WeChat. GDE Dan lee wrote an article on Understanding TensorFlow Series: Part 1, Part 2, Part 3-1, Part 3-2, Part 4

GDE Ngoc Ba from Vietnam has contributed AI Papers Reading and Coding series implementing ML/DL papers in TensorFlow and creates slides/videos every two weeks. (videos: Vit Transformer, MLP-Mixer and Transformer)

A beginner friendly codelabs (Get started with audio classification ,Go further with audio classification) by GDSC Sookmyung (Korea) learning to customize pre-trained audio classification models to your needs and deploy them to your apps, using TFlite Model Maker.

Cover image for Mat Kelcey's talk on JAX at the PyConAU event

GDE Matthew Kelcey from Australia gave a talk on JAX at PyConAU event. Mat gave an overview to fundamentals of JAX and an intro to some of the libraries being developed on top.

Image shows overview for the released PerceiverIO code

In Singapore, TFUG Singapore dived back into some of the latest papers, techniques, and fields of research that are delivering state-of-the-art results in a number of fields. GDE Martin Andrews included a brief code walkthrough for the released PerceiverIO code at perceiver- highlighting what JAX looks like, how Haiku relates to Sonnet, but also the data loading stuff which is done via tf.data.

Machine Learning Experimentation with TensorBoard book cover

GDE Imran us Salam Mian from Pakistan published a book "Machine Learning Experimentation with TensorBoard".

India

GDE Aakash Nain has published the TF-JAX tutorial series from Part 4 to Part 8. Part 4 gives a brief introduction about JAX (What/Why), and DeviceArray. Part 5 covers why pure functions are good and why JAX prefers them. Part 6 focuses on Pseudo Random Number Generation (PRNG) in Numpy and JAX. Part 7 focuses on Just In Time Compilation (JIT) in JAX. And Part 8 covers vmap and pmap.

Image of Bhavesh's Google Cloud certificate

GDE Bhavesh Bhatt published a video about his experience on the Google Cloud Professional Data Engineer certification exam.

Image shows phase 1 and 2 of the Climate Change project using Vertex AI

Climate Change project using Vertex AI by ML GDE Sayak Paul and Siddha Ganju (NVIDIA). They published a paper (Flood Segmentation on Sentinel-1 SAR Imagery with Semi-Supervised Learning) and open-sourced the project with regard to NASA Impact's ETCI competition. This project made four NeurIPS workshops AI for Science: Mind the Gaps, Tackling Climate Change with Machine Learning, Women in ML, and Machine Learning and the Physical Sciences. And they finished as the first runners-up (see Test Phase 2).

Image shows example of handwriting recognition tutorial

Tutorial on handwriting recognition was contributed to Keras example by GDE Sayak Paul and Aakash Kumar Nain.

Graph regularization for image classification using synthesized graphs by GDE Sayak Pau was added to the official examples in the Neural Structured Learning in TensorFlow.

GDE Sayak Paul and Soumik Rakshit shared a new NLP dataset for multi-label text classification. The dataset consists of paper titles, abstracts, and term categories scraped from arXiv.

North America

Banner image shows students participating in Google Summer of Code

During the GSoC (Google Summer of Code), some GDEs mentored or co-mentored students. GDE Margaret Maynard-Reid (USA) mentored TF-GAN, Model Garden, TF Hub and TFLite products. You can get some of her experience and tips from the GDE Blog. And you can find GDE Sayak Paul (India) and Googler Morgan Roff’s GSoC experience in (co-)mentoring TensorFlow and TF Hub as well.

A beginner friendly workshop on TensorFlow with ML GDE Henry Ruiz (USA) was hosted by GDSC Texas A&M University (USA) for the students.

Screenshot from Youtube video on how transformers work

Youtube video Self-Attention Explained: How do Transformers work? by GDE Tanmay Bakshi from Canada explained how you can build a Transformer encoder-based neural network to classify code into 8 different programming languages using TPU, Colab with Keras.

Europe

GDG / GDSC Turkey hosted AI Summer Camp in cooperation with Global AI Hub. 7100 participants learned about ML, TensorFlow, CV and NLP.

Screenshot from slide presentation titled Why Jax?

TechTalk Speech Processing with Deep Learning and JAX/Trax by GDE Sergii Khomenko (Germany) and M. Yusuf Sarıgöz (Turkey). They reviewed technologies such as Jax, TensorFlow, Trax, and others that can help boost our research in speech processing.

South/Central America

Image shows Custom object detection in the browser using TensorFlow.js

On the other side of the world, in Brazil, GDE Hugo Zanini Gomes wrote an article about “Custom object detection in the browser using TensorFlow.js” using the TensorFlow 2 Object Detection API and Colab was posted on the TensorFlow blog.

Screenshot from a talk about Real-time semantic segmentation in the browser - Made with TensorFlow.js

And Hugo gave a talk about Real-time semantic segmentation in the browser - Made with TensorFlow.js covered using SavedModels in an efficient way in JavaScript directly enabling you to get the reach and scale of the web for your new research.

Data Pipelines for ML was talked about by GDE Nathaly Alarcon Torrico from Bolivia explained all the phases involved in the creation of ML and Data Science products, starting with the data collection, transformation, storage and Product creation of ML models.

Screensho from TechTalk “Machine Learning Competitivo: Top 1% en Kaggle (Video)

TechTalk “Machine Learning Competitivo: Top 1% en Kaggle (Video)“ was hosted by TFUG Santiago (Chile). In this talk the speaker gave a tour of the steps to follow to generate a model capable of being in the top 1% of the Kaggle Leaderboard. The focus was on showing the libraries and“ tricks ”that are used to be able to test many ideas quickly both in implementation and in execution and how to use them in productive environments.

MENA

Screenshot from workshop about Recurrent Neural Networks

GDE Ruqiya Bin Safi (Saudi Arabia) had a workshop about Recurrent Neural Networks : part 1 (Github / Slide) at the GDG Mena. And Ruqiya gave a talk about Recurrent Neural Networks: part 2 at the GDG Cloud Saudi (Saudi Arabia).

AI Training with Kaggle by GDSC Islamic University of Gaza from Palestine. It is a two month training covering Data Processing, Image Processing and NLP with Kaggle.

Sub-Saharan Africa

TFUG Ibadan had two TensorFlow events : Basic Sentiment analysis with Tensorflow and Introduction to Recommenders Systems with TensorFlow”.

Image of Yannick Serge Obam Akou's TensorFlow Certificate

Article covered some tips to study, prepare and pass the TensorFlow developer exam in French by ML GDE Yannick Serge Obam Akou (Cameroon).

Announcing Kotlin support for protocol buffers

Posted by Deanna Garcia and Louis Wasserman - Software Developers, and Developer Advocate, James Ward

Google’s commitment to Kotlin

At Google, we’re investing deeply in the Kotlin language and ecosystem. Android development is now Kotlin first, our engineering teams work on language evolution through the Kotlin Foundation, and inside of Google we’re using Kotlin more and more to build our backend services. We love Kotlin for its expressiveness, safety, simple async support through coroutines, and easy bidirectional interoperability with the Java programming language.

Kotlin for protocol buffers

Last year, we open sourced Kotlin support for gRPC, the open source Remote Procedure Call (RPC) framework that powers thousands of microservices at Google. We’re excited to deepen our investment in the Kotlin language with official support for Kotlin in the open source Protocol Buffers project (a.k.a. “protos”), Google’s platform-neutral, high-performance data interchange format. From a proto definition, you can use the new built-in Kotlin support in the proto compiler to generate idiomatic Kotlin Domain Specific Languages (DSLs).

For example, here’s a simple protocol buffer message representing a series of dice rolls:

message DiceSeries {
message DiceRoll {
int32 value = 1; // value of this roll, e.g. 2..12
string nickname = 2; // string nickname, e.g. "snake eyes"
}

repeated DiceRoll rolls = 1;
}

In the Java language, constructing a series of dice rolls might look like this:

DiceSeries series = DiceSeries.newBuilder()
.addRoll(DiceRoll.newBuilder()
.setValue(5))
.addRoll(DiceRoll.newBuilder()
.setValue(20)
.setNickname("critical hit"))
.build()

With this release, protos offer an expressive set of DSL factory methods that make this code elegant and idiomatic in Kotlin. Here is the equivalent dice roll code written using the new Kotlin proto bindings:

val series = diceSeries {
rolls = listOf(
diceRoll { value = 5 },
diceRoll {
value = 20
nickname = "critical hit"
}
)
}

The Kotlin version uses Kotlin type-safe builders, which makes it concise and removes the need to explicitly call a build method. Note that this works with both the proto compiler’s standard and "proto lite" modes, the latter generating smaller, higher performance classes which are more suitable for Android.

Note: Since protos use the get prefix for their fields and Kotlin recognizes that as a property, reading from a proto already works smoothly from Kotlin as if the proto were a data class.

val totalRolls = series.rolls.map { it.value }.sum() // 5 + 20 = 25

Kotlin Protos and gRPC Kotlin

The new Kotlin Protos work great with gRPC Kotlin providing a concise syntax for messages and services. Let's walk through a basic sample.

Here is a basic "Greeter" gRPC service proto:

service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}

message HelloRequest {
string name = 1;
}

message HelloReply {
string message = 1;
}

Check out the full example proto source.

The non-blocking server can be implemented concisely, taking advantage of the Kotlin proto builders:

class HelloWorldService : GreeterCoroutineImplBase() {
override suspend fun sayHello(request: HelloRequest) = helloReply {
message = "hello, ${request.name}"
}
}

Check out the full example server source.

The non-blocking client also can take advantage of the type-safe Kotlin builders with concise syntax:

val stub = GreeterCoroutineStub(channel)
val request = helloRequest { name = "world" }
val response = stub.sayHello(request)
println("Received: ${response.message}")

Check out the full example client source.

Those code examples really illustrate how concise the syntax is, which means less boilerplate to write and less for our brains to parse as we try to read the code. What isn't evident in these examples is how nice the experience is when writing high-performance RPC code. Thanks to static typing and the type-safe builders, you can easily code-complete your way through code that is "correct" in-that the types / properties are consistent with the protos.

The protobuf compiler (protoc) now has built-in support for generating Kotlin code. A bit of configuration is needed to tell your build tool (Maven, Gradle, etc) to do that. For Gradle builds it looks like:

protobuf {
// omitted protoc and plugins config
generateProtoTasks {
all().forEach {
// omitted plugins config
it.builtins {
id("kotlin")
}
}
}
}

Check out the full example Gradle build.

Give the complete gRPC Kotlin example a spin and also explore other aspects like the Android client and native client (built with GraalVM Native Image) which both use the lite protos. For an example Maven project check out the grpc-hello-world-mvn sample.

For examples that can be deployed with a couple clicks on Google Cloud Run (a fully managed serverless platform) check out: grpc-hello-world-gradle, grpc-hello-world-streaming (server push), or grpc-hello-world-bidi-streaming (bi-directional streaming).

Learn More

To learn more about Kotlin protos check out these docs:

Let us know how it goes and if you have any Kotlin proto issues by filing them within the official protobuf project.

Additional thanks to Adam Cozzette, Brent Shaffer, David Jones, David Winer, Jeff Grimes, John Pampuch, and Kevin Bierhoff for their contributions to this release!

Easily connect Google Pay with your preferred payment processor

Posted by Stephen McDonald, Developer Relations Engineer, Google Pay

Easily connect Google Pay with your preferred payment processor

Adding Google Pay as a payment method to your website or Android application provides a secure and fast checkout option for your users. To enable Google Pay, you will first need a Payment Service Provider (PSP). For the integration this means understanding how your payments processing stack works with Google Pay APIs.

End-to-end PSP samples

To make integration easier, we’ve launched a new open source project containing end-to-end samples for a range of PSPs, demonstrating the entire integration process - from client-side configuration, to server-side integration with the PSPs, using their respective APIs and client libraries where applicable. The project uses Node.js and is written in JavaScript, which most developers should find familiar. Each of the samples in the project are implemented in a consistent fashion, and demonstrate best practices for integrating Google Pay and your preferred PSP with your website or Android application.

A recent study by 451 Research showed that for merchants with over 50% of sales occurring online, 69% of merchants used multiple PSPs. With these new samples, we demonstrate how you can implement an entirely consistent interface to multiple PSPs, streamlining your codebase while also providing more flexibility for the future.

Lastly, we've also added support to both the Web and Android Google Pay sample applications, making it easy to demonstrate the new PSP samples. Simply run the PSP samples project, and configure the Web or Android samples to send their cart information and Google Pay token to the PSP samples app, which will then send the relevant data to the PSP's API and return the PSP's response back.

Initial PSPs

To start with, we've included support for 6 popular PSPs: Adyen, Braintree, Checkout.com, Cybersource, Square, and Stripe. But that's just the beginning. If you're involved with a PSP that isn't yet included, we've made adding new PSPs to the open source project as simple as possible. Just head on over to the GitHub repository which contains instructions on contributing your preferred PSP to the project.

Launching Google Pay for your website

When you’ve completed your testing, submit your website integration in the Google Pay Business Console. You will need to provide your website’s URL and screenshots to complete the submission.

Summing it up

Integrating Google Pay into your website is a great way to increase conversions and to improve the purchasing experience for your customers, and with these new open source samples, the process is even easier.

What do you think? Follow us on Twitter for the latest updates @GooglePayDevs

Do you have any questions? Let us know in the comments below or tweet using #AskGooglePayDevs.

#IamaGDE: Martin Kleppe

#IamaGDE series presents: Google Maps Platform

The Google Developers Experts program is a global network of highly experienced technology experts, influencers, and thought leaders who actively support developers, companies, and tech communities by speaking at events and publishing content.

Image shows Martin Kleppe looking straight ahead at the camera. He is standing against a wooden wall

Martin Kleppe is a co-founder of Ubilabs, a Google Cloud partner since 2012. He is the head of development, responsible for R&D and technical strategy. He talks with customers to understand their challenges and which location technologies will best serve them. He also works with partners like Google to determine the best ways to combine the latest technologies.

Ubilabs – a data and location technology consultancy specializing in product and software development, visualization, implementation, and data management – built the official feature tour and travel app demos for Google Maps Platform at Google I/O 2021.

“We worked with the latest Google Maps Platform APIs to create demos that showcase the combined features,” he says.

Ubilabs also works closely with the Google Earth team, developing content and UI components for its storytelling platform. In addition, they are in close contact with the Google Maps Platform team, giving feedback on the latest products and features before they’re released.

Image shows Martin Kleppe leaning down to look at his computer. He appears to be onstage at an event giving a presentation

Kleppe’s background is in design and coding web applications. At Bauhaus University, Kleppe was in the Media Art and Design program, where he learned the principle of simplicity in design, with a focus on what users want. Students’ projects combined technology and art, and while programming courses weren’t required, students were expected to explain their thinking. Kleppe worked on live blogging platforms using maps and mobile phones, even before popular maps APIs and iPhones came out.

“I was always focused on interactive maps,” Kleppe says. “Before Google Maps, I used NASA satellite imagery and Japanese cell phones with access to the user’s location. That’s how I got into programming and into maps.”

After university, he decided to start a company.

“When the Google Maps API came out, I thought it was a perfect time to make a business out of it,” he said. “We started with a few friends, and then the company took off.”

Kleppe keeps his focus on the value of maps to users: Maps connect virtual users on computer screens to the real world, providing a connection between humans and data, and they provide context around a location.

“Maps, especially Google Maps, make it easy for users to get access to information”, says Kleppe. “With the Google Maps API, it was super easy to put things on a map.”

Image shows Martin Kleppe standing alone onstage. His computer is on a podium in front of him and a large screen is up on the wall behind him.

Getting involved in the developer community

Two different events got Kleppe involved in the developer community. In Hamburg, where he lives, he belonged to a small local JavaScript user group and gave frequent talks that led to group discussions about the Google Maps API and the usability aspects of the Google API. Ubilabs was also invited to talk about Google Maps at a Google technical event. The Google office in Hamburg held different meetups, and Kleppe found himself giving 12 talks a year and organizing conferences with tracks on topics including JavaScript and Google Maps.

When Kleppe’s first child was born, he cut down on his travel and poured his energy into his burgeoning relationships with developer advocates and teams. Around the same time, Kleppe became a Google Developer Expert (GDE).

“I wanted to become a GDE because I’m always eager to share Ubilabs’ latest use of Google technologies and inspire people with showcases of our work, pushing the limit of what’s possible,” Kleppe says. “As a GDE, you’re closer to the development and what’s happening at Google.”

GDEs get previews of APIs, know the people who are working on projects at Google, and give feedback.

“It is very interesting and important for us as a company to be prepared and to know what clients will be able to use in the future,” he says. “And it’s important for me, as well, because I always want to learn the latest things and be on top of tech trends.”

Kleppe enjoys interacting with the other Google Maps Platform GDEs, who live all over the world.

“They are teachers at universities, self-employed developers who work on small apps, and full-time speakers and educators,” Kleppe says. “That’s valuable to me because I work with clients, and I have my own views, but seeing how other people are working on the same thing from other perspectives helps me understand why different aspects of APIs exist.”

These days, Kleppe primarily works with the members of the Google Maps Platform, Google Earth, and Google Cloud product teams who develop new APIs, to provide his expert feedback.

“We work with a lot of different clients and understand what developers, clients, and users need and can pass useful feedback,” he says. “I think there is value to the community in having us test and review the new APIs. We think about new ways to use them, and if we find errors, we can help the Google Maps Platform team address these issues before the APIs are released to the public.”

In 2020, Kleppe found himself even more connected with the Google team when Ubilabs was selected to build the official Google Maps Platform demos for Google I/O 2021, featuring the new WebGL-powered features that are currently in beta release.

Image shows Martin Kleppe onstage behind his podium and laptop. His name is projected onto the screen behind him

Favorite Maps features and current projects

“WebGL is a different way of rendering maps,” says Kleppe. “The underlying technology has huge potential. It uses GPU-accelerated computing, where you use the graphics card in your machine to render 3D buildings and place 3D objects in space. Before this technology was available, your data was an additional layer that covered the map. Now, you have control over how the data is visually merged with the existing map. This will provide the user an immersive experience, like looking at a view of a city.”

Kleppe notes that the Google Maps APIs used to be limited to about a thousand objects, but now it can handle millions of moving points on a map. For him, being able to visualize and analyze large amounts of data is useful to Ubilabs because the company focuses on data visualization and analysis.

“You can visualize, animate, and draw data on the map,” he says. “You can analyze real-time information on maps.”

Kleppe says the best and most interesting feature of the Google Maps Platform APIs is the ability to combine so many data sources – the base map with streets, a layer to draw business info, an extra API to calculate directions, and the ability to draw one’s own information on top of all that.

“You’re not limited to the set of data in the API,” he says. “You’re always free to merge your own data into an abstract view of the world.”

Ubilabs put 3D features on their wish list years ago.

“The 3D feature is the most awaited feature for us,” he says. “Nine years later, it’s finally becoming a reality, so I’m super excited.”

Image shows Martin Kleppe presenting onstage. A large projector screen displays code behind him

Future plans

In his role at Ubilabs, Kleppe is sharpening the company’s strategic goals and adding focus on the field of data analytics with location aspects.

“We can work with clients and enable them to gain insights from their data,” he says. Every dataset has a connection to something in the real world, and if you use that information, you can make decisions about your business.”

His GDE role has allowed Kleppe to try Google Cloud’s data-specific products.

“We combine the visualization power of maps with the power of data analytics in Google Cloud and stream massive amounts of highly dynamic location data; for example, to track ships or analyze movements of assets,” Kleppe says. “We built a cloud team with a clear focus on data analytics on GCP the past three years, to look into how to preprocess data in the cloud, and we see a lot of potential.”

Follow Martin on Twitter at @aemkei | Read more about Ubilabs | Check out Martin’s experiments.

For more information on Google Maps Platform, visit our website or learn more about our GDE program.

#IamaGDE: Bhavesh Bhatt

Welcome to #IamaGDE - a series of spotlights presenting Google Developer Experts (GDEs) from across the globe. Discover their stories, passions, and highlights of their community work.

Bhavesh Bhatt is a data scientist and a YouTuber based in Mumbai, India. He began his career as an engineer and transitioned to machine learning and data science. Now, he trains other data scientists to be successful in their careers. Bhavesh is known for his popular YouTube videos and an open source app he created to help Indian citizens locate vaccination appointments near them in the spring of 2021. He has been a GDE since 2019.

Meet Bhavesh Bhatt, Google Developer Expert in Machine Learning and Data Science.

Image shows Bhavesh Bhatt seated and smiling at the camera

The Early Days

Bhavesh Bhatt has always been technical and has always enjoyed experimenting with coding circuits and creating end-to-end solutions. He earned his Bachelor of Engineering (BE) degree in 2013 from the University of Mumbai and his Master's degree in 2016 from BITS Pilani K K Birla Goa Campus in Embedded Systems. He began his career in the Engineering Development Group at MathWorks and later worked as a software developer at Cisco Systems.

Bhavesh took a course in machine learning in Mumbai to move his career toward machine learning, and he started the next phase of his career as a data scientist at FlexiLoans. There, his role involved automating processes using deep learning to decrease the TAT of loan applications. Bhavesh has worked on object detection, object classification, and OCR-related solutions and is currently a data scientist at Fractal Analytics.

“It’s been an interesting journey so far in data science and machine learning,” he says.

In 2017, he started creating videos on machine learning and data science, as a way to contribute what he had learned to the developer community. He enjoyed creating end-to-end videos and sharing them for free on YouTube, and his subscriber base kept growing. He now has about 33,000 subscribers to his channel and hundreds of videos posted there.

In August 2018, he became an instructor at Greyatom and has helped aspiring data scientists make a successful career transition ever since. He has worked with several EdTech startups to develop their machine learning course curriculum and has reviewed multiple machine learning books.

Image shows Bhavesh Bhatt smiling for the camera in a group of 25 people

Becoming a GDE

Bhavesh has been a GDE since October 2019.

“I have had an exponential learning curve, all thanks to the Google developer expert group,” he says. “The Google developer expert program has helped me grow in terms of understanding different technologies, like Tensorflow, and Google Cloud.”

He appreciates having access to Google’s cutting-edge work on machine learning as a GDE.

“Google is in the forefront in driving research and natural language processing,” he says. “We get to interact with Googlers and get insights on research.”

Image shows Bhavesh Bhatt onstage giving a presentation

Building a Vaccination Availability Dashboard

India’s dire second wave of COVID-19 infections took place in April and May of 2021. At the same time, the country had rolled out its vaccination program, and demand for vaccination appointments was high. People were trying to book appointments through a single portal that Bhavesh felt could be optimized to handle the high volume of traffic it was receiving.

“While exploring the vaccination website, I found that there was an API that developers could access,” says Bhavesh.

He played around with the API to understand its structure and how to extract data from it, as well as what types of data he could extract. He explored the different end points that were in the API. Then, he created an early version of a dashboard that pulled data from the server and displayed it in real time, allowing people to track the available vaccination slots near them.

“I created the first version of this application using a very popular programming language called S-Python,” Bhavesh says. “I used Google software called Google Colaboratory in order to create the initial solution.”

Google Colaboratory, or Colab for short, allows developers to write and execute Python in the browser, requiring no configuration and providing free access to GPUs and easy sharing. Data scientists can use Colab to analyze and visualize data using popular Python libraries. Colab is also useful for machine learning: Developers can import an image dataset, train an image classifier on it, and evaluate the model in a few lines of code. Bhavesh used it extensively for his project..

“I don’t code on a local machine; I prefer Google Colab because of the flexibility of reading and understanding one cell at a time,” he says. “I added a layer of protection to only add IP addresses from India, and then I had to move the dashboard to my local machine.”

Bhavesh tried scaling his solution in a local script that could run on his machine, but he knew that to roll it out to a larger audience, he’d have to deploy it elsewhere. He had limited knowledge of Google Cloud, so he reached out to the India GDE ecosystem and got connected to a Cloud GDE who hosted the web application on an Indian server, so people could use it. Once the prototype was deployed on Google Cloud, Bhavesh created a YouTube video to reach out as many developers and users as possible, so people could start utilizing it.

“People used it to its fullest potential,” Bhavesh says. “Lots of people used it to book slots and get vaccinated.”

Other developers created enhanced versions of Bhavesh’s script.

“I was just displaying the slots available at the nearest vaccination center, but others created solutions based on mine, where they’d send availability notifications on Signal, WhatsApp, and Telegram,” he says. “Overall, the application was received really well by the community, and a lot of people reached out to me and thanked me for creating it.”

Image shows Bhavesh Bhatt onstage giving a presentation

Bhavesh’s advice to fellow developers

Bhavesh recommends that developers explore as many technologies as possible, including software, engineering, data science, and machine learning. He also encourages developers to teach others, by writing blogs and tutorials or by posting videos.

“If you have learned something new, share it with the community,” he advises. “It will help the community and is a good opportunity for individual growth, as well.”

Image shows Bhavesh Bhatt standing in the center of a group of people standing in a classroom and smiling for the camera

Watch more on Bhavesh and his story here!

How a Developer Student Lead Increased Representation in Campus Clubs Through Community

Posted by Kyle Paul, Google Developer Student Club Regional Lead CA & US

Banner with image of Chloe Quijano and text that reads Google Developer Student Clubs University of Toronto

When Chloe Quijano arrived at the University of Toronto to study Applied Sciences, she immediately noticed that few of the professors or teaching assistants in the program looked like her. She noticed a lack of relatable role models online and on social media as well.

Chloe felt strongly about the importance of representation. Whether based on race, gender, ethnicity, sexual orientation or disability status, she understood the importance of being able to find relatable role models in her field--and the implications of a lack of diversity. "It holds back the students wishing to go into the field," she says.

Statistics illustrating the low number of women in computing occupations

Bureau of Labor Statistics findings on women in computing occupations

Worse, she points out, those that do enter technical careers may experience impostor syndrome: “We often downplay the skills we have as developers.”

Discovering Google Developer Student Clubs

Data backs up Chloe’s impression about the lack of diversity in tech: According to the National Center for Women & Information Technology (NCWIT), women made up only a quarter of the workforce in computing in 2020. Of those, just 3% were African-American, 7% Asian, and 2% Hispanic.

Determined to find a way to combat these trends, Chloe decided to look for a supportive community where she could help make a difference. While searching for a technology club where she could meet and learn from others, she stumbled across the university’s Google Developer Student Club. Noticing that the club was soliciting applications to serve as a lead, she decided to apply—and got the post!

Chloe quickly took steps to advance the group’s mission: to empower all students in technology. To help students like her connect with leaders and role models from a diverse range of backgrounds and experiences, she spearheaded the effort to organize the first-ever DSC Women in Tech Conference.

Held last March, the two-day virtual event featured 13 speakers from a range of backgrounds—including CEOs, Google employees, and recent graduates who landed internships and positions at prominent tech companies. Topics included charting your own path in tech, landing that first job, going the entrepreneurship route, and leveraging the power of a personal narrative. Hands-on workshops included a day-long hackathon challenge focused on redesigning a website to be more accessible and user-friendly for senior citizens. Ultimately, the conference drew more than 250 attendees from around the world, including South Korea, Morocco, Brazil, and China.

Expanding the Range of GDSC Events

After the conference’s success, Chloe continued organizing initiatives and programs for her GDSC group. She helped start a monthly tech meetup for women students, and a weekly online series highlighting potential careers paths, and featuring tech leaders as guests. In just under eight months, the chapter hosted 40 events, reaching more than 1700 participants.

Image shows Conference details and workshop titles

Examples of recent GDSC events at the University of Toronto

Chloe understood that greater encouragement and support can have long-term effects—not only while students are in school, but throughout their careers. “Showing more representation in tech greatly increases our confidence, innovation, and performance,” she points out. “Especially in academic environments, having a sense of belonging and community with role models for students to look up to can lead to success in tech together.”

Looking Ahead: Growth, Inspiration, and Connections

Having completed her term as the GDSC lead for the University of Toronto earlier this year, Chloe says the experience and her continuing involvement with the group has been instrumental in making her the student developer she is today. “I've been able to connect with student leaders globally from diverse backgrounds, academically, professionally, and culturally. It's inspiring to work alongside students who have unique perspectives.”

Such connections have become especially meaningful as she takes steps toward her post-graduation career, such as her first internship last summer, where she worked closely with several women software engineers at Microsoft. “Getting to work with them was really exciting and motivating,” she says.

Chloe can already see how her GDSC experience will support her professional development while also inspiring others to join the field. “I’m always going to be looking to become a better leader,” she says. “And then maybe other students like me who are looking for someone who looks like them, they’ll see me and think, ‘Yes, it’s possible.’”

Ultimately, Chloe says, helping others brings its own rewards: “Success takes care of those who create success for others.”

If you’re a student and would like to join a Google Developer Student Club community, look for a chapter near you here.