27

Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Embed Size (px)

Citation preview

Page 1: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017
Page 2: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Scaling a backend for big dataand blockchain environment

Page 3: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

1. Introduction (The companies, project and me)

2. Backend challenge

3. Big Data Integration

4. Blockchain Integration

·············· P. 3

··································································· P. 7

································································· P. 17

··························································· P. 21

Page 4: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

@ganchix

Head of Blockchain / Backend

Me

ganchix

Page 5: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

The companies

Page 6: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017
Page 7: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Fecha

The project

• Financial platform• Marketplace

• Tokenization• Operate with cryptocurrency

• Liquidity predictive models• Credit scoring• Product recommendation

Page 8: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - The evolution

Dapp

Smart Contract

Ethereum

Page 9: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - The evolution

Page 10: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - The evolution

Dapps problem:

• Noncryptocurrency users• Problem with some integrations• Legal problem

Page 11: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - The evolution

Page 12: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - The evolution

Page 13: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Fecha

Backend challenge - Why microservices?

• Migration of Dapp easier

• Easy to scale

• Polyglot Database and Languages

Page 14: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Why don't use exclusively blockchainwith a database?

Page 15: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

1. Spring CloudNetflix and Kubernetes• Easy to learn.• Nice integrations• Spring 5 reactive

2. Docker• Most adopted vendor technology for containers• Well supported

3. Kubernetes• Multi-cloud provider and on-premises data centers• Self-repair and health check capabilities• Auto-scale

Backend challenge - Microservice Architecture Stack

Page 16: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - Microservice Architecture Stack

Page 17: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Backend challenge - Deployment

Page 18: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

PFM values generation from user data. Apache Spark + Cassandra

Forecast prediction and regeneration of this modelsApache Spark + Cassandra

Product recommendations based on the economic profile of the user and his real needs. Apache Spark + Cassandra + Neo4j

Credit scoring calculationApache Spark + Cassandra

Big Data Integration - Tasks

Page 19: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

• Tasks are hard, needs:• Time• Resources

• Not Real Time is needed.

• Event Driven Architecture.

Big Data Integration - Events

Page 20: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Big Data Integration - How?

Page 21: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Big Data Integration - RabbitMQ vs Kafka

KafkaRabbitMq• RabbitMQ is designed as a general

purpose message broker

• Support existing protocols like AMQP, STOMP, MQTT.

• Finer-grained consistency control/guarantees on a peer-message.

• Complex routing.

• Apache Kafka is designed for high volume publish-subscribe messages and streams, meant to be durable, fast, and scalable.

• Event Sourcing

• Your application needs access to stream history.

• No complex routing.

https://content.pivotal.io/blog/understanding-when-to-use-rabbitmq-or-apache-kafka

Page 22: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

• Deployed in Kubernetes.

• Only accessible by NodeJS API.

• All keys are stored in secrets vaults.

• Used for:• Tokenization• Transactions of users

Blockchain Integration - Private Ethereum

Page 23: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Blockchain Integration - Private Ethereum

Page 24: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Blockchain Integration - Ethereum Main Net

Page 25: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Blockchain Integration - Ethereum Main Net

Page 26: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

Blockchain Integration - Ethereum Main Net

• We are the owner of the wallets

• We use Infura to connect blockchain

• Used for:• Payment• Transfers

Page 27: Scaling a backend for a big data and blockchain environment by Rafael Ríos at Big Data Spain 2017

@ganchix

@2getherbank

@bigeeksoftwa

re

Thanks!

ICO is coming!