Youtube Gaurav Sen

Interview tips

  1. Think about the features you want, 4 feature is enought for 1h interview
  2. Store profile 1. Id 2. Score (good client ?) 3. Surname 4. Images (Give a max bound), Avatar
  3. Recommend matches (Tinder)
  4. Notes maches, analytices
  5. Direct messaging (chat)
  6. Group messages (Wts)
  7. Sent / Delivered / Read notification (Wts)

5 tips video

  1. Do not detail early (top-bottom) => speak alone
  2. Don’t get a full architecture at once, wait for the scenario to evolve. Avoid silver bullet, golden harmer
  3. Keep It Simple Stupid. Every block should be the same size
  4. Justify each choice. Form your thought
  5. Be tech aware (Name load balancer, database host)

Be 1. Clear 2. Flexible 3. Knowledge

Voc

API

www.site.com/chat-messeging/getAdmins/v1 get m with gid=123 json in the request you can replace the get in the route because the HTTP request is get

For big response: 1. Pagination gives the responsibility to the client of repetitive calls 2. Fragmentation

Databases

Master slave

Master write and propagte, read inconsitent only on slave. Like facbook where more read tha write

Distributed consensus

Multiple node agree for the final state. Odd number of nodes is better for votes

  • Consistency, use 3 databases in a triangular (Split-Brain). Because db can crash and network too.
  • Transaction: Only when transaction as been approved by all nodes, we may commit them -> consistent state committed, inconsistent transaction looking back and foward to propagate before writing
  • MVCC: protocol to get consistent read (heavy)
  • SAGA: very long transaction able to roll back in case of failure

Not Only SQL

Advantages are like json Vs comma separated values. Dynamic Vs Static. Array Vs List

SQL is said to be a relational Db.

  • Faster to read a full row (SELECT *) : all data is in one block
  • Scheme easily changeable: easy to add a col
  • Better scalable
  • Faster metric, analytics (average salary)
  • Bad for coherence ACID not garantee
    • Slower read time (for a column)
    • Relations are not implicits
    • Joins are hard

Monolith Vs microservices

Publisher / Subscriber model

Pb: Request / Response has a stron coupling, client machine must wait a may timeout: failure latency.

Publisher / Subscriber model: there is a message broker between asker and responder that take the responsability to wait

Warning, no atomicity, poor consistency

Twitter is the perfect example: one publisher, many subscribers

Event driven (micro)services

The calling service is publishing events when he feels someone may need it. In a Request / Response services, he ask directly someone to do a job.

Avantages 1. Availability (! This always means inconsistency) 2. Easy Roll Back (Undo possible) 3. Replacement (due to easy rool back) 4. Transaction guarantee (can be send max or min 1 email) 5. Store intent

Drawbacks 1. Inconsistency 2. Gateway must store all responses 3. Lesser control from master -> dificult to trace data flow for devs

  • The publisher is sending an event to the event bus or message broker and who is interested can read from the event bus
  • Good in video games to get a consistent timeline of game: where was player2 when player1 shot, no when server received both info

Evernote

Mobile is the way in for new users.

Keywords

  • WebDav: file server
  • PubSub: message queue for Publisher Subscriber
  • GCS: Google Cloud Storage
  • RAID: Redundant Array of Inexpensive Disks
  • MySql: NoteStore
  • Lucene:
  • Graphite For logging with Slunk
  • Splunk ingestion pipeline.
  • Ansible: Automate deployment, configuration, instalation
  • Puppet: Declarative configuration language
  • Kubernetes: Orchestration framework

Experience first

Feature anti-pattern: 1. if a feature, you are thinking about must appear in preference (configurable): red alert. It is pointing the job to the user. 2. Disagree on the default value

Icons, and UX matters a lot when competing in the noise of conpetency (app, themes: food, music)

Design by Feature

Feature

Idea offline doc with zeal framework or webclipper

  1. Web Clipper
  2. Templates
  3. Spaces
  4. Integrations
  5. Notes Sync
  6. PDF & Doc Search
  7. Search Handwriting
  8. Document Scanning
  9. Notebooks & Tags

Products

  1. Evernote
  2. Web clipper
  3. Scannable
  4. Skitch: draw on a image
  5. Penultimate: Get presentation from hand written

Sharing

  1. Individual
  2. Group
  3. World
  • As soon as you have a feed, people stated to share. But too noisy, voctim of its.own success
  • Personal and shared content side by side, publicize the share

Searching

  1. Keyword
  2. Tag