News for hackers. Stuff that matters.
Re:Sample cloud-native application with microservices by chvid on Thursday February 14, 2019 @09:15PM (#19167952)
Is this satire?
Re:Sample cloud-native application with microservices by jedberg on Thursday February 14, 2019 @09:35PM (#19168024)
You know how in most languages you can write "hello world" in a single line, or maybe a couple, but sometimes someone writes it with multiple classes that have some sort of inheritance, and maybe a factory?

That's not satire, that's trying to show you how to make classes and factories in that language.

This is showing you how to build a full website with microservices on GCE/Kube.

It's obviously overbuilt for what it does, that's not the point. The point is to show you how to build something complicated with simple examples.

Re:Sample cloud-native application with microservices by chvid on Friday February 15, 2019 @04:25AM (#19169576)
Good architecture is about keeping complexity in check while ensuring a broad set of goals such as a maintainability, scalability, and reliability.

This is an example of an extreme opposite. Almost destructive.

Google has enormous mindshare amongst developers; and when they put something like this out there, people will actually see it as an example to follow.

Where is the blinking warning sign saying "do not try this at home"?

This is nothing like creating too many factories in a Java application.

Re:Sample cloud-native application with microservices by jedberg on Friday February 15, 2019 @09:12AM (#19171021)
If you think this is overly complex, I should show you how some real websites are run. Netflix has over 1000 microservices. I think AirBnB is up there too.

When I look at this I think, "Man what a cute little architecture, but at least it shows some of the basics of a large scale website".

Re:Sample cloud-native application with microservices by joesb on Friday February 15, 2019 @04:50AM (#19169670)
So no one should ever see example of when things get complicated?
Re:Sample cloud-native application with microservices by chvid on Friday February 15, 2019 @05:33AM (#19169833)
As an example not to follow?

Software evolves to spaghetti over time unless one makes an effort for it not to happen.

It makes no sense to start with spaghetti.

Re:Sample cloud-native application with microservices by jhwang5 on Thursday February 14, 2019 @09:19PM (#19167966)
Certainly it was an attempt to be hip, not sure if it worked.
Re:Sample cloud-native application with microservices by chvid on Thursday February 14, 2019 @09:28PM (#19168001)
Yes.

I know hn don’t like one line questions like that which may be read as an insult. But I honestly cannot tell.

It is obviously a lot of work. But the technology mix and design is just absurd. The choice of web shop with hipster products is tongue in the cheek but so was the pet store of year 2000.

Re:Sample cloud-native application with microservices by jbarham on Thursday February 14, 2019 @09:30PM (#19168006)
I honestly thought it was myself until I saw that it was an official GCP repo. Unbelievable...

Sending emails is a one-liner in Django. Am I a sucker for not building my own email sending service?!

Of course being a Google demo they have to include the obligatory ad server service, in Java no less. Nonsense like this is why I'm steering my kids away from considering software development as a career.

Re:Sample cloud-native application with microservices by kumaraman on Thursday February 14, 2019 @09:57PM (#19168120)
When a company and platform grows it's very common to build out an email sending service since you can only send so many emails per second.

An example of an email sending service is Sendgrid, who have built an entire company around this service.

Re:Sample cloud-native application with microservices by jbarham on Thursday February 14, 2019 @10:17PM (#19168198)
I'm aware, I've used Postmark for years. My point is that building your own microservice to send emails is ridiculous overkill.
Re:Sample cloud-native application with microservices by pmlnr on Friday February 15, 2019 @05:16AM (#19169770)
Sendgrid is not alive for mails/second, that part is not _that_ hard.

They are alive because they take the spam blame for you.

Re:Sample cloud-native application with microservices by empath75 on Thursday February 14, 2019 @10:32PM (#19168252)
It’s intended as an example for deploying a complex app using all the available tooling in kubernetes. It’s not intended to be actually used.
Re:Sample cloud-native application with microservices by holografix on Thursday February 14, 2019 @10:02PM (#19168137)
Sorry to say mate but maybe... I’d usually pop that on a queue and get a separate service to pick it up... maybe that’s what you’re doing?
Re:Sample cloud-native application with microservices by jbarham on Thursday February 14, 2019 @10:20PM (#19168209)
Yes, I send emails async using Django-RQ (previously Celery).

It's still a one-liner once you've configured your async task handler. Which makes the example custom email sending microservice even more ridiculous when it can be done trivially by configuring proven off-the-shelf components and third party email delivery services.

Re:Sample cloud-native application with microservices by jsmeaton on Friday February 15, 2019 @02:42AM (#19169190)
A bit off topic (sorry) but how are you finding django-rq compared to celery? Anything you miss? Anything you gained?

I wasn’t sure how ready rq was for prime time, but I’ve hit far too many celery bugs and the maintenance hasn’t been great for awhile.

Re:Sample cloud-native application with microservices by jbarham on Friday February 15, 2019 @04:20AM (#19169561)
I found Django-RQ far simpler to configure than Celery. Given that I'm using Redis for caching anyway, it also removed RabbitMQ as a dependency which Celery basically requires.

Django-RQ's job decorator is basically a drop-in replacement for Celery's task decorator. Django-RQ's built-in Django admin app is very nice.

My Celery usage was pretty simple (mostly background email sending and PDF generation) but for those use-cases Django-RQ has been a very good replacement. Your mileage may vary of course.

Re:Sample cloud-native application with microservices by kumaraman on Thursday February 14, 2019 @10:34PM (#19168260)
That works well in your current situation, but when you have multiple products and services that also need to send emails it makes sense to combine them into a single service.
Re:Sample cloud-native application with microservices by warp_factor on Thursday February 14, 2019 @10:44PM (#19168306)
I hope it is