scalableserver_fixedthreadpool's Introduction
################################ SCALABLE JAVA NIO SERVER - FIXED THREAD POOL AUTHOR: GREGORY POISSON ################################ DATA STRUCTURES HASH MESSAGE This is the 8KB message passed from the client to the server. Despite the name, it isn't actually hashed, it is just random data. When this data arrives at the server, it gets hashed into a code which is returned to the client. NODE This is an interface for the Server and Client. It contains only a boolean to turn debug mode on or off. If debug mode is turned on, the Server and Client run very slowly in order to allow debug information to be readable on the console. Debug mode is turned off by default. CLIENT COMMS This is just an object to contain the communication code relevant to the client. After the client main thread executes, it creates a ClientComms object which communicates with the server. THREAD POOL MANAGER This maintains a fixed size array of Worker Threads, as specified in the assignment WORKER THREAD The threads which perform the majority of the processing. These threads live for the duration of the program and do not get re-instantiated. ACCEPT INCOMING TRAFFIC TASK This is the task type that is queued when data is incoming from the client COMPUTE HASH TASK This is the task type that is assigned to the worker thread after it has completed an AcceptIncomingTrafficTask REPLY TO CLIENT TASK This is the task type that is queued when a hash code is ready to be sent back to the client TASK The abstract class extended by the other Task objects, as specified in the assignment HASH COMPUTER This is used by the server and client to compute hash codes STAT TRACKER References to this object are distributed to the worker threads to keep track of throughput, and it is also used by the clients to track their own throughput
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.