Giter Club home page Giter Club logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
I added exception handling to bcbookie. If bcbookie can't connect to the gene 
server, no new orders will be generated. Otherwise, bcbookie will continue to 
run normally. Once the gene_server is restarted bcbookie will automatically 
resume full operation.

I've linked gal.py to the global_config.json file. Stderr filename variables 
have been defined in gal.py which can be set in the configuration file.

These changes are available on the code repository.

I'll look into the gene_server crashing after 20-25 instances.



Original comment by [email protected] on 25 Feb 2012 at 11:40

  • Changed state: Accepted

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
I ran the system with 50 clients and didn't have an issue. However, I did 
notice that memory usage gets pretty high. I could see an issue with out of 
memory errors for systems with 6GB or less of available memory.

Original comment by [email protected] on 29 Feb 2012 at 1:38

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
Changed gal.py to launch the gene_server with pypy. The latest versions of pypy 
seem to run much better and will increase performance by an order of magnitude 
over regular CPython. Long term testing will be required to verify memory 
useage over time has improved. 

Added performance capturing function decorators to the gene_server exposed 
methods. This allows user monitoring of the gene server through the enhanced 
user interface (see /tools/nimbs folder for the node server.js), This captures 
execution time but doesn't monitor gene_server response times. This will need 
to be added to server.js. 

Original comment by [email protected] on 28 Dec 2012 at 8:45

  • Changed state: Started

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
I've made the gene_server threaded, which reduced the number of crashes a lot. 
It used to crash with a 'connection closed by peer'.

You can find my commit here, it's based upon the current HEAD in your repo:

https://github.com/timstoop/ga-bitbot/commit/0fe1cf34734750beae0ffd400c8bb80ffee
38a89

Original comment by [email protected] on 24 Feb 2013 at 1:13

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
For the record, I have this code running for almost a day now and I had a lot 
less issues than before. I run most scripts manually in a while loop which 
sends me an email when it restarts. In the 24 hours before I applied the patch, 
I had 166 of those emails, since I applied the patch, I only received 1.

Original comment by [email protected] on 25 Feb 2013 at 9:06

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
http://effbot.org/zone/thread-synchronization.htm

If I need to place thread locks around every global variable access wouldn't I 
give up any benefit an async server would bring?

Original comment by [email protected] on 26 Feb 2013 at 4:58

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
Actually, I hadn't thought about that, but honestly, we don't need to threading 
for actual performance, we only need it to allow multiple clients to connect at 
the same time, which currently causes a 'connection reset by peer' error on the 
client, which terminates the process. The simple xmlrpc server is single 
threaded.

But good point about the locks, I hadn't thought about that. I think the 
easiest would be to import the with_statement and use a lock per request. I'll 
have a go at that this evening.

Original comment by [email protected] on 26 Feb 2013 at 7:43

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
Ok, just had some time to look at it again. What do you think if this solution?

https://github.com/timstoop/ga-bitbot/commit/fdcb2464d08111b26b5640204b9bde9a877
ebf66

Original comment by [email protected] on 28 Feb 2013 at 3:21

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
Looks good :) 

If I understand correctly this will allow asynchronous connections, which will 
prevent client connection time outs while under high load. The trade off is 
that each request will now spawn a new thread and must wait to acquire a lock 
before processing the request.

A lot of the XML-RPC calls have processing time in the sub-millisecond range. I 
wonder if we should go with a thread pool mixin to limit the reduction to the 
overall server throughput caused by constant thread spawning.

See:
http://code.activestate.com/recipes/574454-thread-pool-mixin-class-for-use-with-
socketservert/

Original comment by [email protected] on 1 Mar 2013 at 6:34

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
[deleted comment]

from ga-bitbot.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 24, 2024
We could at that, however, I currently have about 75 clients querying the same 
gene_server and I do not notice any obvious delay. The server only runs the 
server components, though, not any gts, so it's not that busy.

Original comment by [email protected] on 1 Mar 2013 at 10:42

from ga-bitbot.

Related Issues (20)

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.