Git Product home page Git Product logo

py-http-sqlite's Introduction

py-http-sqlite

python下的多进程(分布式进程)同时读写sqlite的demo(单线程http server版)

原理简介

没啥好解释的,单线程http server天然保证串行访问数据库,不会存在并发问题.
一个请求在未处理完成前,所有的其他的sqlite操作请求(http请求)都被阻塞

特点

1.多进程访问sqlite
2.多个语句可以在一次事务中执行
3.是py-multiprogress-sqlite的优化版,缩短了进程间(server与client)数据交互的时间,将queue,pipe改为http

环境需求

Python2.6+(Python3需要自行改造)

如何运行

1.下载项目源码
2.进入项目源码文件夹
3.执行 python sqlite_server.py 3.执行 python client-demo.py

License

MIT license.

py-http-sqlite's People

Contributors

xm0625 avatar

Watchers

 avatar

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.