Azure Cosmos DB – Lessons learnt from building a globally distributed database from the ground up

slide_0

In this talk, I describe the key capabilities, system design and various design trade-offs we had to make in the process of building Cosmos DB (http://cosmosdb.com) service. I also share our experience from operating a globally distributed database service worldwide and maintaining comprehensive Service Level Agreements (SLAs).


https://speakerdeck.com/dharmashukla/azure-cosmos-db-lessons-learnt-from-building-a-globally-distributed-database-from-the-ground-up

New Java developer site for Azure

azure_java

Quickstarts, Samples and Tutorials
https://docs.microsoft.com/en-us/java/azure/
5-minutes Quickstarts for deploying a Java Web App and connecting to other Azure services. Browse through 100+ samples and step-by-step tutorials.

Libraries
https://docs.microsoft.com/en-us/java/azure/java-sdk-azure-overview
The Azure libraries for Java help you manage Azure resources and connect to services from your application code.

Tools
https://docs.microsoft.com/en-us/java/azure/java-azure-tools
Download Azure tools and plug-ins, from Eclipse, IntelliJ to Jenkins as well as Command line tools.

SQL Graph Objects in SQL Server 2017: the Good and the Bad

“Graph databases are useful for certain types of database tasks that involve representing and traversing complex relationships between entities. These can be difficult to do in relational databases and even trickier to report on. Until now, we have had the choice of doing it awkwardly in SQL Server or having an ancillary database to tackle this type of task. SQL Server 2017 will be bringing graph capabilities to the product but will these features prove to be good enough to allow us to dispense… ”

https://www.simple-talk.com/sql/t-sql-programming/sql-graph-objects-sql-server-2017-good-bad/

Creating R visuals in the Power BI service

Recently announced “The Power BI service supports viewing and interacting with visuals created with R scripts. Visuals created with R scripts, commonly called R visuals, can present advanced data shaping and analytics such as forecasting, using the rich analytics and visualization power of R.”

See https://powerbi.microsoft.com/en-us/documentation/powerbi-service-r-visuals/ for full details.

Re-blog: C# Version History: Examining the Language Past and Present

Please note I am not the author of this blog post, it is a re-blog, please visit original article at https://blog.ndepend.com/c-versions-look-language-history/

I still remember my first look at C# in the early 2000s.  Microsoft had released the first major version of the language.  I recall thinking that it was Java, except that Microsoft made it, called it something else, and put it into Visual Studio.  And I wasn’t alone in this sentiment.  In an old interview, Java inventor James Gosling called it an imitation.  “It’s sort of Java with reliability, productivity, and security deleted,” he said.  Ouch.

A lot changes in 15 years or so.  I doubt anyone would offer a similar assessment today.  In that time, Java has released four major language versions, while C# has released six.  The languages have charted divergent courses, and C# has seen a great deal of innovation.  Today, I’d like to take a look back on the history of C# and highlight some of those key points.

What did the language look like in its earliest incarnations?  And how has it evolved in the years since?

C# Version 1

When you go back and look, C# version 1 really did look an awful lot like Java.  As part of its stated design goals for ECMA, it sought to be a “simple, modern, general purpose object-oriented language.”  At the time, it could have done worse thank looking like Java in order to achieve those goals.

But if you looked back on C# 1.0 now, you’d find yourself a little dizzy.  It lacked the built in async capabilities and some of the slick functionality around generics that we take for granted.  As a matter of fact, it lacked generics altogether.  And Linq?  Nope.  That would take some years to come out.

C# version 1 looked pretty stripped of features, compared to today.  You’d find yourself writing some verbose code.  But yet, you have to start somewhere.

C# Version 2

Now things start to get interesting.  Let’s take a look at some major features of C# 2.0, released in 2005, along with Visual Studio 2005.  (Check out the book by NDepend creator Patrick Smacchia about .NET 2.0.)

While Microsoft may have started with a pretty generic object-oriented language, C# Version 2 changed that in a hurry.  Once they had their feet under them, they went after some serious developer pain points.  And they went after them in a big way.

With generics, you have types and methods that can operate on an arbitrary type while still retaining type safety.  So, for instance, having a List<T> lets you have List<string> or List<int>  and perform type safe operations on those strings or ints while you iterate through them.  This certainly beats creating ListInt inheritors or casting from Object for every operation.

Oh, and speaking of iterators, C# Version 2 brought iterators.  To put it succinctly, this let you iterate through the items in List (or other Enumerable types) with a foreach loop.  Having this as a first class part of the language dramatically enhanced readability of the language and people’s ability to reason about the code.

And yet, Microsoft continued to play a bit of catch up with Java.  Java had already released versions that included generics and iterators.  But that would soon change as the languages continued to evolve apart.

C# Version 3

C# Version 3 came in late 2007, along with Visual Studio 2008, though the full boat of language features would actually come with C# Version 3.5.  And what a version this proved to be.  I would go so far as to say that this established C# as a truly formidable programming language.  Let’s take a look at some major features in this version.

In retrospect, many of these features seem both inevitable and inseparable.  In fact, I have a hard time a true headliner, since they all fit together so strategically.  Others won’t have that same problem, though.  They’ll say that C# Version 3’s killer feature was the query expression, also known as Linq (Language INtegrated Query).

I chase a little more nuance because I view expression tress, lamba expressions and anonymous types as the foundation upon which they constructed Linq.  But, in either case, we found ourselves presented with a fairly revolutionary concept.  Microsoft had begun to lay the groundwork for turning C# into a hybrid OO-functional language.

Specifically, you could now write SQL-style, declarative queries to perform operations on collections, among other things.  Instead of writing a for loop to compute the average of a list of integers, you could now do that as simply as list.Average().  The combination of query expressions and extension methods made it look as though that list of ints had gotten a whole lot smarter.

It took a little while for people to really grasp and integrate the concept, but they gradually did.  And now, years later, code is much more concise, simple, and functional.

C# Version 4

C# Version 4 would have had a difficult time living up to the groundbreaking status of version 3.  With version 3, Microsoft had moved the language firmly out from the shadow of Java and into prominence.  The language was quickly becoming elegant.

The next version did introduce some cool stuff, though.

Embedded interop types alleviated a deployment pain.  Generic covariance and contravariance give you a lot of power, but they’re a bit academic and probably most appreciated by framework and library authors.  Named and optional parameters let you eliminate a lot of method overloads and provide convenience.  But none of those are exactly paradigm altering.

I’ll leave that distinction for the introduction of the dynamic keyword.  By doing this, Microsoft introduced into C# Version 4 the ability to override the compiler on compile time typing.  That’s right.  By using the dynamic keyword, you can now shoot yourself in the foot a la dynamically typed languages like JavaScript.  You can create a dynamic x = “a string” and then add six to it, leaving it up to the runtime to sort out what on earth should happen next.

I say that a bit tongue in cheek, obviously.  This gives you the potential for errors but also great power within the language.

C# Version 5

With C# Version 5, Microsoft released a very focused version of the language.  They put nearly all of their effort for that version into another pretty groundbreaking language concept.  Here is the major features list.

Now, don’t get me wrong.  The caller info attribute is pretty cool.  It lets you easily retrieve information about the context in which you’re running without resorting to a ton of boilerplate reflection code.  I actually love this feature.

But async and await are the real stars of this release.  When this came out in 2012, Microsoft changed the game again by baking asynchrony into the language as a first class participant.  If you’ve ever dealt with long running operations and the implementation of webs of callbacks, you probably loved this language feature.

C# Version 6

With versions 3 and 5, Microsoft had done some pretty impressive stuff in an OO language.  (Version 2 did as well, but they were fast following Java with those language features.)  With version 6, they would go away from doing a dominant killer feature and instead release a lot of features that delighted users of the language.  Here are some of them.

Taken individually, these are all cool language features.  But if you look at them altogether, you see an interesting pattern.  In this version, Microsoft worked really hard to eliminate language boilerplate and make code more terse and readable.  So for fans of clean, simple code, this language version was a huge win.

Oh, and they did do one other thing along with this version, though it’s not a traditional language feature, per se.  They released Roslyn the compiler as a service.  Microsoft now uses C# to build C#, and they let you use the compiler as part of your programming efforts.

C# Version 7

Finally, we arrive at C# version 7.  That’s the current version as of the writing of this post.  This has some evolutionary and cool stuff in the vein of C# 6, but without the compiler as a service.  Here are some of the new features.

All of these offer cool new capabilities for developers and the opportunity to write even cleaner code than ever.  In particular, I think Microsoft scratched some long term itches by condensing the declaration of variables to use with the “out” keyword and by allowing multiple return values via tuple.

But Microsoft is also busy putting the language to ever broader use.  .NET now targets any operating system and has its eyes firmly on the cloud and on portability.  This certainly occupies the language designers’ thoughts and time, in addition to coming up with new features.

I’ve been familiar with C# for just under 15 years now, and the language has been under development for even longer than that.  It’ll be exciting to see what features and capabilities the future brings.

Pi – The Personal Assistant – Speech Recognition (Raspberry Pi + IBM® Watson)

Not as nice as having AI run independently on a Pi (like the Microsoft example shared yesterday), but this is another example of ML being used on a Pi…

… this example for Speech recognition requires Watson cloud services and subscription, but thought I would share in case anyone is interested.

Pi – The Personal Assistant – Speech Recognition (Raspberry Pi + IBM® Watson) – Prototype for a voice enabled personal assistant built on Raspberry Pi using IBM Watson services
Learn how to build your own voice enabled Personal Assistant that listens, understands & responds with your Raspberry Pi
https://developer.ibm.com/recipes/tutorials/pi-the-personal-assistant-raspberry-pi-ibm-watson/

… same would be just as easily achieved using Cortana (https://developer.microsoft.com/en-us/Cortana) or Google (https://cloud.google.com/speech/).

Microsoft made its AI work on a $10 Raspberry Pi

dims

When you’re far from a cell tower and need to figure out if that bluebird is Sialia sialis or Sialia mexicana, no cloud server is going to help you. That’s why companies are squeezing AI onto portable devices, and Microsoft has just taken that to a new extreme by putting deep learning algorithms onto a Raspberry Pi…

…The idea came about from Microsoft Labs teams in Redmond and Bangalore, India. Ofer Dekel, who manages an AI optimization group at the Redmond Lab, was trying to figure out a way to stop squirrels from eating flower bulbs and seeds from his bird feeder. As one does, he trained a computer vision system to spot squirrels, and installed the code on a $35 Raspberry Pi 3. Now, it triggers the sprinkler system whenever the rodents pop up, chasing them away.”


https://www.engadget.com/2017/06/30/microsoft-made-its-ai-work-on-a-10-raspberry-pi/