Skip to content

Instantly share code, notes, and snippets.

@halitbatur
Last active December 7, 2021 15:51
Show Gist options
  • Save halitbatur/35c3999e0303d528ff5e82dc01976234 to your computer and use it in GitHub Desktop.
Save halitbatur/35c3999e0303d528ff5e82dc01976234 to your computer and use it in GitHub Desktop.
Redis, Cron job and websockets discussion questions

Redis, Websockets and cron Discussion

Write your answers in the comment section below:

  • What is Redis? Mention one use case of Redis.
  • What type of database is Redis and where does it hold its data?
  • What is Websocket and what is it used for?
  • Explain 3 use cases for CRON jobs.
  • What are the 3 types of design patterns in Nodejs?
@Amr-Nash
Copy link

Amr-Nash commented Dec 7, 2021

  1. Redis (Remote DIctionary Server) is an open-source, in-memory, store that is used primarily as an application cache or quick-response database. It could be used for leaderboard and counting
  2. It is an in-memory database and we could say that it is a NoSQL database and it holds its data in memory.
  3. Is an API that makes it possible to open a two-way interactive communication session between the user's browser and a server.
    With WebSocket, we can send messages to a server and receive event-driven responses without having to poll the server for a reply.
  4. Check whether the website is working properly, automate backups and tests, and sync files between remote machines.
  5. a) Creational - the creation of the object instances.
    b) Structural - the way the objects are designed.
    c) Behavioral - how objects interact with each other.
    @aycaakyol @ibraheemhajjar

@Kishimoto96
Copy link

  1. it's a combination of a database, a search engine, and caching engine. we can use it to save the database indexes to our Redis instance.
  2. it's a non-relational database type, it stores the data in an in-memory noSQL database.
  3. its protocol works like a gate between two devices for example a client and a server to communicate and exchange data.
  4. to refresh our list on our website every 10mins, to log out someone if he/she is not active, to time a get request from the API to get data every 10mins.
  5. Creational - the creation of the object instances
    Structural - the way the objects are designed
    Behavioural - how objects interact with each other
    @felmez @Corcit @Muhammeday99

@emirsagit
Copy link

emirsagit commented Dec 7, 2021

  1. Redis is an in-memory database. It uses for session-cache, data-cache.
  2. It stores data both open-source and in-memory. It is also NoSQL-based. So it allows data structures like strings, hashes, sets, sorted sets of data.
  3. The WebSocket is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server.
  4. Cron job use cases: to monitor the status of the server and the services, backup personal data, scheduling for dumping databases.
  5. Creational, structural, behavioral. @algiknr @edaguler00

@mehmetfatiherdem
Copy link

1-Redis is an in-memory storage unit. Session Cache is one usage of Redis. It provides a more persistant performance
2-It hold the data in-memory, it is a NoSql database like MongoDb(key-value).
3-WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection. It is used for interaction between web browser and server.
4- Sending emails, running a server at a specific time, daily backup
5-Creational - the creation of the object instances.
Structural - the way the objects are designed.
Behavioural - how objects interact with each other.

@alfawal @inasalarabi

@Peri7at
Copy link

Peri7at commented Dec 7, 2021

  1. Redis – the popular in-memory data structure store that can persist on disk as well. It is driven by a keystore-based data structure to persist data and can be used as a database, cache, message broker, etc. The most common use case is for caching.
  2. Redis is NoSQL based database and it holds data in memory of the server provided.
  3. The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. Through websockets request updates are sent immediately when they are available. All the frequently updated applications used WebSocket because it is faster than HTTP Connection. When we do not want to retain a connection for a particular amount of time or reusing the single connection for transmitting the data, HTTP connection is slower than the WebSocket..
    • to send a newsletter (I prepare whenever and send it on following monday) [every week]
    • to monitor the status of the server and services [every 10min]
    • used for automating system maintenance or administration
  4. Creational — the creation of the object instances. Structural — the way the objects are designed. Behavioural — how objects interact with each other.

@AmmarBaki2 @ecelkl @ehabhalil

@mkkasem
Copy link

mkkasem commented Dec 7, 2021

  • Fast, open-source in-memory data store for use as a database, cache, message broker, and queue.

  • it is a key-value database that holds the data in the memory(or RAM)

  • The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.

  1. sending birthday wishes for users on their birthday's
  2. check the availability of everything (internally + externally)
    3-backup databases on our cloud provider

-Creational - the creation of the object instances
Structural - the way the objects are designed
Behavioural - how objects interact with each other

@ eniz @ ceren @ yaman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment