-
Notifications
You must be signed in to change notification settings - Fork 1
NBB Channel
hilfialkaff edited this page Nov 4, 2010
·
1 revision
**Relevant files: ** nameserver.c, nameserver.h, nameserver_main.c
- Gets initialized first
- Stores simple services' struct (under struct service_t)
- Client will need to ask nameserver to get the shared memory id for the server that it wants to connect
**Relevant files: ** nbb.c, nbb.h, service.c
- Will try to reserve a number of channels from the service and if it succeed, everything is good
**Relevant files: ** nbb.c, nbb.h, client.c
- Will try to connect to the service that it wants and if it succeed, it could then send message to the service
- Interrupts are only used by the person SENDING & polling is only used by the person READING (We assume that the reply will not be that far into the future & less complicated too)
- Calloc() is used instead of malloc() in some parts of program so that no junk bytes are present in the shared memory & stuffs
- Service sending to nameserver: {service name} {# of channels requested} {service_pid}
- Nameserver replying to service: {1st channel id} {2nd channel id} ... {n-th channel id} (Assuming the previous request could be granted)
- Client sending to nameserver: {service to connect to}
- Nameserver replying to client: {i-th service channel id} {service pid} (Assuming the previous request could be granted)
- make all
- ./nameserver
- ./service
- Any # of "./client"
- Package the files better (ie: move the shm stuffs in nbb.c to possibly new client_shm.c & service_shm.c)
- Handles the case when client & service disconnects from the nameserver
- Related to the previous one -> heartbeat packets
- Dynamic growth of data structures
- Fix hardcoded malloc()
- service & client could choose who to connect to