Service cache (Or just Cache or Caching) is temporary storage to improve performance
Functions Can add something to cache, remove something from cache, or get something from cache
Memory Pressure -If you are running out of memory, then you will drop items from the cache
Expiration -Fixed or sliding terms, how long data is stored in cache. When something expires is either relative to when interactions occur or at a set time
Memory
- Instead of having memory in each servers, can have a remote server with consilidated memory resources. This is called distributed cache
- Uses a cache key - way of calling certain records
- on your computer or network
- a lot of time is spent serializing and de-serializing when communicating between network and local
Dependencies
- Simplist is by key - if have 1 file, can make other files dependent on that. If the 1 file is dropped, then the rest is dropped.
Caching is Key Value
- Named items, submitting a key brings back values
Service Log (Logging) running text file of interactions (what happened)
- Typically viewed with a tool like Tail
Service Locator (Locator) Finds services, handles dependency management and IOC using containers :)
- IOC is a inversion of control If my function has a dependency and reaches out to something else, it's hard to manage so you invert the control (IOC) and you push it in
- Containers isolate configurations
Service Map (Map) is an object copier using conventions and configuration
- Shallow and deep
- 1-Level Deep (Shallow)
- Everything (Deep)
- Add conventions and rules
Enterprise Service Bus (Service Bus) (ESBs) technique to decouple complex applications also providing durability and investigation capabilities.
- Form blows up
- Logging for that
- Automate playback of fields
- Re-factor to all send the same file
- add to queue
- Package that
- Typically backed by a queue
- If message fails, then typically goes to an error queue
Normally you deal with an object that has state. Event sources don't store state, just describe events. Event strings
- Event strings from the beginning of time to build up
- Intent decouples history from actual reasoning behing why changes occurred
- Tool to optimize event sourcing - takes snapshot
- Aggregated root - are the only objects your client code loads from the repository - single entity reference for determining data about an entity