Microsoft and Me

Microsoft and Me

So I have been giving a lot of thought to Microsoft and their consumer clients.

Their business strategy is straight-on : Azure, Office 365, Microsoft 365, Surface Hubs… These all tell a good story for the enterprise.

As for the other Surface devices (Pro, Book, Go, Studio and Laptop), I imagine these devices are meant to offer one item in each product category from a consumer point of view. These are all excellent devices and the software they run (Windows 10) is the same and meant to bring them back to their business (or consumer) strategy.

As for the student & school story, I believe it still needs to be worked on before something interesting can be said.

Before i go on, for comparison, i believe Apple makes a really really good consumer story – I am not a big fan of their closed ecosystem but do love what they do. Google by comparison seems neutral (by that i mean that the devices and services are similar, but there is no end to end story) – nothing to report here.

Where to start…

ONE – as a consumer what services would interest me from Microsoft ? Skype is decent, Office365 (with 1tb OneDrive) is awesome. I currently use Microsoft To-Do and for some odd reason i use Microsoft Edge. I also use Windows itself because i have 20 years of experience there vs Mac or Linux.

TWO – the Microsoft devices are cool, they today announced the Surface GO with LTE and I will probably get one as i would like a tablet and an IPAD doesn’t make sens for me and a Android tablet would be a bigger phone when i need to be able to do light work on it. Nothing to report on on the media (Android TV or Apple TV) competitor either… (just like phones)

THREE – Microsoft still has no visible mobile vision, without a mobile plan i feel it has no chance in the consumer space and it i feel this jeopardizes it business strategy. For now Azure is safe, but if all my future employees know nothing of Microsoft why would i build a company around Microsoft technologies ?

The potential…

The way i see it, Microsoft is in the unique position to embrace Android and it’s ecosystem as well as become a challenger to the Apple ecosystem. 

Make Windows run Android apps natively, instantly stop the app gap (though i am not sure it still exists anymore with the coming of PWAs) and become a part of the ecosystem itself.

Make surface hardware in the phone size space. Is it a PC ? is it an Android phone ?  it’s Windows – it’s both.

Make Windows shine in the phone and tablet form factors, and really make these Windows devices work together. If you have a Android phone, you need to install the Android Phone companion. Otherwise things just work (the Appel Handoff technique) – There is no “your phone” app,  cause the device doesn’t matter anymore. Work life – personal life – work life – personal life… should be the same devices and services…

Compete with Apple in hardware with the Surface line, in services with Windows. Compete with Android by embracing it and diluting the market by enabling every pcPCto do what phones do and making people have fun on PCs again.

Finally, these are my thoughts, all based on some frustration with these technologies. I know things can be better, for a simple few million lines of code… and 1-2 new hardware devices…


Skype’s new WOW Architecture

Skype has been through a lot of changes lately. On the Windows platform it was a Win32 app, then a UWP, then a store app that was something else (Electron – ReactNative???). This something else is what interests me, because it seems to look exactly as my Android’s Skype, my wife’s IPAd’s Skype and even a new web based preview.

Check it out at http://preview.web.skype.com.

I find this quite interesting because it almost seems like a single source code for all of the different platforms out there, I think this is the kind of architecture that we must invest-in. If this were a simple website that shoes the weather after calling a web service, I wouldn’t of been impressed. This has notifications, audio, video and more !

Skype team, if you are listening! drop me a line so I can invite you to our local user’s group !


Windows Edge & Edge for Android… 1 bug

Microsoft released this year a new app for the Android platform: Edge for Android. It’s a browser meant to replace the Chrome app you use on your mobile platform. Other than the looks, it has one great power – it can sync your favorites from your Windows machine to your Android device. It’s a great thing! if it works…

As most IT workers, I log into my Windows device with my Microsoft account. I then go on and add a few more work accounts to my device (Office365 accounts) for the different companies I own.

