3. 协议模型 (Protocol Model)
本协议采用的通用模型是 client 对 server 执行 protocol operation. 在该模型中, client 向 server 发送 protocol request, 描述要执行的 operation. server 负责在 Directory 中执行必要操作. operation 完成后, server 通常向发出请求的 client 返回包含适当数据的 response.
protocol operation 通常彼此独立. 每个 operation 作为 atomic action 处理, 使 directory 保持一致状态.
虽然协议要求 server 在定义了 response 的情况下返回 response, 但 client 或 server 都不要求同步行为. 多个 operation 的 request 和 response 通常可以在 client 和 server 之间以任意顺序交换. 如果需要, 同步行为可由 client application 控制.
本文档定义的核心 protocol operation 可以映射到 X.500 (1993) Directory Abstract Service [X.511] 的一个子集. 但是, LDAP operation 与 X.500 Directory Access Protocol (DAP) operation 之间并非一一映射. 作为 X.500 directory gateway 的 server 实现, 可能需要执行多个 DAP request 才能服务单个 LDAP request.
3.1. 操作与 LDAP 消息层的关系 (Operation and LDAP Message Layer Relationship)
protocol operation 在 LDAP message layer 交换. transport connection 关闭时, LDAP message layer 中未完成的 operation 会在可能时被 abandon, 或在无法 abandon 时完成但不传输 response. 此外, transport connection 关闭时, client 不得假定任何未完成 update operation 已成功或失败.