Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thecodeteam/mosaicme
Micro service application that retrieves images from Twitter feeds, stores and process them to build a mosaic based on a selected picture.
https://github.com/thecodeteam/mosaicme
Last synced: about 2 months ago
JSON representation
Micro service application that retrieves images from Twitter feeds, stores and process them to build a mosaic based on a selected picture.
- Host: GitHub
- URL: https://github.com/thecodeteam/mosaicme
- Owner: thecodeteam
- License: mit
- Created: 2015-03-18T16:09:39.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-01T18:20:05.000Z (about 8 years ago)
- Last Synced: 2024-03-26T06:25:21.317Z (10 months ago)
- Language: JavaScript
- Size: 34.9 MB
- Stars: 15
- Watchers: 17
- Forks: 16
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MosaicMe
## Introduction
MosaicMe is a [Microservice](http://en.wikipedia.org/wiki/Microservices "Microservices") application that retrieves images from selected Twitter feeds, stores them on an [object store](http://en.wikipedia.org/wiki/Object_storage "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](http://12factor.net/) 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](images/mosaicme-architecture.png)
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](images/tweet-mosaic-request.png)
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](https://www.complang.tuwien.ac.at/schani/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](images/tweet-mosaic-result.png)
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](DEPLOYMENT.md) 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](https://github.com/emccode/mosaicme/issues) to let us know. Or make directly a [pull request](https://github.com/emccode/mosaicme/pulls).
## Licensing
MosaicMe is licensed under the [MIT](http://opensource.org/licenses/MIT "The MIT License (MIT)") license. Check out the [LICENSE](https://github.com/emccode/mosaicme/blob/master/LICENSE) file for the latest licensing information.
## Support
If you have questions relating to the project, please either post [GitHub Issues](https://github.com/emccode/mesos-module-dvdi/issues), join our Slack channel available by signup through [community.emc.com](https://community.emccode.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.