Is Serverless the way to go? – Part 2

serverlessIn my last post (https://pabloclementeperez.wordpress.com/2017/09/18/is-serverless-the-way-to-go-part-1/) we looked at many problems developers and enterprises encounter when trying to scale up their systems and handle heavy traffic at irregular intervals.

Serverless is a new and fresh perspective where your code is encapsulated and contained in a virtual environment, this environment is then moved on demand through different types of architecture so that you are always able to meet the demand you need. What really happens is that big companies like Amazon have huge infrastructure provision, so what they do is they take their servers and deploy your code in different instances according to demand, they then charge you by time execution (usually per 100ms of execution time). This means that you only pay for the actual time your code is run, and not for the number of instances you need.

Amazon is so proud of Lambda it decided to make one of their videos you can watch below:

 

You probably are thinking that this all sounds great and that why the hell would anyone go for a normal infrastructure like paradigm. Well, there are many drawbacks, the first one is that every time your virtual container is run on a new instance you need to set up your environment, load your libraries and dependencies, and start the system. This costs precious seconds, which means your users would have to wait over 5 seconds to receive their API call for instance. This time is lower if you use lightweight languages like Node.js or Python, but can be terrible if you use Java (since you need to load the Java Virtual Machine which is extremely resource hungry). There is a very interesting article about this here https://read.acloud.guru/does-coding-language-memory-or-package-size-affect-cold-starts-of-aws-lambda-a15e26d12c76

One more thing to consider is that if you run a website, Lambda is not the best way to so do, as your content could take a lot to be available, and you would need space on the instance to serve your content. So, it is extremely oriented towards event driven architectures, such as APIs. Another thing to bear in mind is that the less frameworks you use, the faster load times will be, if you decide to use a lightweight language with your own custom implementation (Python with as few frameworks as possible for instance) you’ll get amazing performance.

What do you think about serverless? Drop me a line in the comments!

Thank you for reading!

Advertisements

Is Serverless the way to go? – Part 1

If you are currently in the IT business and rely on Internet infrastructure to serve data you probably know what a pain it is to manage those IT systems. Constantly having to manage servers to increase throughput, lower costs, ensure autoscaling and keep latency at bay is a tremendous effort. It has even spun a new role in the industry, the Dev Ops.

servers

Amazon Web Services (I’ll be using them as the example since they are the leader, but other providers have similar resources) have made giant efforts to try to help developers with this aspect. One of the resources they offer is what they call Elastic Beanstalk. This effectively is a system that allows you to provision code to a number of instances that are behind a load balancer. The load balancer is the key, as it can deploy code into instances by taking them out of the group until they are ready and it handles auto scaling. Auto scaling is handled via triggers, for instance, if you use a CPU trigger, when the overall CPU usage goes over X% the load balancer will spun a new instance with your code and add it to your group, and when it goes below X% it will remove instances. Basically, it helps you manage instances while you maintain full control of everything. So, everything covered no? Amazon felt it was so great three years ago they made a strange video with a curious voice over (honestly, with the budget these guys handle you think they could do better) you can watch below.

However, the truth is this system has immense limitations, the first of which is what happens if you get a traffic spike. When you know you are expecting heavy traffic you can get ready for it by provisioning more instances, but what when that catches you by surprise? Imagine a blog post you don’t expect or some other type of uncontrolled media like an influencer. You are basically screwed, since the load balancer is not particularly agile at sensing something that doesn’t grow in a linear fashion (it typically uses health checks every 1 to 5 minutes), so your system would probably go down as your instances serverlesswould get saturated.
So how do you solve this? How do you prepare for situations like this without having to spend vast amounts of money of infrastructure provision? One of the possibilties is going serverless, and we will analyse what it is and how it works in the next blog post 😉

 

Hope to see you there!

SwiftQR – The fastest QR code reader

A few weeks ago I started looking into Metal (https://developer.apple.com/metal/) on iOS. This is basically a technology that allows you to access graphics chips on iOS devices on a much lower level than typical OpenGL drivers and thus translates in a huge speed boost.

One of the things that pains me most about iOS is that there is no perfect QR code scanner, and they are all painfully slow, so I wondered what could happen if I applied metal imaging technology to QR code recognition and the results blew me away. It is by far the fastest QR code scanner on the App Store. Just try it and see for youself.

As a treat for my readers, it will remain free for a limited period of time. So grab it before it is too late!

qrApp1024Oh, and the name of this beauty? SwiftQR, because it is fast and build in Swift 😉 (how geeky is that!). You can view the description below, the download link, and some screenshots.

Until next time!

 


How many QR codes do we see every day? They are everywhere, from leaflets and magazines to buildings and cars. Wish there could be a faster way to read them? Well wish no more! Leveraging powerful image recognition techniques this is the fastest QR code reader out there. Just give it a try and see for yourself!

Plus, all the QR codes will be saved to your history so that you can view them later and organise them. And if all that wasn’t enough, you can easily create your own QR codes and share them!

Upgrade your QR code scanning experience today!

Available_on_the_App_Store_(black)

Building a new Wave

Location sharing is a daunting proposal. We live in a day and age where users are extremely concerned with their privacy, and they are right about it, with power and technology, comes a huge responsibility, and not everyone makes the right choices when it comes to that.

Icon_Itunes_1024x1024We have been overwhelmed by the response Wave has had. Users around the globe love it. With over 8 million users and a new Wave opened every second, it is clear that we have created a tool that fits into more and more lives every day. However, times change and we are committed to adapt to what you need and want. There is a famous quote by Lewis Carroll from Alice in Wonderland that says: “My dear, here we must run as fast as we can, just to stay in place. And if you wish to go anywhere you must run twice as fast as that”. That is the motto we must follow in the tech world to be on the bleeding edge and give you the best App, so that you can forget that the phrase “Where are you?” ever existed.

This commitment to you led us back to the drawing board to rethink everything we do and why we do it. We partnered with top design talents and listened very carefully to all the user feedback. What this meant is we started Wave from scratch. This was a perfect opportunity to start again, rethink everything, improve efficiency and introduce really robust and scalable real time systems.

With that in mind we build Wave 3.0. And I couldn’t be prouder to tell you that you can download it right now from the App Store and Google Play.

Wave front

So, why should you choose us? Wave’s core value is its technology, it is the mechanic heart that runs everything and that conveys our experience, this meant that if we wanted to be the go-to App to finding your family and friends, we had to make sure that we excelled in three main pillars:

The first one is security. Your location is an extremely valuable tool, it can be used to meet your friends, or to hurt you. That is why we decided to use military grade encryption and ensure that only the people you are waving with can see your location. We use SSL grade A encryption, dynamic tokens that change periodically and end to end encryption to make this the App even the military could use.

The second one is reliability and speed. What good is a location tool if it is not fast sending your location? Or if it cannot scale up as needed? We have worked endless hours on custom backend systems that combine state of the art technology, with trusted complex systems used in telephony to handle an unheard-of concurrency and achieve load times that make you believe in magic.

The third one is efficiency. Sharing your location can be a battery hog. We have all experienced extreme draining from using apps like Google Maps. This has led us to work on the most advanced location algorithms available, using triangulation via accelerometers, network positioning and the GPS sensor to be the most battery friendly app out there whilst pinpointing your location with extreme accuracy.

We know that just as a healthy heart is the key to a great athlete, our technology is from where we build everything. We have made it so effortless it fades away when you use it and it is what makes us the best location sharing App. Our laser like focus on the important will always be there to provide the definitive App you as user deserve.

You can read more about what how our technology works in a post on the AWS blog (https://aws.amazon.com/es/blogs/database/wave-a-private-location-app-running-on-amazon-rds/), and of course our new website is also a great place to find out more about us https://www.waveapplication.com/

This slideshow requires JavaScript.

We pair all of this we an eye-popping design and cool new features such as:

  • The ability to transform individual Waves into group Waves
  • You can now send your location to anyone via a URL they can view in a web page (this is what we call Unidirectional Waves), so you can have an awesome experience even with people who don’t have the App installed.
  • We have a new people-centered UI.
  • Our chat is now blazing fast and be accessed everywhere.

mockup_unidireccionales

But this is just the tip of the iceberg, check out the new version for yourself and let us know what you think! You can download it by accessing https://download.waveapplication.com or by scanning the following QR code on your device:

static_qr_code_without_logo

Hope you enjoy it!

Feel free to drop a line on the comments or reach me at pablo@waveapplication.com with any questions 🙂

Location sharing is “The next big thing”

Hello dear reader,

5b6b45f022a45f0d1b2e05a8c35f85c4It has been a busy last few weeks for many companies, it seems that they have decided that our vision for the last four years was correct and have decided to roll out location sharing in a variety of Apps. Curiously they all have understood that constant location is totally absurd, and that what users really want is a timed experience that respects privacy (Please, our dear friends at Zenly take note, constant location sharing is off the plate for most users)

The first announcement was a rumour that WhatApp was rolling this out for groups. It came out as a post on Reddit and sparked a massive privacy outrage. This is no surprise, since it was the same day they announced targeted ads. You can read more about it here: https://techcrunch.com/2017/02/03/whatsapp-tests-real-time-location-sharing-in-its-app/

The second came from Google Maps, they have decided your hangouts contacts could use a little sprucing from knowing your location, although it only works in a unidirectional paradigm (unless you both send a request). They made a funky video in a Google-style that illustrates the approach.

Last, but not least, in an attempt to copy everything that works, Facebook (or pseudo Snapchat as some people say) decided to join the party too. You can now share your live location with your messenger contacts. https://9to5mac.com/2017/03/27/facebook-messenger-live-location/

It is clear why all these big names are pursuing this, and it is clear that it is time for a leader to take the market. However, I personally wouldn’t trust those big names with my location data. After all, we have seen what and how they use it for. There is a reason why we at Wave have had this approach from the beginning, we are completely focused on being the best-most private location App. So, do yourself a favour and stay with who will never save or use your data, always use the best technology, and, why not, the cooler App ;).

giphy_7

There is a reason we have been so quiet lately, so keep your eyes peeled, because we are about to make location sharing go from red hot, to absolutely scorching ;)!

Feel free to drop a line in the comments!

Until next time!

Google Certification Q&A

Hi again!

As promised, after obtaining my Google Certification exam as I mentioned in my previous post (https://pabloclementeperez.wordpress.com/2017/03/21/google-certified-associate-android-developer/), and since there is still few and scarce information online, I have decided to write up a comprehensive QA on how the exam works. I hope you find it useful!

developers_logo

What is it?

Google Developer Certification is a program designed so you can show what you can do and not simply what you know. It allows you to demonstrate your proficiency and skill with typical tasks that you as a developer perform daily in your job.

In taking and passing a certification exam, you will become recognized for your skills, which in turn will allow you to promote yourself to relevant communities, projects, or employers.

You can view the full announcement here:

How to get ready?

It is important to bear in mind that this certification is handled both by Google and Udacity, in fact, if you go into the offitial website, you are recommended the Andriod Developer Fast Track course. I received a scholarship for this course, and it has a very similar format as the exam, you are given Android Studio Projects with to-dos that run you through the basics. If you are not entirely sure if you know everything, or are afraid of the exam format, it might be a good investment. There are a couple of caveats to bear in mind though:

-The course does not cover everything in the exam, such as UI testing and unit testing.

-The course is a mixture of other courses and sometimes feels as if it was put together to make use of these instead of a tailormade course.

What do I have to know?

The offitial requirements are: 

Testing and Debugging

Writing tests to verify that the application’s logic and user interface are performing as expected, and executing those tests using the developer tools. Candidates should be able to analyze application crashes, and find common bugs such as layout errors and memory leaks. This includes working with the debuggers to step through application code and verify expected behavior.

  • Write and execute a local JVM unit test
  • Write and execute a device UI test
  • Given a problem description, replicate the failure
  • Use the system log to output debug information
  • Debug and fix an application crash (uncaught exception)
  • Debug and fix an activity lifecycle issue
  • Debug and fix an issue binding data to views

Application User Interface (UI) and User Experience (UX)

Implementation of the visual and navigational components of an application’s design. This includes constructing layouts–using both XML and Java code–that consist of the standard framework UI elements as well as custom views. Candidates should have a working knowledge of using view styles and theme attributes to apply a consistent look and feel across an entire application. Understanding of how to include features that expand the application’s audience through accessibility and localization may also be required.

  • Mock up the main screens and navigation flow of the application
  • Describe interactions between UI, background task, and data persistence
  • Construct a layout using XML or Java code
  • Create a custom view class and add it to a layout
  • Implement a custom application theme
  • Apply a custom style to a group of common widgets
  • Define a RecyclerView item list
  • Bind local data to a RecyclerView list
  • Implement menu-based or drawer navigation
  • Localize the application’s UI text into one other language
  • Apply content descriptions to views for accessibility
  • Add accessibility hooks to a custom view

Fundamental Application Components

Understanding of Android’s top-level application components (Activity, Service, Broadcast Receiver, Content Provider) and the lifecycle associated with each one. Candidates should be able to describe the types of application logic that would be best suited for each component, and whether that component is executing in the foreground or in the background. This includes strategies for determining how and when to execute background work.

  • Describe an application’s key functional and nonfunctional requirements
  • Create an Activity that displays a layout resource
  • Fetch local data from disk using a Loader on a background thread
  • Propagate data changes through a Loader to the UI
  • Schedule a time-sensitive task using alarms
  • Schedule a background task using JobScheduler
  • Execute a background task inside of a Service
  • Implement non-standard task stack navigation (deep links)
  • Integrate code from an external support library

Persistent Data Storage

Determining appropriate use cases for local persisted data, and designing solutions to implement data storage using files, preferences, and databases. This includes implementing strategies for bundling static data with applications, caching data from remote sources, and managing user-generated private data. Candidates should also be able to describe platform features that allow applications to store data securely and share that data with other applications in a secure manner.

  • Define a database schema; include tables, fields, and indices
  • Create an application-private database file
  • Construct database queries returning single results
  • Construct database queries returning multiple results
  • Insert new items into a database
  • Update or delete existing items in a database
  • Expose a database to other applications via Content Provider
  • Read and parse raw resources or asset files
  • Create persistent preference data from user input
  • Toggle application logic based on preference values

Enhanced System Integration

Extending applications to integrate with interfaces outside the core application experience through notifications and app widgets. This includes displaying information to the user through these elements and keeping that information up to date. Candidates should also understand how to provide proper navigation from these external interfaces into the application’s main task, including appropriate handling of deep links.

  • Create an app widget that displays on the device home screen
  • Implement a task to update the app widget periodically
  • Create and display a notification to the user

 

What is the exam like?

The exam consists of two parts. The first one is an Android Studio Project with a set of requirements and user feedback. The idea is you are given a project a previous developer left in a hurry and have to complete a series of tasks ASAP. It includes creating new screens, modifying code, adding persistence, creating widgets, showing notifications, writing tests and fixing bugs reported by users.

You have 48 hours to complete the exam, but if you are a proficient Android developer it should take you around 6-10 hours.

After the exam you will have to complete an exit interview. In this interview you will have to answer a series of questions about your App to prove that you have written the code yourself. You will also be asked general Android knowledge questions. If you have done the exam yourself, this should be a breeze.

What will I obtain?

You will obtain a badge to prove your Google Certificated Associated Android Developer status. You can view mine here.

Other questions?

Feel free to drop me a line in the comments if you would like to know anything else and I’ll update the post 🙂

 

Google Certified Associate Android Developer

 

Hi dear reader!

As some of you know, a while back I received an Scholarship from Google to take the Android Developer Fast Track Course form Udacity (https://www.udacity.com/course/associate-android-developer-fast-track–nd818). This is a course designed to polish your Android Developer skills, best practises, and development techniques in Java in order to obtain the Google Google Associate Android Developer Certification.

developers_logoThis certification is a new way Google has devised to officially prove your Android and App development skills. You can find more info in this link (https://developers.google.com/training/certification/), and by watching the following video

As part of the course, to make sure I was ready to take the certification, I had to build some cool Apps. I’ve published one so that you can see if you are up to the certification. The App (movieDB) connects to themoviedb.org database and queries the top rated and popular movies. It then downloads the movie posters asynchronously and displays them in a recycler view. Users can access a movie to view information, the trailers, and comments by other users. There is also an sqlite database that works with a content provider to save movies to watch later, and a settings screen to switch between the different modes. It uses an MVC architecture and is designed to work on limited hardware.

You can download it from the following link! It covers many basic requirements in the certification exam!

en_badge_web_generic

I recently took and passed the exam!! You can view my official badge here! It has been a great opportunity to brush up on best practises, and have the chance to have Google verify your code.

In my next post, I’ll be doing a much-asked-for QA post on the certification.

See you then!