Giter Site home page Giter Site logo

feedgram's Introduction

VÝUKOVÝ PŘÍKLAD (zatím nedokončeno):

TECHNOLOGIE:

  • SpringBoot
  • Spring Security
  • Maven
  • Spring Cloud Gateway
  • Netflix Zuul (not supported by Spring anymore)
  • Eureka (Discovery Service)
  • Ribbon
  • Spring Cloud Stream
  • Apache Kafka (Message broker)
  • Zookeeper (stará se a řídí brokery v clusteru Apache Kafka)
  • JWT (token authetincator)
  • Docker
  • FeignClient
  • Hystrix
  • Lombok
  • Hibernate
  • Neo4j
  • Casandra

Popis aplikace

  • ApiGateway - brána k FE
  • AuthService: zajišťuje autentikaci a vytvoření nového uživatele
  • PostService: vytváří příspěvky
  • FeedService: získává uživatelův feed
  • DiscoveryService - list servis
  • GraphService: ukládá vazby mezi users

CO BY BYLO DOBRÉ DODĚLAT:

  • FE v Reactu
  • škálovat aplikaci pomocí Kubernetes

Zuul a Eureka

Máme api gateway, na kterou jde request z FE. Ten přijme Zuul. Request vyžaduje servisu A, takže Eureka dodá všechny instance service A a poskytne je Ribbonu. Ribbon pak vybere kterou instanci použijeme (load balancing).

Apache Kafka

Slouží pro interní komunikaci mezi services. Je to styl publish-subscribe. Máme producery, který pošlou zprávu do nějakého topicu a partiony. Máme vlatně cluster, v něm brokery, které manažuje Zookeeper. Dále máme consumery, kteří si postupně přebírají zprávy které jsou pro ně. Drží si hodnotu OFFSET, podle toho ví co si vzít dalšího.

V bodech Kafka:

  • je to publish-subscribe messaging systém
  • topic (v překladu to je kategorie)
  • do topicu se posílá nějaké zpráva, ta má 4 atributy: key, value jsou povinné a dva nepovinné timestamp a headers -- value může být cokoliv
  • máme 4 hlavní části Kafky: Broker: Handles all requests from clients (produce, consume, and metadata) and keeps data replicated within the cluster. There can be one or more brokers in a cluster. Zookeeper: Keeps the state of the cluster (brokers, topics, users). Producer: Sends records to a broker. Consumer: Consumes batches of records from the broker.

feedgram's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.