The Wire Book: Java, SMB and Enterprise Data, Explained

reference · field edition

The Wire Book

Fifty-seven terms from the middle of the stack — the Java runtime, the file protocols underneath it, and the AI pipelines now being bolted on top — explained for the engineer who has to make them work together on a Tuesday afternoon.

8 chapters · 57 entries · 1 running case study

how to read an entry

Term
The word as you’ll see it in logs, docs and tickets, with its common aliases.
L1 / L2 / L3
Which layer it lives in: the JVM, files and protocols, or data and AI.
At Nordvik
What it meant in our running example project.
Breaks when
The failure mode that usually brings people here.

the running example

Definitions are easy to nod along to and hard to remember. So most entries here follow one project: Nordvik Freight, a fictional mid-size logistics company with a twelve-year-old Windows file server, a Java back office that reads from it every night, and a board that has just asked for “an AI assistant that knows all our documents”.

Nordvik’s file server holds 14 TB across roughly 9 million files. The plan is to move most of it to object storage, keep a smaller SMB share for active work, and build an assistant that can answer questions about contracts, customs paperwork and operating procedures — without showing anyone a document they shouldn’t see.

chapters

start from the symptom

Something broke. Which entry do you need?

What you’re seeingLikely culpritRead
“Access denied” to a share after a Windows updateSigning now required, or an old dialect switched offSMB signing · Dialect · NTLM
Nightly Java job hangs with no errorMissing timeouts on a network readTimeout · Blocking I/O
Files copied but some are missingPaths longer than Windows allows, or open filesPath length limit · File locks
App runs out of memory reading big filesWhole file loaded instead of streamedHeap · Streams · Buffer
Service account works on one server, not anotherKerberos principal or DNS name mismatchKerberos · SPN
AI assistant quotes a document the user can’t openPermissions not carried into the indexPermission-aware retrieval · ACL
AI bill doubled with no new usersLonger context, higher reasoning, no cachingContext window · Cached input

01

The JVM: what your code actually runs on

Most enterprise file handling still runs on Java. These are the runtime terms that decide whether a job finishes in four minutes or falls over at 3 a.m.

JVM

Java Virtual Machine

L1 · JVM

The program that runs compiled Java code. It manages memory, threads and just-in-time compilation, which is why the same jar file runs on Windows, Linux and a container without changes.

AT NORDVIKThe nightly import runs in a JVM on a Linux host that reads files from the Windows share across the network.

BREAKS WHENthe JVM’s memory settings were sized for a test file, not production.

JDK vs JRE

Development kit vs runtime environment

L1 · JVM

The JDK is the full toolkit for building Java software; the JRE was the smaller package for only running it. Modern Java ships as a JDK, and teams build slimmed-down runtimes for containers.

AT NORDVIKThe build server uses a full JDK; the production container carries only the modules the import job needs.

LTS release

Long-term support

L1 · JVM

Java versions that receive updates for years rather than months. Recent LTS versions are 17, 21 and 25; most enterprises upgrade from one LTS to the next and skip the ones in between.

AT NORDVIKThe import job is still on Java 11. Moving to 21 is the first step of the project, before anything touches the file server.

BREAKS WHENa library you depend on hasn’t been updated for the newer version.

Heap

Also: heap memory, -Xmx

L1 · JVM

The pool of memory where Java objects live. Its maximum size is set when the JVM starts. Too small and the application runs out of memory; too large and garbage collection pauses get longer.

AT NORDVIKThe job had a 2 GB heap. A 3 GB customs export arrived one night and the process died.

BREAKS WHENcode reads a whole file into memory instead of streaming it.

Garbage collection

Also: GC, G1, ZGC

L1 · JVM

The JVM automatically frees memory that’s no longer used. Different collectors trade throughput against pause times; modern ones such as ZGC keep pauses very short even on large heaps.

AT NORDVIKLong GC pauses during peak copying made the share connection time out. Switching collector fixed it without a code change.

Virtual threads

