faburaya / newsfeed Goto Github PK
View Code? Open in Web Editor NEWExperimental news feed built to run on AWS and based on DynamoDB + GRPC
License: MIT License
Experimental news feed built to run on AWS and based on DynamoDB + GRPC
License: MIT License
This project is a news feed service that runs in AWS. The service host is based in GRPC, which means it keeps persistent TCP connections with the clients using HTTP/2 and serialization by google protocol buffers. The idea of this POC came from a task assignment (cannot disclose the origin) that imposed the interface of the service. Also, it should rely on DynamoDB as storage, so as much as it could have been better designed by relying more on AWS SNS, this is the best I could do with the time I had at my disposal :) (The service is stateless because it was meant to be scalable, which means you could deploy it in several instances and have load balancing.) For deployment, choose "Amazon Linux AMI release 2017.3". In order to build the project, just run the script 'aws_linux_ami_setup_dev_env.sh'. It will build & install all the dependencies, and in the end it will clone this repository and build this project as well. It will probably take a while, since it is built by clang & cmake and depends on the static libraries of Boost, Poco, GRPC and AWS C++ SDK. Normally, when you get those libraries from pre-built packages, they come in the shared form (*.so), which is why they are not fit and you have to build the static form yourself. The choice for using static libraries is purely practical: this way the final binary is more independent of third party packages, and you can download the pre-built binaries and run them without having to do anything else (as long as you are using Amazon Linux AMI release 2017.3). I have made available the pre-built binaries in the following locations: https://s3-sa-east-1.amazonaws.com/faburaya-builds/aws_newsfeed_v1_2017.09/newsfeed_client https://s3-sa-east-1.amazonaws.com/faburaya-builds/aws_newsfeed_v1_2017.09/newsfeed_server https://s3-sa-east-1.amazonaws.com/faburaya-builds/aws_newsfeed_v1_2017.09/newsfeed_server.config Naturally, besides the installation, you need to setup the DynamoDB tables. You can find their definitions in the cloud formation template file 'deployment.json'. (Or, if you just want to run the application, deploy it in AWS by creating a stack with such template.) Currently, because the cloud formation relies on an AMI image that I used for development, the only supported region is "us-east-1" (USA North Virginia). You can change that if you modify the XML configuration file (/opt/newsfeed/newsfeed_server.config) and cloud formation template. Please notice that in the configuration file you can set your AWS credentials (and region), which allows you to choose the DynamoDB tables in other AWS accounts. That was meant for development enviroments other than AWS EC2 instances. You can leave the credentials blank if you are running the service from a EC2 instance that has an AIM role for accessing DynamoDB service. Whenever you set your credentials, they take precedence to define the account servicing DynamoDB. In order to operate the client application, just type 'help' for assistance. Be aware that the client does not automatically shows the received responses. That is on purpose, because it prevents messages printing to screen in the middle of something you were just writing. When you command "receive 3", then the client prompt blocks for 3 seconds, during which all the accumulated (and arriving) responses will be flushed to screen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.