<commit_before>KOZO - japanese for structure
===

Service Oriented Architecture Framework in Python

#### Service Registry
##### Service activation protocol
    Two phase process - register and activate
* ServiceHost setups its servers
* ServiceHost requests registration with the ServiceRegistry by providing its node_id, full_service_name
and a list of all its dependencies
* Registry responds to the registration request of service host when it has atleast one instance for each dependency
 registered but not necessarily activated
* ServiceHost receives registration response and connects with dependencies
* ServiceHost then sends a request to activate and waits
* Registry responds to activation request if all dependencies have requested activation 

#### Packet Structure
    {
        'to': <node_address> # bus layer
        'from': <node_address>, # bus layer
        
        'pid': <guid>, # added at the service layer
        'app': <app_name>,
        'service':<service_name>,
        'entity': <user_id>, # user_id is routing key/partition for who this service is required
        'endpoint': <api_name>, #added at the service layer
        'version': <api version>, #added at the service layer
        'type': <message|request|response|special>, # added at the service layer
        'params': <json object>, #added at the specific ServiceHost/Client implementation
    }
        
####
 * pinging - half open socket checkt
 * heartbeats
 * routing
 
 
 #### Routing mechanism
 
 a routing address aka 'service address' is described as "/app-name/service-name/entity-id" this is semantically describing that the packet
 should be routed to a service instance that is responsible for service a specific entity for a given app<commit_msg>change project name and fix packet type options<commit_after>Vyked
===

a python framework for service oriented architectures


#### Service Registry
##### Service activation protocol
    Two phase process - register and activate
* ServiceHost setups its servers
* ServiceHost requests registration with the ServiceRegistry by providing its node_id, full_service_name
and a list of all its dependencies
* Registry responds to the registration request of service host when it has atleast one instance for each dependency
 registered but not necessarily activated
* ServiceHost receives registration response and connects with dependencies
* ServiceHost then sends a request to activate and waits
* Registry responds to activation request if all dependencies have requested activation 

#### Packet Structure
    {
        'to': <node_address> # bus layer
        'from': <node_address>, # bus layer
        
        'pid': <guid>, # added at the service layer
        'app': <app_name>,
        'service':<service_name>,
        'entity': <user_id>, # user_id is routing key/partition for who this service is required
        'endpoint': <api_name>, #added at the service layer
        'version': <api version>, #added at the service layer
        'type': <message|request|response>, # added at the service layer
        'params': <json object>, #added at the specific ServiceHost/Client implementation
    }
        
####
 * pinging - half open socket checks
 * heartbeats
 * routing
 
 
{'fraction_non_alphanumeric': 0.07162704538437789, 'fraction_numerical': 0.0, 'mean_word_length': 3.7437774524158125, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4164884', 'n_tokens_mistral': 781, 'n_tokens_neox': 736, 'n_words': 370}