opensource.google.com

Menu

Utilities for C/C++ Android Developers: fplutil 1.0

Monday, November 10, 2014


(cross-posted with the Android Developers Blog)

Today we're announcing the 1.0 release of fplutil, a set of small libraries and tools by Fun Propulsion Labs at Google* (the FPL in fplutil) that is useful when developing C/C++ applications for Android.

fplutil introduces the following:

  • build_all_android.py, an all-in-one build script that allows you to build (with the Android NDK), install and run native (C/C++) Android apps from the command line. This is ideal for build automation, but is also useful in a developer’s compile/run loop.
  • buildutil performs the configuration, build and archive steps of Android and Linux C/C++ applications using a suite of Python modules. This suite of modules can automate builds in a continuous integration environment. This framework uses legacy tools in the Android Development Toolkit.
  • libfplutil enables C/C++ developers to write traditional applications (like Hello World) using "main()" and "printf()" on Android.
  • android_ndk_perf.py is a desktop tool that enables native (C/C++) developers to measure the CPU utilization of their applications on Android, guiding their optimization efforts.  An example report is shown below:

android_ndk_perf.py example HTML report


You can download the latest open source release from our github page. We invite you to contribute to the project and join our discussion list!

By Stewart Miles, Fun Propulsion Labs at Google*

*Fun Propulsion Labs is a team within Google that's dedicated to advancing gaming on Android and other platforms.

Google Summer of Code wrap up: Ceph

Friday, November 7, 2014

We continue our Google Summer of Code 2014 wrap up series with Ceph, a distributed object store and file system. Patrick McGarry joins us for a review of two summer projects.



With our first year participating in Google Summer of Code (GSoC) in the rearview mirror, we are already looking forward to GSoC 2015. Over the summer, we learned useful lessons on how to engage with a broader audience and gained valuable code and developer insights. We had two GSoC students that were guided by three mentors, but we certainly hope to grow these numbers in the future. Read on for summaries of our developer projects.


Ceph Wireshark Dissector
Student: Kevin Cox
Mentor: Sage Weil


Wireshark, originally known as Ethereal, is a cross-platform, free and open source packet analyzer used for network troubleshooting, protocol development and general analysis. Although past efforts had been made to integrate Ceph protocols into Wireshark, these efforts were outdated and would no longer compile on a modern version of Wireshark.


This summer Kevin Cox was tasked with creating a new dissector that could be maintained easily and extended as both Ceph and Wireshark changed over time. The main points of the proposal were:
  • Create a strong framework from which the dissector can be built so that new message types can be added in the future
  • Develop code that allows the dissector to be accepted into upstream Wireshark
  • Work with the Wireshark team to get the dissector into Wireshark natively
  • Implement as many message types as possible


The code has been included in Wireshark, but it won't land until our next major release. Until then, users should follow the instructions on building and installing from the latest source. For more details, see Kevin’s student report.


Add Erasure Code to the Reliability Model
Student: Veronica Estrada Galiñanes
Mentors: Kyle Bader, Loïc Dachary


One of the compelling features behind Ceph is the built-in data reliability. The default scheme to ensure that your data will still be around in the event of hardware failures is replication.  Ceph takes data, splits it into chunks, and replicates those chunks (3x by default) across physical servers. There are many things that could affect the reliability of your data (writes, disk failures, network interruptions, etc) and Ceph's reliability model was based around the concept of this 3x replication.


“Erasure Coding” has recently been introduced as an alternative approach to data durability for Ceph. Unlike the default replication scheme, data can be stored in several chunks all on different physical servers with error correction information added. When one of those chunks becomes unavailable due to hardware failure, it can be reconstructed. The error correction information is much more efficient to store than literal copies of data; Ceph can often store data with erasure coding using only 1.4x the size of the data instead of 3x as with plain replication.


Veronica Estrada Galiñanes’ GSoC project was to model the impact that different replication schemes have on data durability in distributed systems. Veronica provided a thorough analysis starting with the existing system reliability. She then modeled several different approaches, including erasure coding and locally repairable codes. Although the analysis was focused on Ceph, it could be applied to any other object-based storage system.


This work provided a great methodology to analyze and confirm the redundancy and overall reliability of data within a Ceph system across a wide array of replication schemes. For the full student report, read Veronica's final report.


As we worked with the students, mentors, and other organization admins within the Google Summer of Code, we realized that students often have a different perspective of the world. This fresh perspective can offer insights and renewed enthusiasm that would otherwise be difficult to achieve. We found our experience with the program to be rewarding both in a tangible sense (code/developers) and, perhaps more importantly, in the intangible of new ideas and experience that will help broaden our ecosystem in the future. We hope to participate again next year!


