Wireless, cross-device, photo syncing in 2017

I've been meaning for a long time now, to share what I'm doing in regards to synchronizing photos across all of my devices. I originally posted back in 2014 how I was doing it, and again in 2015 with updates as technology changed. In 2016, my photo synchronization strategy changed once again, but I never got around to writing a post on it. So here I am, in 2017, sharing what's changed. As is usually the case with these posts - it's hefty. So get yourself your favorite beverage and snack!

What's changed?

Before we get into the nitty-gritty details, lets take a look at what i've changed first.

From a sync perspective, I've stopped using iCloud. It was a huge pain to deal with when trying to manage my photos in Lightroom. Exporting them from iCloud Photo Library, into Lightroom, tweaking them etc, and then re-importing the photos back into iCloud was extremely tedious and time consuming. Because of this, I found that I hardly ever actually migrated photos and it made it really hard to go back and find photos over time. Remember, this was early to mid 2016 - so iOS and macOS Photo apps were not as smart as they currently are now.

Ultimately, I setup a Google Photos library on my Google account. I then synced my entire Lightroom library into Google Photos. This worked amazingly well. The iOS Google Photos app would automatically upload my new photos in the background, and they'd sync down to my computers into my Lightroom library folder - ready for me to just perform "add missing files" in Lightroom. Any changes I made to the photos were immediately synced to all devices, because the library and photo lived in the synchronized Google Photos folder. The setup for this is explained in detail further below.

The biggest thing however is that I've stopped using Lightroom for photo organization. That does not however mean that my current solution wouldn't work with Lightroom. I was using Lightroom when I changed my syncing solution, and it worked without a problem. I just found that Google did such an amazing job with searching images, that I no longer needed to spend so much time organizing them myself. I now let Google Photos handle all of my organization needs. I explain this in more detail below.

The biggest gain from this change, for me, is that now my photos are synced across all devices, even those that are not Apple. We have an Android device in the house, and a couple Windows machines. All of which have my photos synced to. My wife has the Google Photos app installed on her iPhone and iPad, connected to my account. So her photos now sync into my Google Photos library (and at one point my Lightroom library). With virtually no management on my end, I'm syncing photos from 2 completely different Apple accounts, into a single consolidated family photo library. That's a big win for me.

Moving to Google Photos

When moving to Google Photos, there are a couple different routes you can take. It depends on what your end goals are.

The free solution

If you are not currently using any app, like Aperture or Lightroom, to manage your photos then setting up Google Photos is easy. You just install the Google Photos iOS or Android app, and configure it to automatically back up your photos. On iOS, it looks like this:

When you turn on Back up & sync, Google Photos on iOS will automatically back up your photos for you to the Google Photos service. Google Photos gives you unlimited photo uploads for pictures that are 16 megapixels or less. All of the current iPhones on the market take photos at less than 16 megapixels, so you can use the service for free with no limits. Google Photos will also let you store unlimited 1080p videos as well. Since some iPhones on the market can record 4K video, you would want to choose whether or not you want to record in 1080p so you can sync them for free, or record them in 4K and upload until you run out of storage space, which is 15gb on the free account.

If you go this route, all you have to do is install and sign in to your Google Photos account on all of your phones and tablets. Then you can access the photos from the Google Photos website on your computer.

The integrated Desktop solution

If you are using an app to organize your photos, or are wanting to start using one, then you'll want to get this photos synchronized to your desktop computer. This is extremely easy to do, at the cost of paying a monthly subscription to Google Drive. I currently pay $10 per month, for 1 terabyte of storage. Once you've done that, you can go to your Google Photos settings, from the website, and turn on Google Drive.

Once you have turned on Google Drive support in your Photos settings, you can install the Google Drive app on your macOS or Windows computer. Once it is installed, it will automatically sync all of your photos from Google Photos to your computer. Here you can see that my original Lightroom based organization is still intact, even though these photos exist now in Google Photos.

