Skip to content

Micro service application that retrieves images from Twitter feeds, stores and process them to build a mosaic based on a selected picture.

License

Notifications You must be signed in to change notification settings

thecodeteam/mosaicme

Repository files navigation

MosaicMe

Introduction

MosaicMe is a Microservice application that retrieves images from selected Twitter feeds, stores them on an object store, and then it process them to build a mosaic based on a selected set of pictures.

The MosaicMe application is a demo application to showcase how to design, build, and deploy a microservices application. We have followed the best practices shared by the 12 Factor App manifest and DevOps best practices to showcase how to do Continuous Integration (CI) and Continuous Deployment (CD) to automate the deployment of the application.

How does it work?

MosaicMe is composed of multiple tiers. The following figure is a high level architecture diagram of the different services that take part in the process.

MosaicMe architecture

The whole process is triggered by a user sending a tweet with the hashtag #mosaicme and a picture like the following one.

Tweet Mosaic request

Right after, the Listener service, which is connected to the Twitter Streaming API and listening to the #mosaicme feed, receives the tweet and obtains information about the requester (name and Twitter handler) and the image URL. Then, this information is passed to the Engine service via messaging queues.

The Engine needs a database of raw images to build mosaics. This database is populated by the Uploader, which receives images from a different instance of the Listener that is constantly receiving tweets from popular hashtags.

Once the Engine has enough raw images to operate, it takes over and builds the mosaic using Metapixel. After a few minutes, once the mosaic is done, the Engine uploads the image to the object store (Swift, S3), attaching the requester information as object metadata. Afterwards, it notifies the Publisher and Cacher services.

The Publisher service sends a tweet via the Twitter REST API mentioning the user that requested the mosaic with the mosaic thumbnail attached and a link to the MosaicMe website to see the full-resolution mosaic.

Tweet Mosaic result

The Cacher service, on the other hand, updates the cache (Redis) with the latest mosaic metadata.

Finally, when the user checks the tweet and clicks on the link, it is redirected to the MosaicMe Website. The website obtains the mosaics metadata from the cache and the user browser downloads the mosaics directly from the object store.

How can I run it?

Check out the Deployment Guide for information about deploying MosaicMe using the Docker images available.

Contributing

Did you found a bug or got an idea for a new feature? Feel free to use the issue tracker to let us know. Or make directly a pull request.

Licensing

MosaicMe is licensed under the MIT license. Check out the LICENSE file for the latest licensing information.

Support

If you have questions relating to the project, please either post GitHub Issues, join our Slack channel available by signup through community.emc.com and post questions into #mosaicme, or reach out to the maintainers directly. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process.

About

Micro service application that retrieves images from Twitter feeds, stores and process them to build a mosaic based on a selected picture.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published