By Patrick McGarry, Ceph Organization Administrator

GSoC Reunion Recap with Abhishek Das

Wednesday, November 5, 2014

To celebrate the tenth year of Google Summer of Code (GSoC), we recently welcomed over 500 people who’ve participated over the years to a special Reunion event. We’d like to share a few recaps of the event from the perspectives of students and mentors who joined us from 50 different countries. Today’s summary comes from Abhishek Das, a student participant in GSoC 2013 and 2014.



In celebration of the 10th anniversary of Google's prestigious Summer of Code program, they organized a reunion for mentors and students from the past 10 iterations of Summer of Code in San Jose, California from October 23-26. I attended the event as a student and a representative of the OWASP foundation.


I traveled from New Delhi, India and arrived in San Jose early morning on the 23rd and checked in at my hotel. I knew I'd be staying in the heart of Silicon Valley but was nonetheless pleasantly surprised to see the Adobe headquarters from my room! The evening was spent registering for the event and socializing with other developers who had flown in from all over the world. It was a delightful experience to randomly bump into developers and get to know about their organizations and open source projects.


The next day was a fun outing to the Great America theme park. Google had bought out the park for the whole day just for the summit attendees! That evening, a GSoC celebration event was held at the San Jose Tech Museum of Innovation. It was a wonderful (semi-)formal get together, full of geek speak and inspiring talks. Among the speakers were Chris DiBona, Alfred Spector, Peter Norvig, Dirk Hohndel and Linus Torvalds! Mr. DiBona talked about how he came up with the idea of Summer of Code and the immense impact it has had over the past 10 years as it continues to grow. Mr. Norvig's short inspiring talk mentioned how a bad craftsman blames his tools and how a good one wouldn't differentiate between the two. Hohndel emphasized the need and importance of valuing criticism. And Torvalds implored budding developers to develop good taste and to know what to keep and more importantly, what to throw away. Selfies with the guests followed alongside lavish drinks and buffet. 


The unconference sessions started Saturday morning. I loved the idea of having spontaneous sessions with lots of free interaction rather than the rigidity that is usually associated with conferences. Some sessions were run by Googlers but most were run by attendees. The first one I attended was by Grant Grundler (Googler) on Chrome OS. He talked about the future of Chrome OS and Android, the development cycle of a hardware-based product such as a Chromebook, the support model of Chrome OS and ended with a Q&A.

Next up was one on data visualization libraries. People talked about the libraries they were using and the applications they'd built using them. Others asked questions and lots of new ideas came up.

Among other sessions I attended were ones on Processing, bioinformatics (scope, ongoing work and future), artificial intelligence (again a brainstorming and ideation meetup), big data, robotics and Google Cardboard! There were also several lightning talks going on at the same time in the Ballroom where organization representatives introduced their projects in under 3 minutes. It’s always fun to listen to these quick talks and get familiar with their work.

Sunday morning began with the much awaited trip to the Googleplex.


Sessions continued till the afternoon after which we had to bid farewell. Carol Smith conducted the feedback session and delivered the closing address.

It was an absolutely awesome event. The feeling of getting to meet FOSS superstars in person, people who I'd been following on GitHub or Twitter for a while, was inexplicable. The idea of having a sticker exchange as well as a chocolate room was perfect. And most importantly, the organisers got all the basic things spot on: get open source developers from different backgrounds in one place and make it as comfortable as possible for them to interact and have productive discussions with each other (no shuttling between the conference venue and accommodation, free and fast WiFi, awesome food and drinks, a formal celebratory dinner, schwag, and so on). A big shout out to Carol, Chris, Stephanie, and the entire Google Open Source Programs team for an amazing event!


By Abhishek Das

Google Summer of Code wrapup: The Concord Consortium

Friday, October 31, 2014

Today’s Google Summer of Code wrap-up comes from Cynthia McIntyre at the Concord Consortium, a provider of online educational activities.



The Concord Consortium is a non profit R&D organization based in Concord, MA, dedicated to transforming education through technology. Our digital tools and learning activities capture the power of curiosity and create revolutionary new approaches to science, math and engineering education that bring out the inner scientist in everyone.


Our two Google Summer of Code students did a fabulous job this summer.


Mobile-friendly HTML5 Seismic Eruption 
mash-up
Abhinav Mukherjee worked on an HTML5 version of the popular Seismic Eruption software. (The original version ran only on Windows.) He has created a client side application that pulls data from the U.S. Geological Survey and displays it both on a 2D map using leaflet and in 3D space using three.js.


