Please enable JavaScript.
Coggle requires JavaScript to display documents.
logging, Logging & Monitoring, Caching, Messaging, stateless vs…
-
Logging & Monitoring
-
monitoring will allow us to view the current status of the system and notice problematic trends such as high memory consumption or above-average exceptions.
-
-
-
make finding and fixing problems much simpler and faster,a quick glance at the systems logs will direct us immediately to the source of the problem
-
Caching
-
-
-
frequently accessed, we need Optimal user experience and Minimum load
rarely modified as syncing cache and DB is a challenge- When not in sync, leads to data corruption and bad user experience
Messaging
Analyze Criteria
-
Message Size - most systems do not require large messages between services, but sometimes it is useful.
Execution Model : Some messaging platform requires a quick response model which has its limitations, and some enable long running processes to execute.
Feedback & Reliability : ability to determine whether the messaging has failed and if it is the ability to perform some corrective action.
-
messaging method.
REST API
-
The service exposes an API that uses the HTTP protocol standard, including HTTP verbs that indicate the type of action to be made.
Performance Very Fast
Message Size Same as HTTP protocol limitations(Usually Get -> 8KB, POST & PUT -> dozens MB)
Execution Model Request / Response Great for quick, short actions, not suitable for long processes
Feedback & Reliability Immediate feedback via Response Codes
Complexity Extremely easy to implement Useful For Traditional Web Apps
HTTP Push Notifications
-
-
-
Analyze
-
-
-
Feedback &Reliability None (Fire & Forget) (Can be implemented, quite complex)
-
Useful For Chat, Monitoring
Queue
-
-
Place message in, Pull message from
Analyze
Performance Not so good- (Push / Poll, DB Persistence)
-
-
-
Execution Model Polling - the service should periodically pull the queue and the check for a new message and when one is found, retrieve and handle it
Useful For Complex system with lots of data and messages that flowing around with the
order and reliability are top priority and performance as s secondary to them.
One common example is a system that processes a huge amount of data. Performance is usually not a top priority because there is no user or service that waits on the. Such a system is a classic example of queue messaging since it takes advantage of the queue strength order and reliability
-
-
stateless vs stateful
stateless fully supports scalability and redundancy, which make your application much more reliable.
Always use stateless architecture as it supports Scalability and Redundancy(when a server goes down, the other continue working)
-