Introduction
When working with shared folders and file servers, many developers and system administrators still rely on periodic directory scans to detect changes. But in the world of the SMB (Server Message Block) protocol, there’s a smarter, more efficient way to stay updated: Notify.
This underused SMB feature, fully supported by Visuality Systems’ jNQ, allows clients to receive real-time file system change notifications directly from the server. Let’s explore what SMB Notify is, how it works, and why it’s a performance game-changer.
What Is SMB Notify?
Notify is a long-running request a client sends to the SMB server for a specific directory handle. Once sent, the server holds (“parks”) the request open until a matching file system event occurs.
These events include:
- File or directory creation
- File deletion
- Renames
- Attribute changes (e.g., timestamps, permissions)
- Extended attribute updates
As soon as the event occurs, the server responds with details, allowing the client to react immediately.
This behavior is defined in the official Microsoft SMB protocol documentation, where the CHANGE_NOTIFY request is specified as part of the SMB protocol.
Example use case: a file manager or document editing app showing a shared folder can remain in perfect sync without constantly polling the server.
Why Notify Matters
✅ Reduces Bandwidth Consumption
Without Notify, applications often resort to directory tree traversal every few seconds to check for changes, an approach that creates unnecessary load and network traffic. Notify eliminates this pattern by letting the server notify the client only when something relevant happens.
✅ Improves Responsiveness
Changes appear on the client instantly, instead of being delayed until the next poll. This leads to a smoother user experience, especially in collaborative environments.
✅ Scales Better
For systems with hundreds or thousands of clients, polling quickly becomes a scalability nightmare. Notify significantly reduces round-trips per client, freeing server and network resources.
Notify and jNQ
Visuality Systems’ jNQ, our SMB protocol library for Java, fully supports the Notify feature as part of its comprehensive implementation of SMB3. Whether you’re building Managed File Transfer (MFT) systems, file-sharing tools, media servers, or enterprise storage solutions, jNQ’s support for Notify helps you build efficient, responsive, and scalable applications.
We’ve seen developers surprised at how easy it is to implement once they learn about it and how dramatically it improves performance compared to polling-based approaches.
Real-World Use: Ohalo and SEEBURGER
Organizations handling massive volumes of sensitive or dynamic data often depend on real-time visibility and efficiency in file operations.
- Ohalo leverages Visuality Systems’ SMB technology to discover and govern petabytes of data across file shares. Their system benefits from jNQ to accelerate and optimize file scanning at scale without disruption. Read Ohalo’s success story.
- SEEBURGER, a global leader in Managed File Transfer (MFT), integrates jNQ into their secure file exchange solutions where efficient, event-driven file monitoring plays a crucial role in ensuring compliance and system reliability. Download SEEBURGER’s use case.
Don’t Miss Out on Notify
If your SMB-enabled application is still scanning directories to detect changes, you’re likely consuming more resources than necessary. SMB Notify is the right way to track file system updates and it’s already available in the protocol and supported by modern SMB stacks like jNQ.
💡 Pro Tip: Make sure your server and client configurations don’t block long-lived requests or idle connections. Notify relies on keeping requests open.
Final Thoughts
SMB Notify is a powerful yet often overlooked feature that can boost the efficiency and user experience of any networked application. With jNQ’s full support, Java developers can easily integrate this capability and stop relying on outdated polling techniques.
Interested in seeing how Notify can streamline your SMB-based application?
Contact us or explore the jNQ documentation for implementation details.
Lilia Wasserman, VP R&D, Visuality Systems