jsbruglie / psis Goto Github PK
View Code? Open in Web Editor NEWpsis course project
License: MIT License
psis course project
License: MIT License
There is a lot of unnecessary sends and recvs that are handled by the connection interface.
The Front server is not necessarily in a separate file, but it is convenient to be so. In fact, the two servers should communicate via socket. The clients interact directly with the front client on 127.0.0.1:9999 which in turn redirects them to another port, that is being used by the Data server.
The Front server should obtain the number of the port by connecting to the Data Server each time a client initiates a connection.
The Front server should have 3 separate threads:
-Implement overwrite function
-The user is allowed to write a message with size <= MAX_SIZE
-It should use a temporary buffer, that only reads up to DEFAULT_MAX_SIZE. It shouldn't leave garbage in the socket for the next operation.
-memcpy should be used as opposed to strcpy
-Returns an int that is the actual size of the element that the client is trying to read. The function to be implemented, however, only allows the client to read DEFAULT_MAX_SIZE chars, even though the actual value may be longer. This is a known problem with the specification of the problem, but it should be implemented like so nonetheless.
-OPTIONALLY, define an additional function that performs the memory allocation an is able to read the full size of the value stored
Build a client app that randomly produces requests with a random interval between them. Also, wirte a bash script that starts a big number of clients for performance testing purposes.
Refine the implementation of the data structures so as to optimize performance. JNOS suggestion is to put the mutex locks inside the lists, without loosing abstraction.
The hashtable is a vector of lists.
Each bucket should have it's own mutex, so as to maximize the profits from multithreading.
Implement a pool of threads as part of the server core functionality.
If the server crashes, there should be a persistent backup of the data structure. Updating this file with each request is expensive, and so the solution should be to have a copy of the data structure that is updated either manually (from the command line) or automatically from time to time, but also a log of every write action that has been done afterwards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.