Since I stopped managing photos myself, any new photo I add to Google Photos gets put under the Google Photos folder, within a folder indicating the year the photo was created. This is why you see Google Photos\2010, and Google Photos\Digital Photos\10s\2010. Google will at least organize your photos by year for you automatically, if you choose not to use any software to manually handle this.

With this, you now have every photo you take, regardless if it's an iOS or Android device, synchronized to your desktop computer. From there, you can open Lightroom, select the Google Photos directory and have it import all new Photos for you. Once they're imported, any changes made to the photos, (including their file location as long as it's someplace under the Google Photos folder) will be synced to all of your devices automatically.

Leaving Lightroom

So now that we've talked about my synchronization solution, let me spend a couple minutes explaining why I moved away from Lightroom all together for my organizational needs.

The biggest reason is time. I don't have much of it, and I have to set aside a block of time to organize several hundred, or a thousand, photos every couple of weeks. My organization routine typically included moving the photos into sub-folders representing the activity that took place, tagging every photo and confirming facial recognition. This usually took a minimum of two hours for me.

Enter Google Photos. They do most of this for me. The only exception is that they organize the photos under a single folder, representing the year. Where-as I would break the photos up under a year, by month. Here you can see Google Photos organization of the photos since I stopped doing it myself, for 2017.

They organize them in a single directory for the entire year. When I used to organize them in Lightroom, I organized them by year, month and activity as seen here.

I now just use Windows Explorer to move specific sets of Photos into sub-folders if I need to. Any photo that is stored within a sub-folder of the year, will let Google Photos create an album for it. For instance, in my example photo above, I have a folder called eating at Islands Burgers. Google turned that into an album for me, so when I search for Islands Burgers in Google Photos (regardless if it's the mobile app or website) their auto-complete will know what you mean and present it as an option.

This to me is pretty awesome. My custom organization strategies can be persisted across all of my devices using Google Photos this way. So why pay for Lightroom for organizing? Just organize them in Windows Explorer if you want. If I were to select the Eating at Islands Burgers album suggested to me, I would be presented with the album (represented as a folder on my computer) as shown below.

Now, Lightroom does some other things - such as tagging your photos. Unfortunately Google Photos doesn't read your tags or support custom tagging of photos. Here's the crazy thing though. They scan the photos for content and automatically associate tags for you. From my experience with it, it does a far better job of it than I ever did. For example, I can search for all photos of Batman - and get back comic books and clothes. None of these photos were tagged by me in Lightroom. Even the blanket in the photo has batman in it!

Another example is searching for "Zoo", which presented me with photos both my wife and I had taken at the various zoos we've been two. It also included two different albums we had created with photos from different occasions.

I've searched for Nintendo controllers, Monitors, 2006 Scion Xb, Chihuahua and have been given every photo containing these items. It is amazing when you experience it for the first time. Once I used it enough to see how accurate and thorough Google Photos tags stuff, I stopped worrying about tagging things myself.

Lightroom supports facial recognition, and so does Google Photos. Google Photos does an amazing job of it though. I synced photos of our newborn daughter and assigned her a face in Google Photos. From that point forward, as we take pictures of her it automatically assigns her face to the photos. Even though she's now 3 years old and looks completely different from the 1 hour old baby I first uploaded a picture of, Google Photos has kept up and figured it out. Since Google Photos handles this, I stopped using this feature in Lightroom.

The last thing that Lightroom is good at is editing the actual photos. Google Photos has some basic tools, like crop, rotate etc. It even has a few filters you can apply. It's not the powerhouse that Lightroom is though, so if you find yourself editing photos often, you'll still want to keep doing that in Lightroom. This is something I hardly ever did, so it was just one less reason for me to keep paying for Lightroom.

Even though Google Photos can automatically do a lot of what you have to do manually in Lightroom, there isn't anything stopping you from continuing to use Lightroom.

Google Photos Assistant

Google Photos has a feature called the Assistant which will automatically take photos you've uploaded and turn them into albums, collages, home movies and animated gifs. It's really awesome. For example, it took a series of photos over the course of two weeks of my son and organized them into an album and collage for me called Highlights of Oliver

Selecting the Highlights of Oliver tile opened up the collage so that I can vew around 20 photos of him over a span of two weeks. Photos taken by both myself and my wife, which is really a nice touch.

Google Assistant on Android

The last thing that's neat, if you are on an Android device that supports the Google Assistant, is that the Google Assistant will search your photos too. Here I asked the Assistant to find photos from a park, and it knew not to just do a Google search of park pictures. Instead, it searched my personal photo collection and find some photos. If I touched the Google Photos button, it would open the app and give me a wider selection of images to look through.

Wrapping up

I've used this system for over a year now and love it. It has simplified the way I do photo synchronization and management across all of my devices, and my wifes devices.

Lightmap for .Net

I've been working on a new open source project called Lightmap that provides developers with a way to model their databases, in a database agnostic manor. This is done by creating migration objects that define what the table layout (along with other database objects) would look like. Lightmap supports several different ways of doing this - the following example shows just one. We'll use a couple different C# model classes to represent tables, related to each other.

Migrations

We'll use the following two classes as our table definitions.

public class User
{
    public int UserId { get; set; }
    public string Email { get; set; }
    public int LockoutEnabled { get; set; }
    public string PasswordHash { get; set; }
    public string UserName { get; set; }
}

public class UserLogins
{
    public string LoginProvider { get; set; }
    public int ProviderId { get; set; }
    public string ProviderDisplayName { get; set; }
    public string UserId { get; set; }
}

Next we'll create our database model with an initial migration object.

public class InitialMigration : IMigration
{
    public InitialMigration(IDataModel dataModel) => this.DataModel = dataModel;

    public IDataModel DataModel { get; }

    public void Apply()
    {
        this.DataModel.AddTable<User>()
            .AlterColumn(table => table.UserId).IsPrimaryKey();

        this.DataModel.AddTable<UserLogin>()
            .AlterColumn(table => table.ProviderId).IsPrimaryKey()
            .WithForeignKey<User>(
                (userTable, loginTable) => userTable.UserId == loginTable.UserId);
    }

    public void Revert() { } // Revert support not implemented yet.
}

The API is fairly straight forward, and has hook points for database provider specific implementations to expose additional constraints and database features via extension methods.

Wiring it up

To get it wired up in your application, you need to create an instance of the IDataModel implementation, IDatabaseManager implementation for the database of your choice, along with an instance of an IDatabaseMigrator that works with your database.

Currently only Sqlite has working implementations. The Lightmap API and base feature set is still being developed; until it's stabilized, I won't be adding other databases myself. Sql Server and MySql are the next two I plan on supporting as soon as the API churn quiets down.

The wire up for Lightmap will be simplified in the future as well, for apps that use ASP.Net Core. For now, you would wire it all up manually like this:

IDataModel dataModel = new DataModel();
IDatabaseManager databaseManager = new SqliteDatabaseManager("MyDb", "Data Source=MyDb.sqlite");
IMigration migration = new InitialMigration(dataModel);
IDatabaseMigrator migrator = new SqliteMigrator(migration);
migrator.Apply(databaseManager);

Ideally, all you would have to do is use the ASP.Net Core middleware to wire this up. I'm thinking of something along the lines of:

appBuilder.UseLightmap(config => config.WithSqlite());

There will be additional things on the configuration callback instance that you can use to setup various options, like default schema names.

Wrapping up

The project is still under active development and isn't ready for a release yet. If anyone would like to take it for a spin, they can clone it from GitHub, compile and add it to their projects. It currently only runs on NetStandard 1.4. The target framework will probably change to NetStandard 2.0 when that ships and I'll also work towards supporting Net46 as well so that the library can run on Full Framework, Mono and Core.

I'm not to far out from having an initial beta shipped on NuGet.

Wireless, Cross-device, photo syncing in 2015

Once again I'm visiting my work flow for syncing photos wirelessly from my phone, to my computer and back to the phone. I have blogged about this a few times in the past. In my last blog post regarding photo sync, I had turned to Lightroom mobile. It worked well for photos, but lacked any kind of support for videos.

A lot has changed over the last year. Now both Apple and Google provide bi-directional, wireless, sync of both photos and videos to and from your mobile devices, while keeping originals synced on your desktop computer and stored in the cloud. Take a photo or record a video on your device, open your computer to edit it, view the changes later in the day on your phone. It's pretty slick.

Now that both companies support sync in this manor, I thought I'd go over my workflow. The changes in the way both services handle the sync have caused me to change my work flow a bit. Since I use iOS and OS X devices most, I will be writing about Apples services today. At some point in the future I'll try and write something up on using Google Photos + Google Drive on Macs and iOS for cross-device syncing of photos and videos.

iCloud Photo Library

In 2014 Apple introduced the new iCloud Photo Library and Photos app in iOS 8. The iCloud Photo Library handles synchronizing all of your full resolution photos and videos across every iOS and OS X based device you own. Unfortunately, this is not available on AppleTV.

So, we need to turn on iCloud Photo Library on the iOS devices. You can do that by going into the iOS Settings app and navigating to Photos & Camera.

I typically leave my iOS devices with Optimize iPhone Storage enabled. This will upload the original files to the iCloud Photo Library; saving a reduce size version for the smaller iOS screens on the device. In some cases, it will remove the photo all together and leave a thumbnail. The next time you view the photo, it will download it again. I've only seen this happen on old photos, or when re-installing iOS fresh.

When you make this change you will notice that the Camera Roll is no longer available. Instead it is replaced with All Photos. That is because the photos are no longer stored on-device. Now they are stored in a shared library with multiple iOS devices, which requires more than what the original Camera Roll provided.

Now that we have iCloud Photo Library setup on your iOS devices to upload all of their photos and movies, we need to setup OS X. The Mac works much the same as iOS. You open up the Photos app (requires Yosemite or newer) and open up it's preferences. The only difference is that we want to tell the app to download all of the originals onto our Mac's hard-drive. This way, we always have our originals locally and aren't depending on the cloud keeping them forever.

Now we have all of our photos (and videos!) synchronizing wireless between our iOS devices and the Mac.

iCloud Photo Library to Lightroom

So we now have our photos and videos locally on our internal or external hard-drives. What do we do with them then? We export them from iCloud Photo Library and move them into Lightroom! I use Lightroom to handle all of my keywording and orginization of my photos and videos. The new OS X based Photos app fully supports keywording and organizing into albums and folders. It does have some issues, like not being able to move an album in and out of folders once the album is created. Keywords will sync across all of your devices, but the folder/album organization will not. Albums are only synced to iOS in a flattened layout, with no nested folders. An example of this on iOS looks like the following screenshot, where all of the years are flattened out.

As a result of this, I will continue to use Lightroom for my photo organization. I keep Lightroom as my source of truth, where all of my originals will always live. In Lightroom, they are organized like this:

So how do I get my photos from the OS X Photos app into Lightroom? I use a Smart Album in the Photos app! With Smart Albums, I can keep track of what date I last pulled photos into my Lightroom library. There are two Smart Albums I create. One that filters all photos that I have already brought into my Lightroom library, and a second that filters all photos that I have yet to export from Photos, and import into Lightroom.

So before we create our Smart Albums, we must first actually export the photos from iCloud Photo Library and get them into Lightroom. When I first turned on iCloud Photo Library, I had to wait just a little over 24 hours while it got all of the photos synchornized across the devices and downloaded onto my Mac. Your mileage will vary, depending on how many you have. You can see in the Photos preferences picture above, that it tells me my Photos library was just updated. That means I am in sync and nothing is outstanding. During a first time sync, it will count down how many photos and/or videos it has remaining to download onto your Mac.

So, if your sync is done, select the Photos library

Next you will need to select every photo in that library. You can do this with Command+A or using the Edit menu.

Lastly, we will export the selected photos from the Photos app, so that we can import them into Lightroom. Note that exporting will not remove them from iCloud Photo Library. It will instead create a copy of every photo and place the copy in the desired export folder. This is ideal, so that we can continue to view the photos and videos on our devices without any issue.

You can set some settings on your photos prior to the export taking place. I typically use the following settings for my exports.

Clicking the Export button will prompt you with where you want to store the files. You can store them anywhere for now. When we do the import into Lightroom, the Lightroom application will move them into their final resting place within your Lightroom library. So just pick a temporary location for now.

Now that the photos and videos have been exported, we need to get them into Lightroom. We can do that by opening Lightroom and doing an import.

On the left-hand side of the Lightroom import screen is the source of the files you want to bring into Lightroom. You will navigate to your temporary folder that holds your exported iCloud Photos. On the right-hand side you will select where your Lightroom library is, this will be their permanent storage location.

Now your photos are all set in Lightroom. You can go ahead and organize them, keyword them and edit them as you want. Next, make a back up of your Lightroom library! It's always good to keep a back up of your photos elsewhere once you have them all imported. Lightroom handles backups automatically for you when ever you close the app.

Once you are done organizing and keywording all of your photos and videos, go ahead and select them all in iCloud Photo Library and delete them. Once they are deleted, you will drag and drop all of the photos from Lightroom, into iCloud Photo Library. This will sync all of the keywords, meta-data, and edits made to your photos on to all of your devices.

Now you have your photos in sync across all devices. The first time you do this, it will take a bit. If you do this every couple of weeks, it won't be to much of a hastle. Let's cover how to do that now, using the Smart Albums I mentioned earlier!

Smart Albums

We will create a new Smart Album that will keep track of what photos and videos you have already imported and processed into Lightroom, and brought back into the iCloud Photo Library. A second Smart Album keeps track of what photos and videos are in your iCloud Photo Library, but not in Lightroom. These are going to be handled simply by tracking dates.

The first smart album is called "Importing - Pending", meaning these photos and videos are pending the import process into our master Lightroom library. You could call it something else, like "Need exporting" if you want.

This Smart Album will show me all of the photos and videos I need to export from iCloud Photo Library, and import into Lightroom. The nice part of using a Smart Album like this, is that now I know all of the photos I need to delete, and re-upload once I am done organizing my stuff in Lightroom. I can open this Smart Album, select all of the photos and videos, delete them, then drag and drop my stuff from Lightroom back into iCloud Photo Library. I set the date to be the date that I exported all of those photos.

The next Smart Album is what we will use to track what has already been imported into our Lightroom library. This will be called "Importing - Processed" and will have a date set to the day of the day you exported your photos. There might be some overlap when you next do some importing, but that's alright. Lightroom does a good job of detecting duplicate photos and show which ones it thinks are duplicates and won't import. Worse case, you have to review each photo for that one day. That's typically not many photos and videos and is worth the extra step to make sure you don't miss any.

Another option would be to add a keyword to every photo in your Lightroom library with a Lightroom keyword. Then you can create Smart Albums that look for that keyword. This way, new photos will lack it and can be added. The only downside is that keywords can't be applied to videos, which is why I chose not to go that route.

Now you have everything you need to keep both Photos and videos in sync across every single device, while maintaining the original, full-resolution, files on your local computer. By adding keywords correctly, you can do full searches in iOS and find photos really fast. As an example, I performed a search in my iCloud Photo Library (with nearly 9,000 files) on iOS for photos of an old car I had 8 years ago. The search results came back instantaneously.

Proper keywording of your photos in Lightroom (or in iCloud Photo Library if you don't want to use Lightroom) can really make it easy to find your photos.

Why Lightroom?

I used Lightroom in this example just because it is the photo suite that I use. The entire section based on Lightroom can be applied to the old iPhoto app or Aperture. If you want to keep your photos in iCloud Photo Library, you can do all the keywording within that app and not both with the whole export/import process. Instead just build smart albums that have look for a "processed" keyword, and add that keyword to every photo you process in iCloud Photo Library directly.

AppleTv

Sadly, the new iCloud Photo Library is not supported by the current generation of AppleTV. I'm not sure why, other than the fact that storage on the device might be an issue (iCloud Photo Library includes videos, where Photostream does not). I'm not sure, so for the time being when you have visitors, you'll need to Airplay your photos to your TV from an iOS device or from your Mac.

Another option could be to use the Flickr app. I have not used the app personally, so I'm not sure what options it has. The app does exist on AppleTV and you can upload every photo in your Lightroom library up to Flickr for viewing on the AppleTV.

I'm hoping I'll be able to revise this post once the new AppleTV is released, with a guide on viewing the iCloud Photo Library on it. There's no official word yet that it will be supported.

Mud Designers new home on GitHub

I had previously been maintaining two different repositories for the Mud Designer. The first was on my personal GitHub account and the other was on Codeplex.

A few weeks ago I created a new team on Git Hub called Mud Designer. There are several repositories under the team, such as the Mud Engine, the new cross-platform server stuff and the documentation source for the real help docs.

In order to help people navigate the repositories, I have setup a Home repository. For all things Mud Designer, the Mud Designer Home should be your starting place.

Some of the repositories have source in a branch other than Master right now as its being developed. So be sure to check all of the branches out when exploring the code.

Project milestones have been defined on the Mud Engine repository and the server repository. Over the next couple of weeks I will be creating backlog work items in the issue tracker, so people can get an idea Of how far along the project is in each milestone.

The previous repositories found on Codeplex and under my account will be deprecated going forward.

Mud Engine + Server running on Mac OS X

As of tonight, the Mud Engine has been tested and runs on Macs running OS X. I was even able to wire up the server and get a OS X server running with the game.

Thanks to how the server was refactored into the adapter pattern I adopted a couple of weeks ago, it took very little code to wire up a OS X based server.

The code

class MainClass
{
    public static void Main(string[] args)
    {
        SetupMessageBrokering ();

        var bootstrap = new Bootstrap ();
        bool startupCompleted = false;
        bootstrap.Initialize ((game, server) =>
        {
            // Start the game loop.
            while(game.IsRunning)
            {
                if (!startupCompleted)
                {
                    startupCompleted = true;
                }

                Thread.Sleep(1);
            }
        });

        while(!startupCompleted)
        {
            Thread.Sleep (1);
        }
    }

    static void SetupMessageBrokering()
    {
        MessageBrokerFactory.Instance.Subscribe<InfoMessage>(
            (msg, subscription) => Console.WriteLine(msg.Content));

        MessageBrokerFactory.Instance.Subscribe<GameMessage>(
            (msg, subscription) => Console.WriteLine(msg.Content));

        MessageBrokerFactory.Instance.Subscribe<PlayerCreatedMessage>(
            (msg, sub) => Console.WriteLine("Player connected."));

        MessageBrokerFactory.Instance.Subscribe<PlayerDeletionMessage>(
            (msg, sub) =>
        {
            Console.WriteLine("Player disconnected.");
        });
    }
}

This code should look almost identical to the source previously posted showing the Mud Engine server running on Windows. The only difference is that I abstracted the code that can be shared across the two platforms into a bootstrap. The shared code is stuff like configuring the server and game, setting up the game and adapter and starting the game.

As development of the engine continues, I will regularly check and make sure it builds on OS X. The engine itself and its server should always run cross-platform without any issues.

I'm not sure yet what I am going to do in regards to the designer tools. Initially I was going to write it as a XAML app for Windows. Considering that the engine can now run on OS X (and I will be testing it on Linux soon), I might reconsider and look at a more cross-platform UI approach. Perhaps that would be a good excuse for me to pick up the new cross-platform ASP.Net MVC 6 stuff Microsoft is doing, and build a cross-platform self-contained web application for the designer.

Anyway, I wanted to share the progress on my cross-plat goals. At the moment, everything seems to be working just fine between Windows and OS X.