Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
/ WBinternshipL0 Public archive

Project at the Wildberries (Russian local Amazon) internship

Notifications You must be signed in to change notification settings

applesinus/WBinternshipL0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jump to English

Русский

ТЗ Lv0 на стажировке Wildberries

Необходимо разработать демонстрационный сервис с простейшим интерфейсом, отображающий данные о заказе

Модель данных в формате JSON прилагается к заданию

Что нужно сделать:

  1. Развернуть локально PostgreSQL
    • Создать свою БД
    • Настроить своего пользователя
    • Создать таблицы для хранения полученных данных
  2. Разработать сервис
    • Реализовать подключение и подписку на канал в nats-streaming
    • Полученные данные записывать в БД
    • Реализовать кэширование полученных данных в сервисе (сохранять in memory)
    • В случае падения сервиса необходимо восстанавливать кэш из БД
    • Запустить http-сервер и выдавать данные по id из кэша
  3. Разработать простейший интерфейс отображения полученных данных по id заказа

Советы:

  • Данные статичны, исходя из этого подумайте насчет модели хранения в кэше и в PostgreSQL. Модель в файле model.json
  • Подумайте как избежать проблем, связанных с тем, что в канал могут закинуть что-угодно
  • Чтобы проверить работает ли подписка онлайн, сделайте себе отдельный скрипт, для публикации данных в канал
  • Подумайте как не терять данные в случае ошибок или проблем с сервисом
  • Nats-streaming разверните локально (не путать с Nats)

Перейти к русскому

English

Specifications for Lv0 at the Wildberries internship

It is necessary to develop a demo service with a simple interface that displays order data

The data model in JSON format is attached to the assignment

What to do:

  1. Deploy PostgreSQL locally
    • Create your own database
    • Set up your user
    • Create tables to store the received data
  2. Develop a service
    • Implement connection and subscription to a channel in nats-streaming
    • Write the received data into the database
    • Implement caching of received data in the service (save in memory)
    • If the service fails, you need to restore the cache from the database
    • Start the http server and output data by id from the cache
  3. Develop a simple interface for displaying received data by order id

Tips:

  • The data is static, based on this, think about the storage model in the cache and in PostgreSQL. Model in the model.json file
  • Think about how to avoid problems associated with the fact that anything can be thrown into the channel
  • To check if the online subscription works, make yourself a separate script to publish data to the channel
  • Think about how not to lose data in case of errors or problems with the service
  • Deploy Nats-streaming locally (not to be confused with Nats)

About

Project at the Wildberries (Russian local Amazon) internship

Topics

Resources

Stars

Watchers

Forks