Pylons + Tokyo Cabinet

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Pylons + Tokyo Cabinet - Presentation Transcript

    1. Pylons + Tokyo Cabinet by Ben Cheng from Oursky.com
    2. About Us • Founder of Oursky Ltd. • Web application development services (Ruby on Rails, Django, Pylons, PHP, Wordpress, etc.); • FONCEPT.com - a T-Shirt design sharing portal; • Working on a SaaS workflow application.
    3. Pylons
    4. What is Pylons? • Flexible, Modular, Extensible • Built on established libraries • Close to 1.0 • Foundation of TurboGears 2.0
    5. Who is using Pylons? • Bittorrent • Reddit (code.reddit.com!) • and hundreds of sites
    6. WSGI • WSGI (Web Server Gateway Interface) • Wrap a “app” inside another “app” • Middleware, e.g.: • Authentication • Beaker (Cache, Session) • Routes
    7. The Stack • Models: SQLAlchemy, CouchDB... • Templates: Mako, Genshi, Jinja2, ... • Helpers: Web Helpers, FormAlchemy, ... • Request Dispatching: Routes, ... • Session / Caching: Beaker, ... • Deployment: Paste, mod_wsgi, Twisted, ...
    8. Take advantage of Python Power • TIOBE: Python is no. 8 • Such as: • Want interactive debugger? iPython • Logging? Chainsaw • Testing? Nose, MiniMock • ..... blah blah balh
    9. Power of other Python Web Framework • Tons of lib from Zope • ToscaWidgets from TurboGears • Authkit • (except Django)
    10. Community • Pylons Book • Quick response (e.g.): • We fired Ticket #620 at Pylons Trac • “init_model called twice in nosetests” • Bug get fixed in 2 weeks, committed to trunk and temp. solution are discussed.
    11. Tokyo Cabinet
    12. Introduction • By mixi.jp (Facebook in Japan) • TokyoCabinet (Engine) • TokyoTyrant (Server) • TokyoDystopia (Full-Text Search) • Opensources, standard C
    13. TokyoCabinet • Key/value DB • Insert: 0.4 sec / 1M records • Search: 0.33 sec / 1M records • hash / B+ Tree structure • Key Value / Hash / B+ Tree / Fixed Length / Table • Driver: Perl, Ruby, Python, PHP, Erlang...
    14. TokyoTyrant • Network server • Binary / Memcache / HTTP protocol • 17.2 sec / 1M queries • Hot Backup, Master-to-Master replication • Extensible by Lua
    15. Lua - Extensions function incr(key, i) i = tonumber(i) local old = tonumber(_get(key)) i = old + i _put(key, i) return i end
    16. Lua - Extension function expire() local args={} local cdata = string.format(“%d”, _time()) table.insert(args, “addcond0x0NUMLE”..cdata) table.insert(args, “out”) local res = _misc(“search”, args) if not res then _log(“expire failed”) end end
    17. Extensible to... • Inverted index • Set operations • (and we use it to do revision management)
    18. LightCloud • Distributed and persistent key-value database • Opensource and used by Plurk • Scale out by just adding nodes • Nodes are replicated Elapsed for 10000 gets: 1.74538516998 seconds [memcache] Elapsed for 10000 gets: 3.57339096069 seconds [lightcloud] Elapsed for 10000 sets: 1.88236999512 seconds [memcache] Elapsed for 10000 sets: 9.23674893379 seconds [lightcloud]
    19. Links • http://www.pylonshq.com • http://opensource.plurk.com/LightCloud/ • http://1978th.net/tokyocabinet/ • Reach me at bencheng@oursky.com
    SlideShare Zeitgeist 2009

    + Ben ChengBen Cheng Nominate

    custom

    1136 views, 2 favs, 3 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1136
      • 1076 on SlideShare
      • 60 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 15
    Most viewed embeds
    • 50 views on http://www.oursky.com
    • 8 views on http://www.python.rk.edu.pl
    • 2 views on http://python.rk.edu.pl

    more

    All embeds
    • 50 views on http://www.oursky.com
    • 8 views on http://www.python.rk.edu.pl
    • 2 views on http://python.rk.edu.pl

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories