News for hackers. Stuff that matters.
Re:Cloud Design Patterns by hire_charts on Thursday March 10, 2016 @12:25PM (#11260500)
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.

Re:Cloud Design Patterns by novaleaf on Thursday March 10, 2016 @12:43PM (#11260608)
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.

Re:Cloud Design Patterns by alooPotato on Thursday March 10, 2016 @03:54PM (#11262216)
Are you using something like Objectify with the google datastore?
Re:Cloud Design Patterns by novaleaf on Thursday March 10, 2016 @07:39PM (#11263755)
no, just the gcloud-node (npm) module and a home-rolled orm.

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

Re:Cloud Design Patterns by talles on Thursday March 10, 2016 @08:30AM (#11259024)
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.

Re:Cloud Design Patterns by Avalaxy on Thursday March 10, 2016 @10:11AM (#11259591)
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.
Re:Cloud Design Patterns by talles on Thursday March 10, 2016 @10:30AM (#11259731)
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?

Re:Cloud Design Patterns by arethuza on Thursday March 10, 2016 @10:41AM (#11259804)
'What's the opposite of "cloud"'

"on-premise"

Re:Cloud Design Patterns by jsight on Thursday March 10, 2016 @01:28PM (#11260987)
So what is an on-premise cloud?
Re:Cloud Design Patterns by softawre on Thursday March 10, 2016 @05:34PM (#11263065)
Lol. Or "private clouds" as our CFO calls them...
Re:Cloud Design Patterns by mynameisvlad on Thursday March 10, 2016 @11:35AM (#11260171)
Not really. Them being cloud design patterns says nothing about being able to to be used outside the cloud, just that the people who made them designed them for the cloud.
Re:Cloud Design Patterns by talles on Thursday March 10, 2016 @11:48AM (#11260284)
> designed them for the cloud

I guess I have a different understanding of designing for than you them.

Re:Cloud Design Patterns by mynameisvlad on Thursday March 10, 2016 @02:59PM (#11261823)
Yes, you clearly do. If they were thinking about the cloud and what patterns might be appropriate for it, then it's being designed for the cloud. As I said before, just because it's designed for A doesn't mean it isn't also applicable to X, Y, Z, just that they weren't specifically thinking about those when they wrote the document.
Re:Cloud Design Patterns by hudo on Thursday March 10, 2016 @08:56AM (#11259177)
Similar like they called new Core .net before, "cloud optimized" framework! It doesn't have absolutely nothing to do with cloud, but marketing department needs to push "cloud everything" because Satya said so. Useful and nice list though...
Re:Cloud Design Patterns by entitycontext on Thursday March 10, 2016 @10:15AM (#11259620)
Actually, I don't see it as pure marketing fluff to call the new ASP and .NET Core "cloud optimized". Breaking the framework into smaller pay-for-play components to reduce deployment footprint and allowing for xcopy deployment of self-contained binaries without a globally installed .NET runtime really does help enable new scenarios for cloud containers and microservices.
Re:Cloud Design Patterns by talles on Thursday March 10, 2016 @10:32AM (#11259748)
Am I reading your comment wrongfully or are you saying that making things modular is great because, well, "the cloud"?
Re:Cloud Design Patterns by entitycontext on Thursday March 10, 2016 @11:20AM (#11260062)
No, that's a fair interpretation of my comment - after all, the meaning of "cloud optimized" is kind of vague. However, if you compare the new version and previous version and the new version ticks more positive boxes for cloud usage scenarios, then it's not unreasonable to call the new version "cloud optimized".

Beyond the modularization efforts, one could look at the Linux port and dramatic performance improvements in the same light.

Re:Cloud Design Patterns by perfectphase on Thursday March 10, 2016 @12:25PM (#11260501)
The Asp.Net core are on record several times saying the primary goal was to be able to cram more websites per host for Azure Websites to reduce costs and to remove the issues of servicing a machine wide framework. Sounds like 'cloud optimized' was a good fit in the early days! :)
Re:Cloud Design Patterns by gregmac on Thursday March 10, 2016 @12:06PM (#11260391)
I think he's right in terms of deployment scenarios.

In contrast, the "old style" was to setup a physical server manually: install the OS, install all the dependencies for your application, configure everything manually. If you need to scale out or replace a broken server, you repeat these steps. There are of course various levels of automation that can be done with this, but dealing with physical severs meant at least some manual effort was always required.

In this case, I read "cloud optimized" as you can easily deploy to the typical "cloud" server instance or container (which is basically an installed OS with enough config to get it on the network). Your application doesn't have any dependencies: for example, .NET Core (framework) is bundled.

Re:Cloud Design Patterns by BrandonLive on Thursday March 10, 2016 @10:51AM (#11259877)
That's not how I read it. Rather, it makes sense for a cloud-focused company/development team to focus on efforts aligned with that cloud-focused strategy. The work in .NET Core and ASP .NET Core clearly fits this description.
Re:Cloud Design Patterns by talles on Thursday March 10, 2016 @11:02AM (#11259946)
Having things modular have a myriad of benefits, fitting the cloud being just one of them. Making things modular is good design in my book way before the term "cloud" even existed.
Re:Cloud Design Patterns by oblio on Thursday March 10, 2016 @12:46PM (#11260622)
Modular things also have drawbacks. They need to be versioned, deployment is a lot more complicated, etc.

I feel that in the case of .NET Core claiming that the changes were cloud-focused is valid. After all, .NET was already in place and Microsoft didn't really need to make it that modular. It did do it and it spent a lot of resources doing it, in order to follow its cloud strategy.

Re:Cloud Design Patterns by ninjakeyboard on Thursday March 10, 2016 @09:27AM (#11259349)
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.
Re:Cloud Design Patterns by Avalaxy on Thursday March 10, 2016 @10:07AM (#11259571)
This article is actually pretty old, I read it months ago. It's not new for Microsoft either, they have/had the Microsoft Patterns & Practices team which develops sample applications, books, websites and libraries to demonstrate various design patterns. This is just one of them.
Re:Cloud Design Patterns by pm90 on Thursday March 10, 2016 @09:34AM (#11259386)
They are heavily focused on the cloud. They recognized (correctly) that their time of living off revenues of Windows and Office were limited and thus they need to do other things as well. But yes, I am rather surprised at how well they are handling the change :).
Re:Cloud Design Patterns by 72deluxe on Thursday March 10, 2016 @10:43AM (#11259820)
I have the "cloud to my butt" plugin installed. It changes all occurrences of "the cloud" to "my butt".

So you opening sentence made me laugh, thanks!

The announcement of SQL Server for Linux is very interesting; the other year when they released an ODBC driver for Linux I thought it was a significant change but it would be interesting to know how many people actually used it.

Oddly the focus on The Cloud seems to be also matched by the focus on telemetry gathering etc. I will wait to see how it pans out.

Re:Cloud Design Patterns by BinaryIdiot on Thursday March 10, 2016 @11:51AM (#11260312)
To be fair Microsoft has always posted relevant tech articles. Even 10 years ago when they were hard core only in their own development bubble they had excellent articles about architecture and scaling, etc. The MSDN has more than just simple documentation and it's always been quite an amazing resource.
Re:Cloud Design Patterns by outside1234 on Thursday March 10, 2016 @09:38AM (#11259406)
Satya is what happened. Microsoft finally has a CEO that gets it.
Re:Cloud Design Patterns by moron4hire on Thursday March 10, 2016 @10:16AM (#11259628)
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.
Re:Cloud Design Patterns by padiyar83 on Thursday March 10, 2016 @11:37AM (#11260192)
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.
Re:Cloud Design Patterns by moron4hire on Thursday March 10, 2016 @02:18PM (#11261431)
But MS has been open sourcing more than just the cloud stuff for longer than just the last two years.
Re:Cloud Design Patterns by jsudhams on Thursday March 10, 2016 @11:44AM (#11260247)
Yes, Microsoft Patterns & Practices were there from 2002/3 onwards i remember patterns on app move from Unix to windows instead of linux and MS has Services for Unix posix 1.x compliant at that time so all basic linux tools (ls/sh/awk/sed etc) and api worked on WIndows 2003 with NFS and NIS compatibility
Re:Cloud Design Patterns by UK-AL on Thursday March 10, 2016 @10:29AM (#11259723)
Microsoft Patterns & Practices have been doing these sorts of pages for years.
Re:Cloud Design Patterns by an4rchy on Thursday March 10, 2016 @09:49AM (#11259462)
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.
Re:Cloud Design Patterns by Avalaxy on Thursday March 10, 2016 @10:12AM (#11259600)
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?
Re:Cloud Design Patterns by liamca on Thursday March 10, 2016 @10:43AM (#11259817)
[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.

Re:Cloud Design Patterns by Avalaxy on Thursday March 10, 2016 @10:47AM (#11259850)
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.
Re:Cloud Design Patterns by liamca on Thursday March 10, 2016 @10:50AM (#11259865)
@Avalaxy, I completely agree with you and I have also taken this set of comments and passed it on to the MSDN team.
Re:Cloud Design Patterns by babo on Thursday March 10, 2016 @10:32AM (#11259747)
For me that's an annoying experience. It's there at the bottom of each Azure page, pops in immediately, without a chance to digest the information first. Pretty bad UI.
Re:Cloud Design Patterns by bhvit on Thursday March 10, 2016 @11:40AM (#11260212)
Microsoft contributing to OSS is too much like a US Federal Tax return for my taste.
Re:Cloud Design Patterns by paulddraper on Friday March 11, 2016 @01:30AM (#11264995)
Yeah, don't bother collecting tax returns.

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