#twisted

/

      • RandomNoob
        I have running webserver built with mini framework Bottle.
      • Using SqlAlchemy as ORM to my mariadb.
      • I have few threads which are checking state and triggering some events.
      • I also have a thread where I listen to tcp. Getting data and adding to database.
      • I where using raw socket. Got stack with limits. It was down when few clients where connected at the same time. As I read there is listen around 5 max. Depending on system.
      • No I wrote simple Twisted server. And using it. I will test it tomorrow with real clients. At this moment I am testing it with 2 or 3 clients. Thats not big deal.
      • I also connecting to my server with telnet to see easily what it is echoing back. Rarely it closes connection without echo.
      • My question was deos transport.looseConnection closes conenction not waiting for writing data to client. I already read about that looseConnection will wait until it does not read all received data.
      • theology
        what makes this proxy asynchronous? https://github.com/OffensivePython/PyProxy/blob...
      • RandomNoob
        At this moment I am not using callback errback.
      • In future I will have question about asynchronous moments. How to write data synchronously to database :D First got first written to db.
      • mmattice
        RandomNoob: threads. use the thread pool stuff built into twisted if you can.
      • RandomNoob
        mmattice: I read that oreilly book need more time to read docs and practise. Thanks for your time.
      • mmattice
        oh, ORM... I think if you're using SqlAlchemy - https://github.com/alex/alchimia
      • RandomNoob
        thanks guys.
      • mmattice
        theology: it's using select to do the things, much like twisted would if it used select.
      • RandomNoob
        mmattice: unfortunately "it does not allow you to use the ORM"
      • mmattice
        oh, boo
      • RandomNoob
        mmattice: do we have alternatives to twisted? I just need tcp server which will accept lots of connections and will not freeze or die :D
      • mmattice
        what's "lots of connections"?
      • RandomNoob
        at least 1500 clients connecting via tcp sending byte data
      • in every 2 minutes
      • mmattice
        What're you doing with that data that you need an ORM?
      • ccxQ has quit
      • clokep joined the channel
      • terrycojones joined the channel
      • teratorn
        RandomNoob: transport.write() queues the data to be written as soon as possible. calling transport.loseConnection() will only close the connection after all queued data has been written
      • RandomNoob
        teratorn: Thank you.
      • mmattice: In that thread ORM used only for saving data into db. No problem with sqlalchemy as it has scoped_session and for every dataReceived I am opening session and closing it. As sessions are short lived. There are few posts and comment that sqlalchemy directly cant work with twisted but at this moment I do not have any problems. Lets wait for tomorrow. I will write here my tests results .
      • RandomNoob has left the channel
      • ccxQ joined the channel
      • ccxQ has quit
      • cdunklau joined the channel
      • jamesaxl has quit
      • jamesaxl joined the channel
      • jamesaxl has quit
      • jamesaxl joined the channel
      • mesozoic has quit
      • mesozoic joined the channel
      • Zectbumo has left the channel
      • andenixa has quit
      • debauchery1st joined the channel