Also: Project Loom, JEP 444

L1 · JVM

Lightweight threads, final since Java 21, that let one JVM handle huge numbers of concurrent blocking operations — such as reading thousands of files at once — without the cost of a full operating-system thread each.

AT NORDVIKRewriting the crawler with virtual threads let it scan the share with 2,000 concurrent reads on a modest server.

BREAKS WHENa library pins the thread with old-style synchronised blocks, quietly removing the benefit.

Dependency

Also: Maven artifact, library, transitive dependency

L1 · JVM

A third-party library your code relies on — and every library that library relies on. Most of a modern Java application is other people’s code.

AT NORDVIKThe SMB client library pulled in an old cryptography library with a known vulnerability, two levels down the tree.

BREAKS WHENnobody owns upgrades, so a dependency stays pinned for years.

02

Java I/O: how bytes actually move

File protocols are slow, remote and occasionally unreliable. These terms describe how Java code should deal with that — and the shortcuts that cause most incidents.

Blocking I/O

Also: classic I/O, java.io

L1 · JVM

A read or write that stops the thread until it completes. Simple to write and fine for local files; risky across a network, where “until it completes” can mean forever.

AT NORDVIKThe original importer used plain blocking reads with no limits. One slow file stopped the whole run.

BREAKS WHENthe remote server stops responding but never closes the connection.

NIO

New I/O, java.nio

L1 · JVM

Java’s more flexible I/O package: channels, buffers, file-system abstractions and non-blocking operations. It also lets libraries plug in custom file systems, such as a remote share or a cloud bucket.

AT NORDVIKWrapping both the SMB share and object storage behind the same file-system interface let the team test the migration with one code path.

Stream

Also: InputStream, streaming

L1 · JVM

Reading or writing data a piece at a time instead of all at once. Streaming keeps memory use flat no matter how large the file is.

AT NORDVIKSwitching the customs export from “read all bytes” to a stream dropped memory use from 3 GB to under 50 MB.

Buffer

Also: buffer size

L1 · JVM

A block of memory used to move data in chunks. Larger buffers mean fewer round trips over the network, up to the point where the protocol’s own limits take over.

AT NORDVIKRaising the read buffer from 8 KB to 1 MB cut copy time on large files by more than half over SMB 3.

BREAKS WHENthe buffer is larger than the server allows per request and the client silently splits it anyway.

Timeout

Also: connect timeout, read timeout

L1 · JVM

The maximum time code will wait for a connection or a response before giving up. The most important setting in networked I/O, and the one most often left at “wait forever”.

AT NORDVIKAdding a 30-second read timeout turned silent overnight hangs into clear, retryable errors.

BREAKS WHENit’s missing entirely, which is the default in many older libraries.

Retry with backoff

Also: exponential backoff

L1 · JVM

Trying a failed operation again after a short delay, increasing the delay each time. It handles brief network hiccups without hammering a struggling server.

AT NORDVIKRetries of 1, 2, 4 and 8 seconds cleared almost all transient copy failures during the migration window.

BREAKS WHENretries are unlimited, turning one failure into a self-inflicted outage.

Connection pool

Also: session reuse

L1 · JVM

Keeping a set of open connections ready to reuse instead of opening a new one for every file. Setting up an authenticated file-share session is expensive; reusing it is cheap.

AT NORDVIKOpening a fresh authenticated session per file meant 9 million logons. Pooling brought that down to a few dozen.

03

SMB: the protocol behind the network drive

When someone in an office says “the S: drive”, they mean SMB. Its vocabulary explains most of the strange errors that come from it.

SMB

Server Message Block

L2 · FILES

The network protocol Windows uses for shared folders, printers and more. Linux and macOS speak it too, and most NAS devices serve it. Modern versions are fast, encrypted and very different from the original.

AT NORDVIKEvery document the AI project needs currently lives behind one SMB server.

CIFS

Common Internet File System

L2 · FILES