The software shows a visual display of the distribution, depth and magnitude/strength of the earthquakes and eruptions, as well as popup information about the type of volcano, date of eruption and information about plate boundaries. A user can cut a cross section into the 2D map, then choose the 3D view, or adjust the time range of the data being displayed in order to focus on certain earthquakes. We look forward to embedding this software in Earth science activities for middle and high school teachers.


Data analytics for user actions in HTML5 web apps
For our educational research, we would like to be able to capture detailed logs of student actions in browser-based activities, then analyze the data in a shared tool. Peeyush Agarwal worked on the Data Analytics Log Manager, a new server-side application that makes it easier for any project to log user events and then view them using CODAP (our Common Online Data Analysis Platform).


Logs from HTML5 applications or other client-side apps (e.g. Java) can be posted to the log manager, which stores them and provides access to registered researchers. The logs can then be filtered and transformed through a variety of methods (adding calculated metadata, adding new "synthetic events" by pattern matching) before being imported into CODAP for visual analysis.


By Cynthia McIntyre, The Concord Consortium Organization Administrator

Google Summer of Code wrapup: OpenMRS

Friday, October 24, 2014

As a long-time Google Summer of Code participant, OpenMRS had twelve Google Summer of Code students in 2014. One of those students, Stephen Po-Chedley, writes more about his experience below as well as other students’ projects.


OpenMRS logo

Waking up to an uneventful landing in September 2013, I found our plane surrounded by dry grass fields. I couldn’t even tell that we were on a runway. I had slept through the approach over small clay houses and family gardens. This small, dusty country of Malawi is where I would spend the next year.

Prior to Autumn 2013, I had been a PhD student studying climate change in Seattle. As part of my research, I was constantly working through random technical and computational challenges. It seemed like every week I was hacking together some code in some unfamiliar language. While the work was challenging and interesting, I wanted to take some time away from my studies to apply some of these technological skills to issues even more acute than climate change.

Upon deplaning, I stepped away from supercomputers meant for climate research and found myself in Malawi working with barely functional laptops. As a volunteer with a health NGO in Malawi, I was slotted to help support the OpenMRS based electronic medical records system that was crucial for monitoring and evaluating the remote district’s health progress. OpenMRS is an open source medical records system used on every continent. The system was created to help provide management tools to meet global health challenges, especially in resource poor countries.

I quickly understood why OpenMRS was such an important tool. The system could generate reports to help us track down patients that had missed appointments, we could flag people who needed a change in medication or a new lab test, doctors could get an overview of their clinical practices, and clinical programs could get a snapshot of their patient cohorts.

Of course, any information that we derive is only as good as the data it comes from. With an entire district of health data being fed into the system, it is easy to miss some parts of records or mis-enter information. Any errors have the potential to affect patient care or high-level decisions made about programs. We need not only good data, but to also understand the quality of the data we have. And this is where Google Summer of Code (GSoC) became so important.

Over the last few months, I was able to work with mentors to design and begin to build a module within OpenMRS to help assess data quality. Beginning work on the project was terrifying for me because my programming experience was mostly hacking together code for scientific analysis. Most of my programming education has been through exhaustive Google searches and discussions with fellow geeks, but this was nearly impossible in Malawi working off of an unreliable satellite internet connection with pretty limited bandwidth.

But I could see that the project was important. My mentors were awesome and the OpenMRS community was incredibly supportive, offering invaluable advice to those that are new to the community. Throughout the summer, I learned a ton of new technologies and — together with my mentors — made a lot of progress on our project.


Group photo climbing a mountain
Myself (crouching lower left) with my mentor Cosmin Ioan (standing left), and other colleagues climbing Sapitwa Mountain in Malawi.

Being involved with OpenMRS and Google Summer of Code 2014 was incredibly exciting and I feel fortunate that there are opportunities to continue to stay involved with the community. One important lesson was that open source projects have all kinds of ways to help. The OpenMRS tagline for GSoC is “Write code. Save Lives.” From my experience as an implementer and developer of OpenMRS, that motto rings completely true. It has been inspiring to see code pieced together by a diverse community of contributors from all over the planet to create a system that is literally saving lives.

You need look no further than the projects worked on during GSoC 2014 to get an idea of all the important work going on at OpenMRS:


On behalf of all the students involved with OpenMRS and the Google Summer of Code 2014, thank you to OpenMRS and to Google for supporting our work and to our mentors that helped make the summer so successful. It was an incredible opportunity to learn so much from world-class mentors, be involved in important work that makes a huge difference, and to get exposure to the rich communities that support open source projects.

By Stephen Po-Chedley, OpenMRS Student, 2014

.