Code Monkey home page Code Monkey logo

quad's People

Contributors

amatgil avatar ealtun21 avatar tudbut avatar

quad's Issues

Optimize SafeReadWrite

The code uses a HashMap to store packets that are sent but not yet acknowledged. This might result in high CPU usage when the size of the HashMap becomes large. We could consider using more efficient data structures like a sliding window array or a binary heap.

We are sending and receiving data packet by packet. Instead, we could use techniques like batching (sending and receiving groups of packets) and pipelining (overlap sending, receiving and processing) to increase the throughput of the system.

Pipelining: Pipelining is a strategy where you start processing the next data packet before the current one has been fully processed. This can be especially effective if your application includes time-consuming processing steps.

Batch Processing: Instead of sending or receiving data one packet at a time, you might want to consider batch processing. This is where you send or receive multiple data packets at once. This can reduce the overhead associated with each send or receive operation and can significantly increase throughput.

Selective Repeat: In the case of packet loss, instead of resending all packets (like Go-Back-N), selective repeat only resends packets that are known to have failed. This minimizes the number of retransmissions and enhances throughput.

Parallelization: In case of multicore or distributed systems, you can process multiple packets in parallel, thus improving throughput. Libraries like Rayon in Rust could help here.

Compression: Data compression can be used to reduce the size of the data being sent over the network. This effectively increases the throughput of the network connection because more useful data can be sent in the same amount of time.

Add encryption to the trasnfer of data.

We are currently simply sending packages as raw data. Without any encryption of checksum. We should add these to make sure that our data is not hijacked or corrupted. Also add encryption such that we can also send private information.

Refactor SafeReadWrite

The current state of SafeReadWrite is hard to read. We should refactor it in a way that makes each component modular and also be more idiomatic.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.