The name used in the 1990s for an early SMB version. Today “CIFS” usually means SMB1 — and if a device insists on it, that’s a warning sign.

AT NORDVIKAn old scanner that only spoke CIFS was the last reason SMB1 was still enabled on the file server.

BREAKS WHENthe client and server can’t agree on anything newer.

Dialect

Also: protocol version, SMB 2.1, 3.0, 3.1.1

L2 · FILES

The specific SMB version two machines agree to use at the start of a connection. Each newer dialect adds security and performance features; both sides use the highest version they share.

AT NORDVIKThe Java library negotiated SMB 2.1 until it was upgraded; after that, 3.1.1 with encryption.

BREAKS WHENone side only supports SMB1 and the other has it disabled.

Share & UNC path

Also: \\server\share\folder

L2 · FILES

A share is a folder published over the network. A UNC path is its full network address, starting with two backslashes and the server name.

AT NORDVIK\\nvk-fs01\operations\customs\2024 — the path the import job had hard-coded for eight years.

Oplocks & leases

Opportunistic locks

L2 · FILES

Permission from the server for a client to cache a file locally because nobody else is using it. Leases, introduced in SMB 2.1, are the improved version. They make access much faster — until two programs want the same file.

AT NORDVIKThe migration tool kept being blocked by Excel files that users had left open with leases.

SMB signing

Also: message signing

L2 · FILES

A cryptographic check on every SMB message to prove it wasn’t tampered with in transit. Recent Windows releases require it by default for more connections than before.

AT NORDVIKAfter a Windows update, the old Java library stopped connecting. It didn’t support the signing the server now required.

BREAKS WHENa client library is too old to sign messages correctly.

SMB encryption

Also: SMB 3 encryption, AES-GCM

L2 · FILES

Encryption of the data itself as it crosses the network, available from SMB 3.0. It can be required per share or per server.

AT NORDVIKThe finance share was set to require encryption, which ruled out every client still on SMB 2.x.

Multichannel

Also: SMB multichannel

L2 · FILES

Using several network connections at once for one SMB session, for more speed and resilience. Available from SMB 3.0.

AT NORDVIKWith two network cards on the server, multichannel nearly doubled bulk copy speed during the migration.

DFS

Distributed File System namespaces

L2 · FILES

A layer that gives many shares on different servers one unified path. Users see one tree; behind it, folders may live on several machines.

AT NORDVIKThe S: drive was actually a DFS namespace pointing at three servers — something nobody had documented.

BREAKS WHENa client follows a referral to a server it can’t reach or authenticate to.

04

Identity & permissions: who is allowed to read what

Every file request carries an identity. Get this chapter wrong and you either break access for everyone or, worse, give an AI system access to everything.

Active Directory

Also: AD, domain

L2 · FILES

Microsoft’s directory of users, groups and computers, used to decide who can log in and what they can open across a Windows network.

AT NORDVIKNordvik has 1,100 AD groups. About 300 are still used.

NTLM

NT LAN Manager

L2 · FILES

An older Windows authentication method, still widely used as a fallback. Microsoft has announced plans to phase it out in favour of Kerberos.

AT NORDVIKThe Java job authenticated with NTLM because nobody had set up Kerberos for it.

BREAKS WHENNTLM is restricted on the server and the client has no other method.

Kerberos

Also: tickets, KDC

L2 · FILES

The preferred authentication method in Windows domains. Instead of sending passwords, clients obtain time-limited tickets from a central server and present them to each service.

AT NORDVIKMoving the service account to Kerberos removed the last reason to keep NTLM enabled on the file server.

BREAKS WHENthe clocks on client and server drift apart by more than a few minutes.

SPN

Service principal name

L2 · FILES

The name Kerberos uses to identify a specific service on a specific host. If the name the client asks for doesn’t match one registered in the directory, authentication fails.

AT NORDVIKConnecting by IP address instead of the server’s DNS name made Kerberos fail and NTLM quietly take over.

BREAKS WHENa service is reached by an alias or IP that isn’t registered.

