github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/ibus/README.md (about) 1 Cleaned. We do not use it yet, also there is a problem. ref https://github.com/voedger/voedger/issues/740 2 3 It existed at: 4 5 - https://github.com/voedger/voedger/tree/73c8437bf07f7f2a7a87ea403ed79f08115ecf6e/pkg/ibus 6 - https://github.com/voedger/voedger/tree/73c8437bf07f7f2a7a87ea403ed79f08115ecf6e/pkg/ibusmem 7 8 ### Bus 9 10 - Bus connects system services 11 - E.g.: HTTP Server, EMail Gateway, App Partition Query Handler 12 - For CE/SE services are located in the same process 13 14 ### Principles 15 16 - Limited number of concurrent requests: maxNumOfConcurrentRequests 17 - Example: million of http connections but 1000 concurrent requests 18 - "ibus.ErrBusUnavailable" (503) is returned if the number of concurrent requests is exceeded 19 - Sender and Receiver both respect timeouts: readWriteTimeout 20 - E.g. 5 seconds, by (weak) analogy with [FoundationDB, Long-running read/write transactions](https://apple.github.io/foundationdb/anti-features.html) 21 - Result of QuerySender can be used even if AddressHandler has not been found - Sender will return `ErrReceiverNotFound` error 22 23 ### Components 24 25 ```mermaid 26 erDiagram 27 ISender }|--|| Address : sends-to 28 Address ||--|| AddressHandler : handled-by 29 AddressHandler ||--|{ Processor : has 30 Address ||--|| Receiver: associated-with 31 32 Processor ||--|| Goroutine: has 33 Processor }|--|| Receiver: has 34 Goroutine }|--|| Receiver: calls 35 ``` 36 37 ### How it works with Commands and Queries 38 39 ```mermaid 40 erDiagram 41 HTTPClient ||--|| ISender_1: "requested ISender for sys/registry/8/q" 42 ISender_1 ||--|| Address_1: connected-to 43 Address_1 ||--|| AddressHandler_1: served-by 44 AddressHandler_1 ||--|| RegistryQueryHandler8: call 45 46 HTTPClient ||--|| ISender_2: "requested ISender for sys/registry/5/с" 47 ISender_2 ||--|| Address_2: connected-to 48 Address_2 ||--|| AddressHandler_2: served-by 49 AddressHandler_2 ||--|| RegistryCommandHandler5: call 50 51 RegistryQueryHandler8 }o--|| Receiver: is 52 RegistryCommandHandler5 }o--|| Receiver: is 53 54 Address_1{ 55 string owner "sys" 56 string app "registry" 57 int partition "8" 58 int part "q" 59 } 60 AddressHandler_1{ 61 goroutine processor1 62 goroutine processor2 63 goroutine processor3 64 goroutine processor4 65 goroutine processor5 66 } 67 Address_2{ 68 string owner "sys" 69 string app "registry" 70 int partition "5" 71 int part "c" 72 } 73 AddressHandler_2{ 74 goroutine r1 75 } 76 ```