- What is a cron job?
- Is it possible to specify a time zone when scheduling a task with cron?
- What happens if a cron job takes longer than expected to complete its execution? Will another instance start running while the first one is still executing?
- What is a websocket?
- What is the advantage of using WebSockets over traditional HTTP requests?
- What is Socket.IO?
- What do we mean by websocket handshake?
- What is redis?
- What is the purpose of using redis?
- Give 3 examples of applications that use redis?
- What is Design pattern in programming?
- what are the main three categories of design pattern?
- What are some benefits of using design pattern?
-
-
Save Ammar-64/9463e95e3d288e93d4d9569bbd98ec3c to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@omikay | @baraah-berra | @ramin
If we want to fetch old data or want to get the data only once to process it with an application, we should go with the HTTP protocol. These old data are not required very frequently or fetched only once and can be queried by a simple HTTP request, so in this scenario, it’s better not to use WebSocket.
6. socket.io, a widely adopted JavaScript library, provides a seamless and efficient solution for implementing real-time communication in web applications.
7. The handshake is the "Web" in WebSockets. It's the bridge from HTTP to WebSockets. In the handshake, details of the connection are negotiated, and either party can back out before completion if the terms are unfavorable. The server must be careful to understand everything the client asks for; otherwise, security issues can occur.
8. Redis is an open-source, in-memory, key-value data store most commonly used as a primary database, cache, message broker, and queue. Redis delivers sub-millisecond response times, enabling fast and powerful real-time applications in industries such as gaming, fintech, ad-tech, social media, healthcare, and IoT.
9.
Maintainability: Design patterns promote modular and organized code structures. They provide clear guidelines for separating concerns, establishing relationships between components, and defining responsibilities. This improves code readability and maintainability, as it becomes easier to understand and modify the codebase when following a well-known pattern.
Scalability: Design patterns help in building scalable applications. They provide abstraction and decoupling, allowing individual components to be modified or replaced without affecting the entire system. This modular approach facilitates the addition of new features or the adaptation to changing requirements, making the software more flexible and scalable.
Code Quality: Design patterns embody best practices and proven solutions to common problems. By following these patterns, developers can create more robust and reliable code. Design patterns promote concepts such as loose coupling, high cohesion, and separation of concerns, leading to cleaner, more understandable, and better-structured code.
Collaboration and Communication: Design patterns provide a common language and shared vocabulary among developers. They serve as a means of communication, allowing team members to understand and discuss the system's design using recognized patterns. This improves collaboration, eases knowledge transfer, and enhances teamwork.
Performance Optimization: Some design patterns, such as the Flyweight pattern or Proxy pattern, are specifically aimed at optimizing performance. These patterns provide techniques to manage resources efficiently, reduce memory usage, minimize network requests, or avoid unnecessary computations.