Tag Archives: web apps

Migrating from App Engine ndb to Cloud NDB

Posted by Wesley Chun (@wescpy), Developer Advocate, Google Cloud

Migrating to standalone services

Today we're introducing the first video showing long-time App Engine developers how to migrate from the App Engine ndb client library that connects to Datastore. While the legacy App Engine ndb service is still available for Datastore access, new features and continuing innovation are going into Cloud Datastore, so we recommend Python 2 users switch to standalone product client libraries like Cloud NDB.

This video and its corresponding codelab show developers how to migrate the sample app introduced in a previous video and gives them hands-on experience performing the migration on a simple app before tackling their own applications. In the immediately preceding "migration module" video, we transitioned that app from App Engine's original webapp2 framework to Flask, a popular framework in the Python community. Today's Module 2 content picks up where that Module 1 leaves off, migrating Datastore access from App Engine ndb to Cloud NDB.

Migrating to Cloud NDB opens the doors to other modernizations, such as moving to other standalone services that succeed the original App Engine legacy services, (finally) porting to Python 3, breaking up large apps into microservices for Cloud Functions, or containerizing App Engine apps for Cloud Run.

Moving to Cloud NDB

App Engine's Datastore matured to becoming its own standalone product in 2013, Cloud Datastore. Cloud NDB is the replacement client library designed for App Engine ndb users to preserve much of their existing code and user experience. Cloud NDB is available in both Python 2 and 3, meaning it can help expedite a Python 3 upgrade to the second generation App Engine platform. Furthermore, Cloud NDB gives non-App Engine apps access to Cloud Datastore.

As you can see from the screenshot below, one key difference between both libraries is that Cloud NDB provides a context manager, meaning you would use the Python with statement in a similar way as opening files but for Datastore access. However, aside from moving code inside with blocks, no other changes are required of the original App Engine ndb app code that accesses Datastore. Of course your "YMMV" (your mileage may vary) depending on the complexity of your code, but the goal of the team is to provide as seamless of a transition as possible as well as to preserve "ndb"-style access.

The difference between the App Engine ndb and Cloud NDB versions of the sample app

The "diffs" between the App Engine ndb and Cloud NDB versions of the sample app

Next steps

To try this migration yourself, hit up the corresponding codelab and use the video for guidance. This Module 2 migration sample "STARTs" with the Module 1 code completed in the previous codelab (and video). Users can use their solution or grab ours in the Module 1 repo folder. The goal is to arrive at the end with an identical, working app that operates just like the Module 1 app but uses a completely different Datastore client library. You can find this "FINISH" code sample in the Module 2a folder. If something goes wrong during your migration, you can always rollback to START, or compare your solution with our FINISH. Bonus content migrating to Python 3 App Engine can also be found in the video and codelab, resulting in a second FINISH, the Module 2b folder.

All of these learning modules, corresponding videos (when published), codelab tutorials, START and FINISH code, etc., can be found in the migration repo. We hope to also one day cover other legacy runtimes like Java 8 and others, so stay tuned! Developers should also check out the official Cloud NDB migration guide which provides more migration details, including key differences between both client libraries.

Ahead in Module 3, we will continue the Cloud NDB discussion and present our first optional migration, helping users move from Cloud NDB to the native Cloud Datastore client library. If you can't wait, try out its codelab found in the table at the repo above. Migrations aren't always easy; we hope this content helps you modernize your apps and shows we're focused on helping existing users as much as new ones.

How students built a web app with the potential to help frontline workers

Posted by Erica Hanson, Global Program Manager, Google Developer Student Clubs

Image of Olly and Daniel from GDSC at Wash U.

Image of Olly and Daniel from Google Developer Student Clubs at Wash U.

When Olly Cohen first arrived on campus at Washington University in St. Louis (Wash U), he knew the school was home to many talented and eager developers, just like him. Computer science is one of the most popular majors at Wash U, and graduates often find jobs in the tech industry. With that in mind, Olly was eager to build a community of peers who wanted to take theories learned in the classroom and put them to the test with tangible, real-life projects. So he decided to start his own Google Developer Student Club, a university-based community group for students interested in learning about Google developer technology.

Olly applied to become Google Developer Student Club Lead so he could start his own club with a faculty advisor, host workshops on developer products and platforms, and build projects that would give back to their community.

He didn’t know it at the time, but starting the club would eventually lead him to the most impactful development project of his early career — building a web application with the potential to help front-line healthcare workers in St. Louis, Missouri, during the pandemic.

Growing a community with a mission

The Google Developer Student Club grew quickly. Within the first few months, Olly and the core team signed up 150 members, hosted events with 40 to 60 attendees on average and began working on five different projects. One of the club’s first successful projects, led by Tom Janoski, was building a tool for the visually impaired. The app provides audio translations of visual media like newspapers and sports games.

This success inspired them to focus their projects on social good missions, and in particular helping small businesses in St. Louis. With a clear goal established, the club began to take off, growing to over 250 members managed by 9 core team members. They were soon building 10 different community-focused projects, and attracting the attention of many local leaders, including university officials, professors and organizers.

Building a web app for front-line healthcare workers

As the St. Louis community began to respond to the coronavirus pandemic in early 2020, some of the leaders at Wash U wondered if there was a way to digitally track PPE needs from front-line health care staff at Wash U’s medical center. The Dean of McKelvey School of Engineering reached out to Olly Cohen and his friend Daniel Sosebee to see if the Google Developer Student Club could lend a hand.

The request was sweeping: Build a web application that could potentially work for the clinical staff of Wash U’s academic hospital, Barnes-Jewish Hospital.

So the students got right to work, consulting with Google employees, Wash U computer science professors, an industry software engineer, and an M.D./Ph.D. candidate at the university’s School of Medicine.

With the team assembled, the student developers first created a platform where they could base their solution. Next, they built a simple prototype with a Google Form that linked to Google Sheets, so they could launch a pilot. Lastly, in conjunction with the Google Form, they developed a serverless web application with a form and data portal that could let all staff members easily request new PPE supplies.

In other words, their solution was showing the potential to help medical personnel track PPE shortages in real time digitally, making it easier and faster to identify and gather the resources doctors need right away. A web app built by students poised to make a true difference, now that is what the Google Developer Student Club experience is all about.

Ready to make a difference?

Are you a student who also wants to use technology to make a difference in your community? Click here to learn more about joining or starting a Google Developer Student Club near you.

Google I/O 2017 on your mobile devices

Posted by Mónica Bagagem, Product Marketing Manager

I/O is just a couple of weeks away… 9 days to be exact! As we get closer, we know many of you are excited to start customizing your I/O schedule so that you can make the most of the three festival days. In addition to customizing your schedule on google.com/io, you can also navigate through our 150+ technical Sessions, hundreds of Office Hours, and dozens of Codelabs via the Google I/O 2017 mobile app, available now for Android and very soon for iOS.

Available now: Android appiOS appWeb app (add to your mobile homescreen)

Here is a breakdown of all the things you can do with the mobile app this year:
SCHEDULE 
Browse, filter and find Sessions, Office Hours, Codelabs, and App Reviews across 14 tracks. All sessions will be livestreamed this year and you can access the livestream channel or the session recording after the fact in the respective session detail screen.
MY I/O
This is where you'll find all your saved #io17 events. To make things easy for you, these will always be synced from your account across mobile and desktop, so you can switch back and forth as needed. And since we know May 17-19 will be quite busy days, we'll send you reminders right before your saved sessions are about to start.

Exclusive for onsite registered attendees: To help make it easier to attend your favorite talks and minimize lines, you'll be able to reserve seats for sessions in advance of I/O via google.com/io AND our mobile app - as long as you're signed in with the same email address you used to register for the festival. You can reserve as many sessions as you'd like per day, but only one reservation per time slot is allowed.

Reservations will be open until 1H before the start time for each session. If a particular session has already reached the reservation capacity, you can join the waitlist and we'll automatically change your reservation status if any spots open up. A portion of seats will still be available first-come, first-served onsite. Reservations are open starting today via the Session detail screens on the Android app and on google.com/io/schedule. Note: Reservations will also be available on iOS once the app is launched.
FEED
Read through the latest details and announcements about I/O. You can also opt-in to receive notifications from us about the event, so you don't miss a thing!
MAP
Guide yourself throughout Shoreline using the custom conference map.
INFO
Find more information about onsite WiFi, our content formats, travel tips to get to Shoreline, and more. Under Settings, you can also set the timezone for the schedule and opt-in to receive notifications.

Keeping up with the tradition, we'll be open sourcing the app after I/O. Until then, start getting ready for I/O; we hope the mobile app will help you navigate the schedule and grounds for a great experience. See you soon!

Update: The iOS app is now available for download.