Skip to content

Instantly share code, notes, and snippets.

View joshua-luo's full-sized avatar

Joshua Luo joshua-luo

  • Vancouver, Canada
View GitHub Profile
@joshua-luo
joshua-luo / gist:7c9efbb4ab019a920b53f9209b2a744c
Last active February 22, 2018 07:14
Rethinking Microservices on AWS Cloud
There are two ways of deploying microservices for production on AWS Cloud:
1. Fire up an AWS ECS cluster running Docker containers (or through AWS Fargate).
2. Adopt a serverless approach by using AWS Lambda and API Gateway.
You can interface the above two with AWS API Gateway, where you define all the Web service endpoints, and map those endpoints to either an ECS cluster or some Lambda functions.
It is common to put an enterprise application in a Docker image, then use it in an ECS cluster. From my experiences, I have often seen the whole JEE applications or spring boot applications being wrapped up inside some Docker images and uploaded in AWS ECR. A Docker-based cluster works fine for the microservices it provides and AWS ECS scales well too. But when you put maintenance in thinking, such as the ongoing cost of DevOps, you might just want to have a second thought.
Can we decouple the things we do in a Docker image?
@joshua-luo
joshua-luo / chat-frontend.js
Created July 16, 2016 19:12 — forked from martinsik/chat-frontend.js
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;