
Cloud Design Patterns - dnnrly
https://msdn.microsoft.com/en-us/library/dn600223.aspx
======
hire_charts
Cache-Aside is an Antipattern. It forces you to define your caching logic at
the application layer, and suddenly the app must care about--and actually
implement--your caching strategy. This is very difficult to scale correctly
and is a common source of stale data and race conditions.

Better to treat caching as part of your overall database infrastructure. If
caching "hot" data is really important for your app, make sure your data layer
supports read-through and write-through caching. Or use the "CQRS" Pattern and
read from a different source than your writes (allowing your writes to
transparently apply whatever underlying caching strategy you need to support
the reads).

The MSDN article on CQRS actually has some good advice on combining it with
Materialized Views and handling consistency issues. Worth reading if you're
interested in solving your caching problems.

~~~
novaleaf
i just finished implementing a similar pattern: atomic-cache (cache+eventually
consistent modifications) and while it's debatable whether the pattern belongs
in your "database" layer or "app" layer, you certainly do need this pattern
somewhere.

For me, my orm layer is in my app, and my database is just google datastore. I
have ideas for eventually writing a db caching layer as you suggest but it's
rather a lot more complexity beyond the "get it working and move on"
principle.

~~~
alooPotato
Are you using something like Objectify with the google datastore?

~~~
novaleaf
no, just the gcloud-node (npm) module and a home-rolled orm.

objectify looks interesting! but I'm a nodejs user, not java.

------
talles
What CQRS, an index table or simply "retry" (is this even a "pattern"?) has to
do with "the cloud"?

Don't get me wrong, I think is a lovely page (bookmarked), but I fail to see
how those techniques are necessarily tied to the cloud.

One thing is to put our services in the cloud, another is to put our concepts
in it.

~~~
Avalaxy
Not necessarily cloud, but a lot of these patterns have to do with
asynchronous distributed systems design (for example leader election, all the
queueing patterns, sharding, circuit-breaker). CQRS is part of that (eventual
consistency, scalability, etc.). Distributed systems are not necessarily tied
to the cloud, but it's a very good fit because of the flexibility the cloud
offers.

~~~
talles
There's a lot of people out there doing distributed systems that are hosted
"indoors" (Or should I say "on earth"? What's the opposite of "cloud"?). A
lot.

Don't you agree that putting "cloud" on the title may be misleading?

~~~
arethuza
'What's the opposite of "cloud"'

"on-premise"

~~~
jsight
So what is an on-premise cloud?

~~~
softawre
Lol. Or "private clouds" as our CFO calls them...

------
ninjakeyboard
What's going on over at microsoft? They've had a flurry of OSS announcements,
a linux-for-switches fork, are posting relevant tech articles etc. This isn't
the same microsoft I know. Is there some sort of change in the direction of
leadership? I haven't seen any articles about changes in strategy in these
directions but am seeing a lot of activity.

~~~
outside1234
Satya is what happened. Microsoft finally has a CEO that gets it.

~~~
moron4hire
Most of these changes would have had to have gotten started under Balmer.
Nadella has only been at the helm for two years. If anything, Nadella has been
doubling down on a plan Balmer put into motion.

~~~
padiyar83
Not quite true, Satya led cloud and enterprise org. before stepping into CEO.
Many of the initiatives at Azure started with direct involvement from Satya.
He also pushed for open Microsoft long before becoming a CEO, its just that
now he is the CEO, he can make it happen.

~~~
moron4hire
But MS has been open sourcing more than just the cloud stuff for longer than
just the last two years.

------
an4rchy
Interesting read. Although, I wasn't a fan of the banner asking for feedback
at the bottom. I immediately clicked no without reading what it was (It was
something to the extent of 'Is this page helpful?') Although, after dismissing
it I wanted to say Yes but after submit I can't change my opinion.

~~~
Avalaxy
Same here, I did the same. Also: for me all MSDN pages became reeeeaaaally
slow ever since I installed Ghostery. I just see a blank page for like 5
seconds before I can see the content. More people with this problem?

~~~
liamca
[Full disclosure, I work at Microsoft] @an4rchy, I think if you open the page
in private mode it will most likely ask you again. If that does not work, feel
free to contact me and I can pass on your comments (my email is my HN alias +
microsoft.com).

@Avalaxy, it would be great when you click Yes or No, that you also try to add
a comment about your issue or why you liked the page. I can not speak for
every group, but most groups I know of review the voting and comments for all
of their pages really carefully. For example, my team has a weekly discussion
on this and what we plan to do to improve the pages. If a page gets a negative
vote along with a comment why it poor, it is much easier to improve the page,
however, if it simply has a negative vote we have to make guesses as to why it
was poor.

~~~
Avalaxy
I get that, but the point is that I accidentally clicked No because
instinctively I thought that was the way to dismiss the bar (in my mind it was
something like: do you want to provide feedback yes/no, to which I clicked
no). Only after clicking I realized my error.

------
bhvit
Microsoft contributing to OSS is too much like a US Federal Tax return for my
taste.

~~~
paulddraper
Yeah, don't bother collecting tax returns.

(Actually, there's several hundred million in unclaimed returns from 2012 that
are about to expire.)