ACL

Access control list

L2 · FILES

The list attached to each file or folder saying which users and groups may read, change or delete it. Every request is checked against it.

AT NORDVIKSome folders had ACLs with 40 entries, accumulated over a decade of one-off exceptions.

Share vs NTFS permissions

Two layers of access

L2 · FILES

Windows checks two sets of rules: one on the share itself and one on each file and folder. The effective access is the most restrictive combination of the two.

AT NORDVIKThe share allowed “Everyone: Full Control”; the real protection was all in the folder permissions.

BREAKS WHENsomeone tightens one layer and doesn’t realise the other was doing the work.

Service account

Also: technical user

L2 · FILES

A non-human account a program uses to log in. It should have only the access it needs — which is rarely the case after a few years.

AT NORDVIKThe importer’s service account could read the entire file server, including HR. The AI crawler must not inherit that.

05

Storage: where the bytes end up

Choosing a storage type is a decision about cost, speed, permissions and how applications must be written. These are the options most migrations choose between.

NAS

Network-attached storage

L2 · FILES

A dedicated device or server that stores files and serves them over the network, usually via SMB, NFS or both.

AT NORDVIKThe active-work share stays on a smaller NAS after the migration.

NFS

Network File System

L2 · FILES

The file-sharing protocol native to Linux and Unix. Like SMB, it lets a remote folder appear as part of the local file system.

AT NORDVIKThe Linux analytics servers mounted the same NAS over NFS, which caused permission surprises when Windows users saved files.

BREAKS WHENuser and group IDs differ between the machines writing the files.

Object storage

Also: blob storage, S3-compatible storage

L2 · FILES

Storage that keeps data as objects in buckets, each addressed by a key, accessed over HTTPS. It scales almost without limit and is cheap per terabyte, but it isn’t a file system.

AT NORDVIKThe 11 TB archive moves to object storage, where it costs a fraction of the file server’s upkeep.

BREAKS WHENcode assumes it can rename a folder or edit a file in place.

Bucket & key

Also: prefix

L2 · FILES

A bucket is the top-level container in object storage. Each object has a key — a name that often looks like a path, even though there are no real folders.

AT NORDVIKcustoms/2024/NVK-88213.pdf looks like a folder path but is just one long object name.

Storage tier

Also: hot, cool, archive

L2 · FILES

Price levels for the same data based on how often it’s read. Cheaper tiers charge more, or take longer, to retrieve data.

AT NORDVIKCustoms files older than seven years go to an archive tier; the AI index only covers the last five.

BREAKS WHENan automated job unexpectedly reads millions of archived objects.

Snapshot

Also: shadow copy, point-in-time copy

L2 · FILES

A frozen view of storage at a moment in time, used to recover from mistakes or ransomware. Cheap to take, because only changes are stored.

AT NORDVIKHourly snapshots on the file server meant a botched migration batch could be rolled back in minutes.

Deduplication

Also: dedupe

L2 · FILES

Storing identical data only once. It can work at the level of whole files or small blocks inside them.

AT NORDVIKA scan found 22% of Nordvik’s files were exact duplicates — mostly the same contracts saved in different team folders.

06

Migration: moving millions of files without losing any

Copying files is easy. Copying nine million of them, while people keep working, and proving nothing was lost, is a project.

Inventory

Also: discovery scan

L2 · FILES

A complete list of what’s on the source before anything moves: counts, sizes, ages, owners, file types and permissions.

AT NORDVIKThe inventory found 9.2 million files, 1.4 million of them untouched for over ten years.

Delta sync

Also: incremental copy

L2 · FILES

After the first full copy, repeatedly copying only what has changed since the last run, so the final switch-over takes minutes rather than days.

AT NORDVIKThree nightly delta runs shrank the final change set from 40,000 files to 600.

BREAKS WHENthe tool decides what changed by timestamp, and clocks or time zones disagree.

Cutover

Also: switch-over

L2 · FILES

