The Architecture of Unread Marks in Lotus Notes
Abstract
This document describes the architecture of unread marks in the Lotus Notes client.
Content
In every database, Lotus Notes keeps track of each document that every user has read. This information is stored and maintained by several structures within both the .NSF and the Notes client itself. The following is a description of this architecture.
Note: Additional unread functionality was introduced in Notes/Domino 6.0.3 and 6.5.
The Unread ID Table
Each database stores the list of unread documents in an Unread ID Table within the NSF file. To save space, this table stores a list of Note IDs instead of the longer UNIDs. Because of this, the table is specific to the replica that stores it.
This table is user-specific and is stored within the .NSF file in a special structure named with the hierarchical user name to which it applies. When a database is opened, this table is transferred locally to the Notes client and stored temporarily in the DESKTOP.DSK file (in R5 this is renamed DESKTOP5.DSK). All updates to the table are then performed locally during the session for which the database is opened. It is important to recognize that there is no date information regarding when a
particular document is marked read, aside from the time stamp of the ID table itself. Therefore, onflicts between replicas are not resolved in a similar way to replication conflicts. It should also be noted that because these tables are lists of Note IDs, any synchronization between tables must involve the conversion of Note IDs to UNIDs.
While the Notes user is accessing a database, all read operations are logged in a structure called the Unread Journal. This Journal is stored in the client's CACHE.DSK file and stores about 20,000 consecutive operations in a circular data structure (FIFO) that tracks all of the UNIDs of documents marked read or unread while accessing a database. This Journal is specific to the Notes client and is not involved with tracking any operations performed by an API program. More detail on Journal
Playback is outlined below.
In Release 5.0, this Unread Mark Architecture is not drastically altered. Most of the changes to this process were to internal code while leaving the main procedures intact. The most significant new feature is a database property that prevents unread marks from being maintained completely. Because of the network traffic that is necessary to track and update the Unread ID tables, this feature should provide increased performance for databases that implement it.
Also in R5, the server started maintaining an in-memory copy of a user's unread ID table. This allows multiple clients or API programs to access a user's unread table without resulting in a 'last one out wins' scenario. Instead, as each client session sends back its updated version of the unread table, the server merges the changes with the version in-memory.
How are Unread Marks Updated?
The Unread ID table is updated in a few different ways, most often as users open or edit documents. The Unread ID table is transferred locally to the DESKTOP.DSK or DESKTOP5.DSK file and updated there. When the user closes the database, the ID table is transferred back to the .NSF file. This is true regardless of whether the database is residing on a server. Users see the unread marks in views that utilize the property to display them. The Unread ID table is overlaid onto the view index, and the client is then responsible for displaying the entries properly. When a user chooses to update the ead/unread status of a document using the menu, the same behavior is followed.
Every database stores a separate table called the Modified Note ID Table. Exposed through the Notes API, this is a list of every note in the database, in order of the last modified time. When the user opens a database, the client grabs a list of modified documents since the last time the unread table was updated using the Modified Note ID Table. The client then applies the newly modified documents to the Unread ID table. Note that newly added documents, such as mail, are not inserted into an Unread ID Table until the time a user opens the database. In cases where the modified note ID table includes incorrect information, the unread ID table may end up reflecting the error.Journal 'Playback'The Unread Journal in the CACHE.DSK file of a client maintains a list of consecutive unread mark operations performed on every database accessed by the client. The desktop file maintains a set of positions within this structure related to the last operations performed on a particular database and its replicas. When a database is then opened, the client checks to determine if the last operation played back against that particular replica is the last operation performed against any replica of that database. If it is, the client does not make any changes to the unread table based on the journal. If it is not, the client then plays scans through every operation stored in the journal and applies the appropriate ones to the unread table loaded in memory. This can sometimes result in inconsistent unread tables across replicas of a database in the event of an abnormal database closure (e.g. when the server or client crashes). If the unread table cannot be saved to the file appropriately, it may result in the desktop information being out of sync with the unread table.
Because the journal is limited to 20,000 operations (or entries), the Notes client uses special methods to deal with large unread mark operations, such as 'Mark All Read'. When a user marks a number of documents read or unread at once, the journal stores each operation in an individual entry. In cases where the number of individual operations associated with a single event exceeds 1000, the journal stores an entry called 'Mark All Before This Time'. This entry stores the time of the operation, and during journal playback, this entry results in any document last modified before the specific time being
marked read or unread accordingly. This can cause inconsistencies when documents fit into the timeframe of the event, but have not replicated into the database. Users may expect to see those documents unaffected, but, in fact, they will be.
How are Unread Marks Maintained?
Here we will investigate four different situations involving Notes clients and Notes database replicas.
Single client - Single replicaThe Unread ID table is transferred to the local DESKTOP.DSK or DESKTOP5.DSK as a user opens the database. The Unread Journal in the CACHE.DSK is then "played back" against this ID table and the table is updated to reflect any changes that the Journal has logged. The modified Unread ID table is then transferred back to the .NSF file when the database is closed. In these situations, the net result is that the Unread Journal does little more than track the user's actions. The Journal does not really come into play until multiple replicas are introduced.
Multiple client - Single replica
This is similar to the above situation, except two DESKTOP.DSK or DESKTOP5.DSK files are being used. As long as each client is closing the database before it is opened by the other, the Unread Table should be maintained correctly. However, if the two clients are accessing the same replica simultaneously, problems may arise. If each client is maintaining a local copy of the Unread ID table, then the "last one out" principle is observed. Whichever client is the last to close the database will
overwrite the entire Unread ID table maintained by the other client.
In R4, this is a situation that can also be caused by other API programs running on the same machine, such as Organizer 97 GS. Each program maintains its own Unread ID table, and inconsistencies appear because the two programs rarely touch the same documents. This can be mitigated by using the NOTES.INI parameter, NSF_UNREAD_METHOD=1, which allows the API programs (Notes included) to modify only the document entries that it touches. Changes to the R5 architecture take care of this limitation and the parameter is no longer required.
Single client - Multiple replica
Again, the Unread ID table is transferred to the local DESKTOP.DSK or DESKTOP5.DSK file. In this case however, the Unread Journal comes into play. Once the Unread ID table is local, the Unread Journal is "played back" against the table, updating it with the operations performed in the other replica. The limits outlined above will affect the performance of this scenario. Alternatively, the user may select two replica icons from the workspace and manually exchange unread marks. This can be performed either by using the menu command Edit, Unread Marks, Exchange Unread Marks, or by using a SmartIcon that performs @Command([ExchangeUnreadMarks]). These actions would have to be performed while icons are unstacked on the workspace. Note that the while the @Command still exists in R5, the menu command does not.
Multiple clients - Multiple replicas
This situation most likely will result in inconsistent unread mark lists. It is also fairly common. Stepping through the processes that are outlined above, it is clear that the structures and methods in place for maintaining unread marks are not sufficient for this situation. If two clients are exclusively accessing two separate replicas, neither the Unread Mark ID table nor the Unread Journal will be able to synchronize unread marks between the two replicas. Replication on its own does not synchronize unread marks either. Because the Unread Mark ID tables are user-specific and use Note IDs, it is not feasible to transfer all of these tables during replication.
To accommodate this type of situation, the Notes client implements an .INI parameter, REPLICATOR_SYNC_UNREAD. This parameter should equal the number of half-hours between Unread ID table synchronization. It is a client implementation only, and will not synchronize unread marks between servers unless a client is initiating the replication event. Even in this case, the only
Unread ID tables that will be updated will be the ones specific to the user initiating replication. The intention of this parameter is to help synchronize the Unread ID tables between two replicas that are primarily used by different clients. An example of this would be an office replica that resides on a server and a remote replica that resides on a home machine or a laptop.
This parameter works by synchronizing the Unread ID tables of the two replicas after each replication event that comes after the minimum number of half-hours specified in the .INI file. For example, if the .INI file has REPLICATOR_SYNC_UNREAD=2, the replicator will synchronize the Unread ID tables once an hour. If replication occurs as a background process every fifteen minutes, synchronization will occur only every fourth replication event. If this parameter is set to -1, the replicator will synchronize the Unread ID tables after each replication event. For more information on this parameter, refer to the document titled, "Unread Marks Are Not Exchanged Replicating to a Server From Two Different Clients" (#158903 ).
It should be noted that this will have a negative affect on replication times. In addition, this feature may be made obsolete or implemented differently in future versions of Notes. Another caveat that should be included here is that there are no replication conflicts in this process. These ID tables may have conflicting information in them regarding a single document.
Because documents generally go from 'unread' to 'read,' these conflicts are always resolved to 'read.' This might not be what the user expected. The Unread Journal does not have this same problem because while it does not track the exact times of the
operations it tracks, it does know in what order they occurred
发表评论
-
DOMINO的所有隐藏域
2009-02-06 14:26 2252/* Standard NSF Field Name/Valu ... -
视图索引
2008-09-27 22:26 26571. 视图也有索引可能有 ... -
什么是DOMINO 网络域?什么是验证字?
2008-09-27 22:18 22451. Domino网络域 Domino网 ... -
数据库和模板
2008-09-27 22:12 12671.为什么要有模板? Notes数据库是个文档型数据库 ... -
TCP/IP堆栈内存已用完,常见的处理方法
2008-09-27 22:07 28201.重启notes或计算机。2. ... -
简要表表单-概述
2008-09-27 22:05 1370简要表表单对于收集特 ... -
代理知识
2008-09-27 22:04 1365代理运行时,困难在于如何确定检查哪个用户的权限!代理中涉及的用 ... -
Domino服务器命令表
2008-09-27 22:03 1575Broadcast message-------------- ... -
Lotus Notes的六个使用技巧
2008-09-27 21:44 2941一、在一台计算机装多个ID 的LOTUS 如果是多 ... -
LOTUS学习技巧-2-公式学习
2008-09-27 21:32 16661.变量 变量有两种 ... -
LOTUS学习技巧-1
2008-09-27 21:18 14871、 notes同关系型数据库 ...
相关推荐
内容概要:本文详细介绍了基于MATLAB GUI界面和卷积神经网络(CNN)的模糊车牌识别系统。该系统旨在解决现实中车牌因模糊不清导致识别困难的问题。文中阐述了整个流程的关键步骤,包括图像的模糊还原、灰度化、阈值化、边缘检测、孔洞填充、形态学操作、滤波操作、车牌定位、字符分割以及最终的字符识别。通过使用维纳滤波或最小二乘法约束滤波进行模糊还原,再利用CNN的强大特征提取能力完成字符分类。此外,还特别强调了MATLAB GUI界面的设计,使得用户能直观便捷地操作整个系统。 适合人群:对图像处理和深度学习感兴趣的科研人员、高校学生及从事相关领域的工程师。 使用场景及目标:适用于交通管理、智能停车场等领域,用于提升车牌识别的准确性和效率,特别是在面对模糊车牌时的表现。 其他说明:文中提供了部分关键代码片段作为参考,并对实验结果进行了详细的分析,展示了系统在不同环境下的表现情况及其潜在的应用前景。
嵌入式八股文面试题库资料知识宝典-计算机专业试题.zip
嵌入式八股文面试题库资料知识宝典-C and C++ normal interview_3.zip
内容概要:本文深入探讨了一款额定功率为4kW的开关磁阻电机,详细介绍了其性能参数如额定功率、转速、效率、输出转矩和脉动率等。同时,文章还展示了利用RMxprt、Maxwell 2D和3D模型对该电机进行仿真的方法和技术,通过外电路分析进一步研究其电气性能和动态响应特性。最后,文章提供了基于RMxprt模型的MATLAB仿真代码示例,帮助读者理解电机的工作原理及其性能特点。 适合人群:从事电机设计、工业自动化领域的工程师和技术人员,尤其是对开关磁阻电机感兴趣的科研工作者。 使用场景及目标:适用于希望深入了解开关磁阻电机特性和建模技术的研究人员,在新产品开发或现有产品改进时作为参考资料。 其他说明:文中提供的代码示例仅用于演示目的,实际操作时需根据所用软件的具体情况进行适当修改。
少儿编程scratch项目源代码文件案例素材-剑客冲刺.zip
少儿编程scratch项目源代码文件案例素材-几何冲刺 转瞬即逝.zip
内容概要:本文详细介绍了基于PID控制器的四象限直流电机速度驱动控制系统仿真模型及其永磁直流电机(PMDC)转速控制模型。首先阐述了PID控制器的工作原理,即通过对系统误差的比例、积分和微分运算来调整电机的驱动信号,从而实现转速的精确控制。接着讨论了如何利用PID控制器使有刷PMDC电机在四个象限中精确跟踪参考速度,并展示了仿真模型在应对快速负载扰动时的有效性和稳定性。最后,提供了Simulink仿真模型和详细的Word模型说明文档,帮助读者理解和调整PID控制器参数,以达到最佳控制效果。 适合人群:从事电力电子与电机控制领域的研究人员和技术人员,尤其是对四象限直流电机速度驱动控制系统感兴趣的读者。 使用场景及目标:适用于需要深入了解和掌握四象限直流电机速度驱动控制系统设计与实现的研究人员和技术人员。目标是在实际项目中能够运用PID控制器实现电机转速的精确控制,并提高系统的稳定性和抗干扰能力。 其他说明:文中引用了多篇相关领域的权威文献,确保了理论依据的可靠性和实用性。此外,提供的Simulink模型和Word文档有助于读者更好地理解和实践所介绍的内容。
嵌入式八股文面试题库资料知识宝典-2013年海康威视校园招聘嵌入式开发笔试题.zip
少儿编程scratch项目源代码文件案例素材-驾驶通关.zip
小区开放对周边道路通行能力影响的研究.pdf
内容概要:本文探讨了冷链物流车辆路径优化问题,特别是如何通过NSGA-2遗传算法和软硬时间窗策略来实现高效、环保和高客户满意度的路径规划。文中介绍了冷链物流的特点及其重要性,提出了软时间窗概念,允许一定的配送时间弹性,同时考虑碳排放成本,以达到绿色物流的目的。此外,还讨论了如何将客户满意度作为路径优化的重要评价标准之一。最后,通过一段简化的Python代码展示了遗传算法的应用。 适合人群:从事物流管理、冷链物流运营的专业人士,以及对遗传算法和路径优化感兴趣的科研人员和技术开发者。 使用场景及目标:适用于冷链物流企业,旨在优化配送路线,降低运营成本,减少碳排放,提升客户满意度。目标是帮助企业实现绿色、高效的物流配送系统。 其他说明:文中提供的代码仅为示意,实际应用需根据具体情况调整参数设置和模型构建。
少儿编程scratch项目源代码文件案例素材-恐怖矿井.zip
内容概要:本文详细介绍了基于STM32F030的无刷电机控制方案,重点在于高压FOC(磁场定向控制)技术和滑膜无感FOC的应用。该方案实现了过载、过欠压、堵转等多种保护机制,并提供了完整的源码、原理图和PCB设计。文中展示了关键代码片段,如滑膜观测器和电流环处理,以及保护机制的具体实现方法。此外,还提到了方案的移植要点和实际测试效果,确保系统的稳定性和高效性。 适合人群:嵌入式系统开发者、电机控制系统工程师、硬件工程师。 使用场景及目标:适用于需要高性能无刷电机控制的应用场景,如工业自动化设备、无人机、电动工具等。目标是提供一种成熟的、经过验证的无刷电机控制方案,帮助开发者快速实现并优化电机控制性能。 其他说明:提供的资料包括详细的原理图、PCB设计文件、源码及测试视频,方便开发者进行学习和应用。
基于有限体积法Godunov格式的管道泄漏检测模型研究.pdf
嵌入式八股文面试题库资料知识宝典-CC++笔试题-深圳有为(2019.2.28)1.zip
少儿编程scratch项目源代码文件案例素材-几何冲刺 V1.5.zip
Android系统开发_Linux内核配置_USB-HID设备模拟_通过root权限将Android设备转换为全功能USB键盘的项目实现_该项目需要内核支持configFS文件系统
C# WPF - LiveCharts Project
少儿编程scratch项目源代码文件案例素材-恐怖叉子 动画.zip
嵌入式八股文面试题库资料知识宝典-嵌⼊式⼯程师⾯试⾼频问题.zip