Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 2.57 KB

030.010 - SERVICE I.md

File metadata and controls

63 lines (49 loc) · 2.57 KB

SERVICE I

SERVICE CACHE

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

Service Log (Logging) running text file of interactions (what happened)

  • Typically viewed with a tool like Tail

SERVICE LOCATOR

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

Service Map (Map) is an object copier using conventions and configuration

  • Shallow and deep
    • 1-Level Deep (Shallow)
    • Everything (Deep)
  • Add conventions and rules

SERVICE BUS

Enterprise Service Bus (Service Bus) (ESBs) technique to decouple complex applications also providing durability and investigation capabilities.

  1. Form blows up
  2. Logging for that
  3. Automate playback of fields
  4. Re-factor to all send the same file
  5. add to queue
  6. Package that
    • Typically backed by a queue
    • If message fails, then typically goes to an error queue

EVENT SOURCING

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