GithubHelp home page GithubHelp logo

javassdb's People

Contributors

aliowka avatar grishick avatar ideawu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javassdb's Issues

Error in buildMap() Response.java

public void buildMap(){
for(int i=1; i byte[] k = raw.get(i);
byte[] v = raw.get(i+1);
keys.add(k);
items.put(k, v);
}
}
====> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2

Must be for(int i= 0; i<raw.size(); i+=2){

The java-client won't reconnect after network problems

I had use request method of SSDB as follows: request("set","key","value"),then ,I shut down the network of SSDB Server.And some socket problems occurred,I thought that was not a big problem because I went to restart the network.But it become a big problem because the client won't reconnect,is something wrong while I using it? codes belows:

final SSDB sdb=new SSDB("cent1", 8888);
for(int i=0;i<1000;i++){
new Thread(new Runnable() {
@OverRide
public void run() {
while(true){
try {
String id=UUID.randomUUID().toString();
sdb.request("set",id,id);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}).start();
}

and I also found some exception below:
java.lang.Exception: Parse body_len error
at com.udpwork.ssdb.Link.parse(Link.java:136)
at com.udpwork.ssdb.Link.recv(Link.java:85)
at com.udpwork.ssdb.Link.request(Link.java:71)
at com.udpwork.ssdb.Link.request(Link.java:51)
at com.udpwork.ssdb.SSDB.request(SSDB.java:36)

serious performace problem

Method recv() in Link has serious performace problem.
private MemoryStream input = new MemoryStream();
this is your defination in your class Link.
Then looked up method "request", recv() return a list of <byte[]>. But in recv(), a "while(true)" is always running. Everytime I have read some data from sock.getInputStream(), parse() will be executed. When I need read big data, for example 1000w entries, every parse() execution blocks read and consume a lot of resource. I assume that is a performace problem.

your last commit is error

public void buildMap(){
    for(int i=1; i<raw.size()+1; i+=2){
        byte[] k = raw.get(i);
        byte[] v = raw.get(i+1);
        keys.add(k);
        items.put(k, v);
    }
}

i think you should use i<raw.size() or i<raw.size()-1

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.