Post

Visualizzazione dei post da novembre, 2015

Deploy Microservice with Docker

Immagine
Docker Containers "Docker provides an integrated technology suite that enables development and IT operations teams to build, ship, and run distributed applications anywhere." Docker is an open source project that enables you to package any application in a lightweight, portable container. Docker has the ability to package applications in such a way that they can run anywhere. Docker is a powerful technology and it's supported with the majority of large public cloud. It is important to know that Docker is not a virtualization platform, it bases its operation on Linux Container. Docker provides many benefits when used properly: It facilitates the development and packaging of applications in a way that leverages the skills developers already have It allows developers to easily create test environments It simplifies the maintenance operations Check Docker installation This article does not explain how to install Docker, so refer to the documentation on the sit

Provide a service for animated gif creation

Immagine
Animated GIF Service This example will provide a HTTP service that creates animated GIF containing the text that is passed as input to the service. The service uses the standard library of Go and some additional libraries: the image is produced using the standard library image the text written inside the image is generated using the library freetype ( https://github.com/golang/freetype ) the HTTP service is activated using the framework Gin-Gonic ( https://github.com/gin-gonic/gin ) What we get is a service that responds to requests like these http://localhost:8000/animated.gif?name=Max generating images like this Create the GIF Image The package image/gif provides all the methods and structures to operate with GIF image format. // Generate an animated gif func GenerateAnimation(text string , fontfile string , out io.Writer) {      const (          nframes = 64 // number of animation frames          delay = 8 // delay between f