The moment users and applications stop using the old location and start using the new one. Usually done in a quiet window, with a rollback plan.

AT NORDVIKCutover ran on a Saturday morning: final delta, permissions check, DFS path switched, old share made read-only.

Checksum

Also: hash, integrity check

L2 · FILES

A short fingerprint calculated from a file’s contents. If source and copy produce the same fingerprint, the copy is identical.

AT NORDVIKEvery migrated object was verified against a checksum. Twelve files failed and were re-copied.

Path length limit

Also: MAX_PATH, 260 characters

L2 · FILES

Many Windows applications can’t handle paths longer than 260 characters. Deep folder trees built over years regularly exceed it.

AT NORDVIKAbout 31,000 files had paths too long for the old copy tool, so they were silently skipped on the first run.

BREAKS WHENa tool skips long paths without reporting them.

File locks

Also: open handles

L2 · FILES

A file held open by one program may be unreadable, or unsafe to copy, until it’s closed.

AT NORDVIKFiles locked during working hours were queued for a second pass after midnight.

Nordvik’s migration in numbers (fictional)
MeasureValueWhat it changed
Files on the old server9.2 millionRuled out one-off manual copying
Total size14 TBFirst full copy took four nights over SMB 3 multichannel
Exact duplicates22%Removed before indexing; cut AI embedding volume by a fifth
Untouched for 10+ years1.4 millionSent to archive tier; excluded from the AI index
Paths over 260 characters31,000Needed a second tool and a renaming policy
Checksum failures12Re-copied and verified
Moved to object storage / kept on SMB11 TB / 3 TBActive work stays on a share; history moves to buckets

07

Data to AI: turning documents into answers

This is the layer every company is building right now. The vocabulary is new, but the hard parts — formats, permissions, scale — are the same ones the previous chapters were about.

RAG

Retrieval-augmented generation

L3 · AI

An AI system that first searches your own documents for relevant passages, then gives them to a language model to write an answer. The model works from your content instead of only its training.

AT NORDVIKThe Nordvik assistant is a RAG system over contracts, customs files and procedures.

Text extraction & OCR

Optical character recognition

L3 · AI

Getting machine-readable text out of files. Modern formats are easy; scanned PDFs need OCR to turn images of text into text.

AT NORDVIKForty per cent of the customs archive was scanned paper. OCR was the single slowest step in the pipeline.

BREAKS WHENscans are low-resolution or handwritten and the text comes out garbled.

Chunking

Also: splitting, passages

L3 · AI

Cutting documents into pieces small enough to search and pass to a model, while keeping enough context for each piece to make sense on its own.

AT NORDVIKContracts were split by clause rather than by fixed length, so each chunk held one complete obligation.

Embedding

Also: vector

L3 · AI

A list of numbers representing the meaning of a piece of text, produced by a model. Passages with similar meanings get similar numbers, which is what makes semantic search work.

AT NORDVIKEvery chunk was embedded once; only new and changed files are embedded again.

Vector index

Also: vector database, vector store

L3 · AI

A store built to find the embeddings most similar to a question very quickly, often alongside normal filters such as date or department.

AT NORDVIKThe index holds about 18 million chunks, each tagged with the groups allowed to read its source file.

Permission-aware retrieval

Also: security trimming, ACL filtering

L3 · AI

Making sure the search step only returns passages from files the person asking is allowed to open. Without it, an AI assistant becomes a way around every permission on the file server.

AT NORDVIKEach query is filtered by the user’s AD groups before any passage reaches the model.

BREAKS WHENpermissions are copied once at indexing time and never refreshed.

Context window

Also: context length

L3 · AI

The maximum amount of text a model can consider at once, measured in tokens. Larger windows allow more retrieved material per question — and cost more per question.

AT NORDVIKSending the top 8 passages instead of the top 30 kept answers just as accurate and cut cost per question by two-thirds.

Hallucination

Also: confabulation

L3 · AI

When a model states something plausible that isn’t supported by its sources. Good RAG systems reduce it by grounding answers in retrieved passages and citing them.

AT NORDVIKThe assistant must cite the file path for every claim, so users can check the original document.

08

AI costs: what the assistant costs to run

Once the pipeline works, the meter starts. These are the terms that appear on the bill.

Token

Also: input tokens, output tokens

L3 · AI

The unit AI models read and write in, roughly three-quarters of a word in English. Providers charge separately for tokens sent in and tokens generated, and output usually costs several times more.

AT NORDVIKA typical Nordvik question sends about 12,000 tokens of instructions and passages and gets back about 600.

Cached input

Also: prompt caching

L3 · AI

A discounted price for input the provider has seen recently, such as the same system instructions on every request. Keeping the stable part of a prompt identical and at the start lets it be cached.

AT NORDVIKThe assistant’s 3,000 tokens of standing instructions are cached, so they cost a small fraction of the normal input price.

Reasoning tokens

Also: thinking tokens

L3 · AI

Hidden working that newer models do before answering. It’s billed as output, so higher reasoning settings can multiply cost without changing the visible answer length.

AT NORDVIKReasoning is kept low for lookups and raised only for contract comparison questions.

BREAKS WHENa high default is set during a demo and never lowered.

Batch processing

Also: batch API, asynchronous jobs

L3 · AI

Sending large volumes of non-urgent requests to be processed over hours instead of instantly, usually at a lower price.

AT NORDVIKRe-summarising the whole procedures library overnight in batch cost far less than doing it live.

Rate limit

Also: tokens per minute, TPM

L3 · AI

The maximum volume a provider lets an account use per minute. It’s why a big indexing job can stall even when the code is fine.

AT NORDVIKThe first full indexing run hit rate limits within an hour and had to be spread across a weekend.

Model routing

Also: tiered models

L3 · AI

Sending each task to the cheapest model that handles it well: a small model for classification, a mid-size one for normal answers, a flagship only for the hardest questions.

AT NORDVIKSimple lookups go to a low-cost model; multi-document contract questions go to a larger one.

What the Nordvik assistant costs per month (illustrative)
AssumptionValue
Questions per working day500
Input tokens per question (instructions + passages)12,000
Output tokens per question600
Model price (mid-size, e.g. GPT-6.2 Sol)$2 in / $10 out per 1M
Cost per question, no caching$0.030
Monthly cost, 21 working days~$315
With 3,000 tokens cached and top-8 passages instead of top-30roughly a third of that

Our calculation at OpenAI list prices for GPT-6.2 Sol, November 2026. Excludes the one-off cost of embedding the archive and the infrastructure the index runs on.

questions

Asked about the terms in this book.

Is CIFS the same as SMB?
CIFS was the name for an early version of SMB. In practice, when a device or setting says “CIFS”, it usually means SMB1, which should be disabled wherever possible.
What’s the difference between SMB signing and SMB encryption?
Signing proves messages weren’t altered in transit; encryption stops anyone reading them. Signing protects integrity, encryption protects confidentiality. Many environments now require both.
Why does Kerberos fail when I use an IP address?
Kerberos identifies services by name. If you connect by IP or an unregistered alias, the client can’t find a matching service principal name and usually falls back to NTLM — or fails if NTLM is blocked.
Can object storage replace a file share completely?
Rarely. Object storage is excellent for archives, backups and application data, but it doesn’t support in-place edits or traditional folder permissions. Most organisations keep a smaller SMB share for active collaborative work.
What is the most important step in building an AI assistant over file shares?
Carrying permissions through to search. If the system can retrieve passages from files a user isn’t allowed to open, it becomes a way around every access control on the file server.
Is this site connected to the jCIFS project?
No. Share & Socket is an independent publication. We don’t develop, host or support jCIFS or any other library.

Nordvik Freight is a fictional company and all of its figures are illustrative. Protocol and version details are simplified for clarity; always check current vendor documentation before changing production systems.

Contact Us

We'd love to hear from you