This is where it breaks – synching settings to the cloud seems to disable itself when you add a work account. Hence I have to revert back to Chrome for synching my favorites.

Microsoft, I do hope you can fix this sooner than later, I would prefer to use Edge…


Hopes for Windows RS6 (spring 2019)

Every now and then I examine the tools I work with, the brands I use and how I work…

To me, phones are… still phones. I love them dearly with all their apps and potential, but since I spend 8-10 hours a day with a computer, I don’t need another 5 inch screen on my desk… 

Tablets… these are an interesting topic for me. I find them very cool (to the point that I can’t for the LTE Surface GO to come out so I can grab one). I need them to be a middle ground and act like a computer so I don’t always carry have to carry my laptop and act like a big phone so i can do personal usage stuff (media, social…).

I don’t expect to work on a phone so them being driven by apps and stuff is fine. I do expect more from a tablet and cannot adhere to a IPAD or Android tablet as I still do not understand how work gets done on those devices. Have you ever tried to plan a trip, with a map, a browser and a note-taking tool on one of these?

Here are my wishes for the Windows ecosystem for Redstone 6, I guess available around spring 2019:

  1. Split Windows.
    1. The kernel and core-os should be owned by Azure, Developement, Office and a new group called Consumers.
    2. The Azure team should evolve the kernel technologically, in collaboration with the Development group.
    3. The Office team should evolve the current Windows experience (let’s call it classic Windows with Explorer) and brand it as Windows for Professionals, in collaboration with the Development group.
    4. The Office team should also create a new SKU for Windows for Work which is basically today’s Windows S with some deep Office365 integration. They should be responsible also for Windows for Hubs (the OS for today’s Surface Hubs).
    5. The Consumers team should manage a bunch of different experiences for Windows, Phone – Tablet – Laptop – TV – Device. It’s the same software that adapts to whatever form factor the device is. Andromeda… Polaris… contimuum….
  2. Skype should become a telco within the Consumers team
  3. Why is Surface GO an Intel device ????? 
  4. Continue in the way of the “My android phone” app. It should mirror the screen if possible and seamlessly tether. It should also work via Bluetooth as often my laptop is connected to a wifi network and not my phone.
  5. Windows devices should just work together magically (share internet, files , pictures, messages…)
  6. Create HDMI dongles that run Windows for TVs – call them Surface Walls.
  7.  WSL should become a full android subsystem, Windows should be  a better Android than Android.
  8. Make Edge good ! support all standards so that PWAs can benefit from it all.
  9. Make Onenote the center of the pen experience.
  10. Get your media story straight (live tv, radio, podcasts, music, tv shows, movies…


Azure CosmosDB Pricing Intricacies

The Azure CosmosDB system has the potential to be a great storage layer for your solution. It automatically scales to maintain performances by splitting the data into partitions. It can geo-replicate in order to minimize data transfer latencies and has multiple consistency models to suit your different needs.

But…

In CosmosDB you pay for two things within a data center.
1 – The storage you use, which is a flat fee per gigabyte.
2 – The amount of RUs you would like to provision per second for performance. An RU is an arbitrary unit meaning roughly “something similar to reading 1k”.
If you replicate your dataset to another data center for redundancy or to reduce latency, these costs are PER data center.

Now for the trickiness, when you provision performance, let’s say 10k RU/sec, you are saying that you would like the entire dataset to be served with that performance level. Then arrives a more complicated subject: partitions. A partition is basically a split of your container into multiple parts that represent different sections of your data. For example, if your partition key is a person’s family name, you might end up with partitions for people’s last name starting with [A-G], [H-J], [K-Q], [R-Z]. In this scenario, 4 partitions whom must share equally the performance hence 2500 RU/sec per partition. Note that globally the performance level is the same, but if for a given amount of time, only one partition is solicited, then it will appear as if only 2500 RU/sec was available.

For small datasets that might not be so dramatic as partitions might never occur… but for larger datasets that can grow, CORRECTLY choosing a partition key becomes of paramount importance…

With this understanding, you might think that CosmosDB is great because you pay the same amount per month for a given performance. But two scenarios might arise…

1 – Partitions might exhaust their part of the total RU/sec faster than anticipated due to bad partition keys or specific usage patterns. Your usage of CosmosDB must be resilient to that fact that the system is unavailable because RU/sec have been exhausted.

2 – There is a minimum amount of RU/sec required to host a partition. If the container splits to a point where a partition has less than 100 RU/sec (current value), then RU/sec will be added to your bill in order to guarantee that minimum per partition.

Hope that clears a few things up !



VS Code Addins

A long time ago, I was working with companies helping them create add-ons for Visual Studio. This was NOT an easy task. We had to write code, implement COM interfaces, figure out registration, packaging, development instances of VS… It was CRAZY!

Now a new beast is in town, Visual Studio Code. It is a code editor based on Electron, a Javascript system for packaging apps. Although I still love my Visual Studio, I do have to say that I spend a lot of time in Visual Studio Code.

As it turns out, one of my clients needed to have an easy way to update data for his web site and so we created a JSON file that was in an accessible location. Next what we needed was an easy way to edit these files and so we thought, how about edit the file in Visual Studio Code with a custom addon.

The two commands required to start are (install yeoman, the generator and then create the base structure) :

npm install -g yo generator-code
yo code

Then you open Visual Studio Code in the directory and hit F5 ! Your addon will be loaded into a second instance of VS Code, you can even debug !

Now go on and create something ! Here is a link to the docs !


Microsoft .net Orleans

The Microsoft Orleans project (http://dotnet.github.io/orleans/) is a .NET framework for building systems on an Actor Model paradigm.

A typical transactional system receives a command and executes it. Executing it usually means fetching data from a database, modifying it and then saving it.

The reason I was interested in Orleans for To-Do.Studio was that each action in the app generates a command, there is no save button, no transactional boundary. This naturally creates a chatty interface, where many small commands are sent to the server, which much for each: get data, modify it and save it. Combine that with the fact that NOSQL components such as CosmosDB make you pay for reads and what you have is an expensive bottleneck.

The Actor Model in Orleans would have fixed this for me by doing the following. The first time a command executes which references a particular domain object, a grain is activated and the data is read. Each command then modifies the data in the grain. Eventually, when no one uses the grain the system will deactivate the grain causing it to save itself.

This would have the added benefit for us to minimize data access costs and offer speedups similar to adding a caching layer.

As with all magic though, we lose some control:

  1. First thing is that as the system scales to thousands of users and tens of thousands of grains, we have to think of system scalability (Orleans doesn`t yet deactivate resources based on memory pressure, only an “unused delay”)
  2. The deployment model is not fully integrated with Azure.
    1. Hosting is possible within a VM – not PAAS enough for me
    2. Hosting is possible within worker roles – sounds interesting but not exactly what I want
    3. Hosting is possible within Service Fabric (which is another implementation of an Actor Model from the Azure team and not the .NET team) – doesn’t feel seamless this would be my ideal hosting option)
    4. Host in a Linux container which is scaled automatically by Kubernetes – to be honest, I am not a container fan; Ido see their advantages for certain workloads, but it feels like the PAAS of infrastructure people.

Anyways, my best option would be hosting on top of Service Fabric. It would need to be 100% integrated with dotnetcore stuff though.

I could also recommend having a dedicated PASS offering for Orleans (kind of like what happened with SignalR).

Finally, Orleans should be upgraded to support memory pressure for deactivations as well as some sort of queuing mechanism when grains start swapping to keep the amount of work which is executing in parallel rationalized.


Web Push Notifications

As time goes by, the web becomes more and more powerful. It’s been around for a while, but I think that with Chrome and Edge finally supporting PWA apps (and native apps starting to become mobile web apps), it is time to embrace this technology. It is time to create web pages that can push notifications directly to the desktop even if the browser is closed.

This works right now on any device running Microsoft Edge, as well as devices that run Google Chrome (Android devices and desktops running Chrome).

Architecturally, the Service Worker part of your website (running in the background) creates a subscription with a push notification service provider and then that “token” is sent to your application server, which will use it to send you a notification.

What I didn’t grasp, is that you the concept of the push notification service provider is not any server running some software running a specific protocol, but rather tied directly to the browser. For example, the ONLY push notification service provider if the website is being viewed within Google Chrome is FCM (Firebase), Mozilla or Microsoft Edge (Windows WNS). In fact, these are the same technologies that are used by real native apps on those platforms.

Soooo…

  1. The API to subscribe and get some sort of token to enable push notifications is defined by internet standards, so it is safe to use in any browser on any website.
  2. Each browser will implement those methods using its own push notification service provider
  3. Sending a push notification will be different depending on whom the push notification service provider is.

Here is a link to a functional demo that works everywhere : https://webpushdemo.azurewebsites.net/


Office365 Two Factor Authentication

Two-factor authentication is an important thing, we should all now that by now. For a long time, I’ve had it activated on my Microsoft Account and Google Account. Today I decided to turn it on for the modelon.net Office365 tenant, I went into the admin tools and turned it on. Easy enough.

As expected, I had to remove the account from Outlook and Windows 10 and re-add them. But surprise, Outlook 2016 didn’t want to connect. It seems there is a manual intervention that needed to be done.

I am no IT admin and no PowerShell guru, but following the articles here saved my life:

https://support.office.com/en-us/article/Enable-or-disable-modern-authentication-in-Exchange-Online-58018196-f918-49cd-8238-56f57f38d662

https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell?view=exchange-ps

By using the instructions in the second link, you get some sort of Office365 configured local PowerShell thing. Once you open that, all you have to do is these two commands to make everything work:

Connect-EXOPSSession -UserPrincipalName erik.renaud@modelon.net
Set-OrganizationConfig -OAuth2ClientProfileEnabled $true

VSTS – Build & Release for To-Do.Studio’s web site

So my startup To-Do.Studio is advancing, and we started getting rolling on our informational website.

The first thing was to create a “web site” project with Visual Studio, and get it into GIT.

As you can see, it’s just a bunch of HTML, CSS and stuff, with a small web.config so that we can host on IIS (we are using Azure App Services for this). The first thing which is abnormal though and unlike a normal ASP.NET project, I do not have a CSPROJ that describes my project, instead, I have a PUBLISHPROJ, and it gets ignored by GIT. So how did we get here ?

Since Visual Studio relies on things like MSBUILD to “publish” projects, it needs some sort of project file and in this case, Visual Studio created the PUBLISHPROJ the first time I created the publish profile, this allows me to publish from the command line and more.

Although the file is GIT ignore, I had to add it to GIT in order for the VSTS build system to be able to publish this project.

The other modification we had to do was to add to GIT a special file, in the folder of the solution called “after.ToDoStudio.StaticWebFront.sln.targets”. Turns out MSBUILD looks for these files automatically to include them in your build process, without the need to modify the solution file. This is what we put in there:

<!--?xml version="1.0" encoding="utf-8"?-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <Target Name="Deploy Website" AfterTargets="Build">
 <Message Text="Starting Website deployment" Importance="high">
 </Message>
 <MSBuild Projects="$(MSBuildProjectDirectory)\ToDoStudio.StaticWebFront\website.publishproj" 
 BuildInParallel="true" /> 
 </Target>
</Project>

What this does is ensure that after the Build action (which by default will build nothing cause this is a project with nothing to build), the system will automatically invoke the publish action using the PUBLISHPROJ.

Now we were ready to build this thing within VSTS.

As you can see here, our build is pretty standard with defaults used everywhere:

The release pipeline is also pretty standard, nothing fancy here: