Wintertree Software Inc.

Wintertree Spelling Server

Home Site index Contact us Catalog Shopping Cart Products Support Search

You are here: Home > Products > Developer tools > Wintertree Spelling Server > Technical details


Technical details

Application Program Interface (API) Summary

AddToUserDict

Add a word to a user dictionary file.

CheckAllText

Checks the spelling of words in a string: a phrase, sentence, paragraph, or an entire document. CheckAllText checks the entire string, and returns a report containing information about each misspelled word found. CheckAllText also reports incorrectly capitalized words and words requiring automatic or conditional correction.

CheckText

Checks the spelling of words in a string: a phrase, sentence, paragraph, or an entire document. CheckText returns to your application when it finds the next misspelled word in the string or when it reaches the end of the string. CheckText also reports incorrectly capitalized words and words requiring automatic or conditional correction.

DelFromUserDict

Remove a word from a user dictionary file.

DelText

Remove some text (e.g., a word) from a string at a given position. DelText is typically used when replacing a misspelled word with a correction.

GetTextWord

Obtain the word in a string at a given position.

GetUserDict

Obtain the set of words in a user dictionary file.

InsertText

Insert some text (e.g., a word) into a string at a given position. InsertText is typically used when replacing a misspelled word with a correction.

NextTextWord

Advance to the word following the current word. NextTextWord is used to skip over a word reported as misspelled without correcting it.

Suggest

Locates suggested alternative spellings for a misspelled word. The set of suggestions is returned in order of decreasing probability of correctness, so the first word is the best choice. Suggestions can be located using typographical (looks like) or phonetic (sounds like) matching, or both.

WordCount

Return a count of the number of words in a string.

Options

The following options are supported by Wintertree Spelling Server. Options can be set as defaults that apply to all spell-check requests or can be set for individual requests

Scalability

Like all spell checkers, Wintertree Spelling Server is compute-bound. This means that while it is processing a spelling request, it is using as much of the computer's CPU as the operating system allows. Assuming no other processes are running on the computer, Wintertree Spelling Server will use 100% of the computer's CPU while processing a spelling request. If it takes 1ms to process the request, then 1ms of CPU time will be needed on the computer.

Wintertree Spelling Server is extremely fast, so its actual use of CPU time tends to be small. Wintertree Spelling Server checks spelling at a rate of over 400,000 words per second on average server hardware. On such hardware, assuming each request contained about 1,000 words, 400 requests could be processed in one second. If the server had no other work to do, the 400 requests would take both one second of elapsed time and one second of CPU time. (This is a bit of an oversimplification, but it will do for illustration purposes.)

On a server computer that allowed Wintertree Spelling Server to process 400,000 words per second, roughly four hundred 1000-word spelling requests could be processed each second. The throughput on this computer is 400 spelling requests per second, assuming an average request size of 1000 words. The actual delay noticed by the client will vary depending on the load distribution of requests (i.e., requests arriving one after another or all 100 requests arriving at once). In the worst case, a client will notice a delay of about one second (other factors will contribute to the actual delay, such as the time required to process the HTTP request containing the spell-check request and the time to return a reply, plus other server overhead such as logging, security checks, etc.). A one-second delay may be acceptable to most users.

If the number of requests increases to 800 per second, or the average request size increases to 2000 words while the number of requests remains constant, the worst-case delay will increase to 2 seconds. If this is unacceptable, then two possible actions can be taken:

  1. Change the server to a faster computer;

  2. Create a "server farm" with an additional computer which processes half (more accurately, 1/n, where n is the total number of servers in the farm) of the requests.

In the first approach, the throughput will increase in proportion to the increase in computer power. If the new computer is twice as fast, then it will process roughly twice as many spelling requests in the same time. Given Moore's law (which states that the number of number of transistors, and therefore the capability and power, per square inch of integrated circuits will double every year), upgrading to more powerful server computers as they become available may be an effective way to maintain acceptable throughput in the face of growing demand.

In the second approach, the throughput will increase in proportion to the number of additional servers and the relative compute power of each server. Each server would contain an independent copy of Wintertree Spelling Server. HTTP requests are forwarded to individual servers in the farm by a load balancer. There is no technical limit to the number of Wintertree Spelling Server instances in a server farm, as each instance is independent of the others.


Home Site index Contact us Catalog Shopping Cart Products Support Search


Copyright © 2015 Wintertree Software Inc.