SlideShare a Scribd company logo
1 of 30
lev
Tokyo Node Gakuen 7
       periods
    2012/09/18
     @kazupon
     (kazu_pon)
         1
Introduction
@kazupon
name: kazuya kawaguchi
twitter: kazu_pon
Job
OKI -> Bluebridge -> Freelance (now)
Flont-end Engneer? Back-end Engneer?
Work
Zenback, and others ...
Node
connect-kyoto
kyotocabinet-node
SabaDB
                      2
What is `lev` ?
Lua for Event-based IO
libuv + LuaJIT




  EventLoop           Lua, JIT Engine

`lev` is platform/language that start
up a server more easily than Node
                  3
Concepts of `lev`
Fast !!
`lev` can easily reach over 10,000 requests per
core , machine and scales near-linearly.

Low Memory !!
At start-up, `lev` only allocates around 2MB
and after benchmarking HTTP a little over 3MB.

Easy C-libraries integration !!
`lev` is based on lua which has a very simple
and compact C ABI.

                     4
Who founded `lev` ?
founder: @kristate
cofounder: @hkanamur

`lev` is everything great about Node,without
the "BS" of JS.
― kristopher tate, lev founder




        @kristate        @hnakamur
                     5
Video message
       from @kristate
http://www.ustream.tv/recorded/25501929
             21:25-25:10


                  6
`lev`
  Fork from luvit, overhaul,
  reimplementation




               $ git diff --shortstat 173c91...master




https://github.com/connectFree/lev/compare/
173c91e383361fb09c1e7f973f6e24bec0d4fcec...master
                                           7
`lev`
connectFree open source
Apache 2.0 license




                 8
Contributors


@hnakamur                @dvv


            @kristate



 @xming                 @kazupon
               9
Community
github
http://github.com/connectFree/lev




IRC
freenode: #levdev, #lev-jp




                     10
Demo
      chat
bit.ly/levchat


      11
Benchmark
Measurement item
 Requests per second
 Memory usage
Measurement Pattern
   ab -n 2000 -c 1
   ab -n 2000 -c 10
   ab -n 2000 -c 100



                12
Benchmark
 Enviroments

                       100BASE-T
                        Ethernet


        Client        direct connect          Server
MacBook Pro Retina, Mid 2012        Macbook, Early 2009
* CPU: 2.6 GHz Intel Core i7        * CPU: 2GHz Intel Core 2 Duo
* RAM: 16GB 1600 MHz DDR3           * RAM: 4GB 667 MHz DDR2 SDRAM
* Disk: 512GB                       * Disk: 256GB
  APPLE SSD SM512E                    FUJITSU MHZ2250BH FFS G1 Media
* OS: Mac OS X 10.8 Mountain        SATA
Lion                                * OS: Mac OS X 10.7.3 Lion

                               13
Benchmark
Version
  Node: 0.8.9
  luvit: 0.5.0
  lev: b03a16d (git commit hash)




                 14
Benchmark
   Results - Requests per second

  ab -n 2000 -c 1




 ab -n 2000 -c 10




ab -n 2000 -c 100


                    0      3750         7500   11250   15000

                    Node   luvit        lev
                                   15
Benchmark
      Results - Memory usage (output of ps)

                startup



  after ab -n 2000 -c 1



 after ab -n 2000 -c 10



after ab -n 2000 -c 100


                          0       5            10   15   20

                          Node   luvit   lev
                                   16
Implementation
We overhauled luvit, and
reimplementation
 cBuffer
 MessagePack
 Build-in multicore
 Redesigned API
 Modules
 Build system
 Platform

                      17
cBuffer
Buffer module
                 lev_slab_allocator_t mem_1k;                lev_slab_allocator_t mem_8k;

                   MemBlock pool[];                              MemBlock pool[];


C                   bytes: 1024                                  bytes: 1024

                                                                                     ... x8

implementation                    lev_slab_allocator_t mem_16k;


Allocated                              MemBlock pool[];
                                        bytes: 1024

special slab                                                 ... x16



allocator        lev_slab_allocator_t mem_64k;               lev_slab_allocator_t mem_1024k;

                   MemBlock pool[];                              MemBlock pool[];

Byte array          bytes: 1024
                                      ... x64
                                                                 bytes: 1024
                                                                                    ... x1024


Seamless                                        MemSlice

conversion to                                    char *slice;
                                                 size_t until;

string                                lev.Buffer

                    18
MessagePack
   lua-msgpack-native                          (*1)



       author: @kengonakajima
       full scratch
       C implementation
       5x ~ 10x faster than mplua                        (*2)


       20x ~ 50x faster than luvit's JSON
   Customization for cBuffer
   build-in module

*1 https://github.com/kengonakajima/lua-msgpack-native
*2 https://github.com/nobu-k/mplua
                                          19
Build-in multicore
Default build-in
Specify number of core at start up
$ lev -c 8 ./examples/http-simple-server.lua


Master-Worker process model
Shared listening socket
Communication: IPC
Messge format: Messagepack
Event notification: callbox
                         20
Redesigned API
Ex: fs
  sync
local fs = require('lev').fs
local err, fd = fs.open('LICENSE.txt', 'r', '0666')
...


  async
local fs = require('lev').fs
fs.open('LICENSE.txt', 'r', '0666', function(err, fd)
  ...
end)




                         21
Modules
lev               timer
fs                pipe
callbox
mpack
json
dns
tcp
udp
http
             22
Build system
Makefile build system base
 Future: cmake build system (by @xming)
Not use GYP build system




                  23
Platform
*NIX
 Linux, Darwin, Freebsd, and other ...




Not support Windows




                    24
Loadmap (Wishlist)
Build-in Web application framework
Build-in Package managment tool
Choice regular expression library
Resolve callback hell
... etc




                 25
Conclusion
`lev` is platform/language that start up
a server more easily than Node
  Fast
  Low memory
  Easy C-libraries integration
Overhauled and redesigned cBuffer base
Support multicore with build-in



                     26
Special Thanks !!
@kristate, @hnakamur
lev community
luvit team and luvit commuity
Mike Pall (LuaJIT)
@kengonakajima (lua-msgpack-native)
libuv, Node conributers, and Joyent




                27
Thank you
for listening to my
       session


         28
Question ?



    29
Reference
luvit
  http://luvit.io/
  https://github.com/creationix/
  nodeconf2012
  http://coderwall.com/p/gkokaw
benchmark data
  git://gist.github.com/3727820.git




                     30

More Related Content

What's hot

Kernelvm 201312-dlmopen
Kernelvm 201312-dlmopenKernelvm 201312-dlmopen
Kernelvm 201312-dlmopenHajime Tazaki
 
OpenStack networking juno l3 h-a, dvr
OpenStack networking   juno l3 h-a, dvrOpenStack networking   juno l3 h-a, dvr
OpenStack networking juno l3 h-a, dvrSim Janghoon
 
CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] IO Visor Project
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Hajime Tazaki
 
6. hands on - open mano demonstration in remote pool of servers
6. hands on - open mano demonstration in remote pool of servers6. hands on - open mano demonstration in remote pool of servers
6. hands on - open mano demonstration in remote pool of serversvideos
 
Docker Networking
Docker NetworkingDocker Networking
Docker NetworkingWeaveworks
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Hajime Tazaki
 
Direct Code Execution @ CoNEXT 2013
Direct Code Execution @ CoNEXT 2013Direct Code Execution @ CoNEXT 2013
Direct Code Execution @ CoNEXT 2013Hajime Tazaki
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Libvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDLibvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDCraig Rodrigues
 
PASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM AbstractionsPASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM Abstractionsmicchie
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Jian-Hong Pan
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionGene Chang
 
Comprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge CasesComprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge CasesNetronome
 

What's hot (20)

Kernelvm 201312-dlmopen
Kernelvm 201312-dlmopenKernelvm 201312-dlmopen
Kernelvm 201312-dlmopen
 
OpenStack networking juno l3 h-a, dvr
OpenStack networking   juno l3 h-a, dvrOpenStack networking   juno l3 h-a, dvr
OpenStack networking juno l3 h-a, dvr
 
CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016] CETH for XDP [Linux Meetup Santa Clara | July 2016]
CETH for XDP [Linux Meetup Santa Clara | July 2016]
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
 
6. hands on - open mano demonstration in remote pool of servers
6. hands on - open mano demonstration in remote pool of servers6. hands on - open mano demonstration in remote pool of servers
6. hands on - open mano demonstration in remote pool of servers
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
Tips of Malloc & Free
Tips of Malloc & FreeTips of Malloc & Free
Tips of Malloc & Free
 
Docker network
Docker networkDocker network
Docker network
 
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
Linux rumpkernel - ABC2018 (AsiaBSDCon 2018)
 
Direct Code Execution @ CoNEXT 2013
Direct Code Execution @ CoNEXT 2013Direct Code Execution @ CoNEXT 2013
Direct Code Execution @ CoNEXT 2013
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Libvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSDLibvirt and bhyve under FreeBSD
Libvirt and bhyve under FreeBSD
 
PASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM AbstractionsPASTE: Network Stacks Must Integrate with NVMM Abstractions
PASTE: Network Stacks Must Integrate with NVMM Abstractions
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
Comprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge CasesComprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge Cases
 

Viewers also liked

「新しい」を生み出すためのWebアプリ開発とその周辺
「新しい」を生み出すためのWebアプリ開発とその周辺「新しい」を生み出すためのWebアプリ開発とその周辺
「新しい」を生み出すためのWebアプリ開発とその周辺Yusuke Wada
 
Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...
Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...
Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...USAID LEV
 
Експорт МСП: від А до Я. Випуск №2
Експорт МСП: від А до Я. Випуск №2Експорт МСП: від А до Я. Випуск №2
Експорт МСП: від А до Я. Випуск №2USAID LEV
 
КАМПАНІЯ З АДВОКАЦІЇ ЯК ІНСТРУМЕНТ ВПЛИВУ НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...
КАМПАНІЯ З АДВОКАЦІЇ  ЯК ІНСТРУМЕНТ ВПЛИВУ  НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...КАМПАНІЯ З АДВОКАЦІЇ  ЯК ІНСТРУМЕНТ ВПЛИВУ  НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...
КАМПАНІЯ З АДВОКАЦІЇ ЯК ІНСТРУМЕНТ ВПЛИВУ НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...USAID LEV
 
Node-v0.12のTLSを256倍使いこなす方法
Node-v0.12のTLSを256倍使いこなす方法Node-v0.12のTLSを256倍使いこなす方法
Node-v0.12のTLSを256倍使いこなす方法shigeki_ohtsu
 
Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )
Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )
Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )mganeko
 
power-assert, mechanism and philosophy
power-assert, mechanism and philosophypower-assert, mechanism and philosophy
power-assert, mechanism and philosophyTakuto Wada
 

Viewers also liked (10)

Node.jsでブラウザメッセンジャー
Node.jsでブラウザメッセンジャーNode.jsでブラウザメッセンジャー
Node.jsでブラウザメッセンジャー
 
「新しい」を生み出すためのWebアプリ開発とその周辺
「新しい」を生み出すためのWebアプリ開発とその周辺「新しい」を生み出すためのWebアプリ開発とその周辺
「新しい」を生み出すためのWebアプリ開発とその周辺
 
Real-time Bus Location System using by node.js
Real-time Bus Location System using by node.jsReal-time Bus Location System using by node.js
Real-time Bus Location System using by node.js
 
NodeFest2014 - Transpiler
NodeFest2014 - TranspilerNodeFest2014 - Transpiler
NodeFest2014 - Transpiler
 
Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...
Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...
Регуляторна політика як інструмент створення сприятливого бізнес клімату для ...
 
Експорт МСП: від А до Я. Випуск №2
Експорт МСП: від А до Я. Випуск №2Експорт МСП: від А до Я. Випуск №2
Експорт МСП: від А до Я. Випуск №2
 
КАМПАНІЯ З АДВОКАЦІЇ ЯК ІНСТРУМЕНТ ВПЛИВУ НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...
КАМПАНІЯ З АДВОКАЦІЇ  ЯК ІНСТРУМЕНТ ВПЛИВУ  НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...КАМПАНІЯ З АДВОКАЦІЇ  ЯК ІНСТРУМЕНТ ВПЛИВУ  НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...
КАМПАНІЯ З АДВОКАЦІЇ ЯК ІНСТРУМЕНТ ВПЛИВУ НА ПОЛІТИКУ ЩОДО МАЛОГО ТА СЕРЕДН...
 
Node-v0.12のTLSを256倍使いこなす方法
Node-v0.12のTLSを256倍使いこなす方法Node-v0.12のTLSを256倍使いこなす方法
Node-v0.12のTLSを256倍使いこなす方法
 
Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )
Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )
Nodeで操るKurentoメディアサーバー ( Kurento + WebRTC + Node.js )
 
power-assert, mechanism and philosophy
power-assert, mechanism and philosophypower-assert, mechanism and philosophy
power-assert, mechanism and philosophy
 

Similar to Lev

Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
Linux kernel bug hunting
Linux kernel bug huntingLinux kernel bug hunting
Linux kernel bug huntingAndrea Righi
 
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014Nat Morris
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookAnne Nicolas
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2William Stewart
 
Scaling the Container Dataplane
Scaling the Container Dataplane Scaling the Container Dataplane
Scaling the Container Dataplane Michelle Holley
 
XT Best Practices
XT Best PracticesXT Best Practices
XT Best PracticesJeff Larkin
 
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKSAzure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKSazuredayit
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guidejasembo
 
"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016Phil Estes
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in descriptionPrzemyslaw Koltermann
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 
Developing MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersDeveloping MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersOnur Alanbel
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Keisuke Takahashi
 
Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012Joe Arnold
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCdterei
 

Similar to Lev (20)

Next Stop, Android
Next Stop, AndroidNext Stop, Android
Next Stop, Android
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
Linux kernel bug hunting
Linux kernel bug huntingLinux kernel bug hunting
Linux kernel bug hunting
 
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014Hardware accelerated switching with Linux @ SWLUG Talks May 2014
Hardware accelerated switching with Linux @ SWLUG Talks May 2014
 
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at FacebookKernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2019 - BPF at Facebook
 
Kubernetes - Starting with 1.2
Kubernetes  - Starting with 1.2Kubernetes  - Starting with 1.2
Kubernetes - Starting with 1.2
 
Scaling the Container Dataplane
Scaling the Container Dataplane Scaling the Container Dataplane
Scaling the Container Dataplane
 
kubernetes for beginners
kubernetes for beginnerskubernetes for beginners
kubernetes for beginners
 
XT Best Practices
XT Best PracticesXT Best Practices
XT Best Practices
 
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKSAzure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
Azure Day Rome Reloaded 2019 - Deconstructing Kubernetes using AKS
 
Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVMBuild Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
 
Linux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guideLinux hpc-cluster-setup-guide
Linux hpc-cluster-setup-guide
 
"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016
 
Check the version with fixes. Link in description
Check the version with fixes. Link in descriptionCheck the version with fixes. Link in description
Check the version with fixes. Link in description
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Developing MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack RoutersDeveloping MIPS Exploits to Hack Routers
Developing MIPS Exploits to Hack Routers
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5Trying and evaluating the new features of GlusterFS 3.5
Trying and evaluating the new features of GlusterFS 3.5
 
Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012Swift Install Workshop - OpenStack Conference Spring 2012
Swift Install Workshop - OpenStack Conference Spring 2012
 
Haskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHCHaskell Symposium 2010: An LLVM backend for GHC
Haskell Symposium 2010: An LLVM backend for GHC
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

Lev

  • 1. lev Tokyo Node Gakuen 7 periods 2012/09/18 @kazupon (kazu_pon) 1
  • 2. Introduction @kazupon name: kazuya kawaguchi twitter: kazu_pon Job OKI -> Bluebridge -> Freelance (now) Flont-end Engneer? Back-end Engneer? Work Zenback, and others ... Node connect-kyoto kyotocabinet-node SabaDB 2
  • 3. What is `lev` ? Lua for Event-based IO libuv + LuaJIT EventLoop Lua, JIT Engine `lev` is platform/language that start up a server more easily than Node 3
  • 4. Concepts of `lev` Fast !! `lev` can easily reach over 10,000 requests per core , machine and scales near-linearly. Low Memory !! At start-up, `lev` only allocates around 2MB and after benchmarking HTTP a little over 3MB. Easy C-libraries integration !! `lev` is based on lua which has a very simple and compact C ABI. 4
  • 5. Who founded `lev` ? founder: @kristate cofounder: @hkanamur `lev` is everything great about Node,without the "BS" of JS. ― kristopher tate, lev founder @kristate @hnakamur 5
  • 6. Video message from @kristate http://www.ustream.tv/recorded/25501929 21:25-25:10 6
  • 7. `lev` Fork from luvit, overhaul, reimplementation $ git diff --shortstat 173c91...master https://github.com/connectFree/lev/compare/ 173c91e383361fb09c1e7f973f6e24bec0d4fcec...master 7
  • 9. Contributors @hnakamur @dvv @kristate @xming @kazupon 9
  • 11. Demo chat bit.ly/levchat 11
  • 12. Benchmark Measurement item Requests per second Memory usage Measurement Pattern ab -n 2000 -c 1 ab -n 2000 -c 10 ab -n 2000 -c 100 12
  • 13. Benchmark Enviroments 100BASE-T Ethernet Client direct connect Server MacBook Pro Retina, Mid 2012 Macbook, Early 2009 * CPU: 2.6 GHz Intel Core i7 * CPU: 2GHz Intel Core 2 Duo * RAM: 16GB 1600 MHz DDR3 * RAM: 4GB 667 MHz DDR2 SDRAM * Disk: 512GB * Disk: 256GB APPLE SSD SM512E FUJITSU MHZ2250BH FFS G1 Media * OS: Mac OS X 10.8 Mountain SATA Lion * OS: Mac OS X 10.7.3 Lion 13
  • 14. Benchmark Version Node: 0.8.9 luvit: 0.5.0 lev: b03a16d (git commit hash) 14
  • 15. Benchmark Results - Requests per second ab -n 2000 -c 1 ab -n 2000 -c 10 ab -n 2000 -c 100 0 3750 7500 11250 15000 Node luvit lev 15
  • 16. Benchmark Results - Memory usage (output of ps) startup after ab -n 2000 -c 1 after ab -n 2000 -c 10 after ab -n 2000 -c 100 0 5 10 15 20 Node luvit lev 16
  • 17. Implementation We overhauled luvit, and reimplementation cBuffer MessagePack Build-in multicore Redesigned API Modules Build system Platform 17
  • 18. cBuffer Buffer module lev_slab_allocator_t mem_1k; lev_slab_allocator_t mem_8k; MemBlock pool[]; MemBlock pool[]; C bytes: 1024 bytes: 1024 ... x8 implementation lev_slab_allocator_t mem_16k; Allocated MemBlock pool[]; bytes: 1024 special slab ... x16 allocator lev_slab_allocator_t mem_64k; lev_slab_allocator_t mem_1024k; MemBlock pool[]; MemBlock pool[]; Byte array bytes: 1024 ... x64 bytes: 1024 ... x1024 Seamless MemSlice conversion to char *slice; size_t until; string lev.Buffer 18
  • 19. MessagePack lua-msgpack-native (*1) author: @kengonakajima full scratch C implementation 5x ~ 10x faster than mplua (*2) 20x ~ 50x faster than luvit's JSON Customization for cBuffer build-in module *1 https://github.com/kengonakajima/lua-msgpack-native *2 https://github.com/nobu-k/mplua 19
  • 20. Build-in multicore Default build-in Specify number of core at start up $ lev -c 8 ./examples/http-simple-server.lua Master-Worker process model Shared listening socket Communication: IPC Messge format: Messagepack Event notification: callbox 20
  • 21. Redesigned API Ex: fs sync local fs = require('lev').fs local err, fd = fs.open('LICENSE.txt', 'r', '0666') ... async local fs = require('lev').fs fs.open('LICENSE.txt', 'r', '0666', function(err, fd) ... end) 21
  • 22. Modules lev timer fs pipe callbox mpack json dns tcp udp http 22
  • 23. Build system Makefile build system base Future: cmake build system (by @xming) Not use GYP build system 23
  • 24. Platform *NIX Linux, Darwin, Freebsd, and other ... Not support Windows 24
  • 25. Loadmap (Wishlist) Build-in Web application framework Build-in Package managment tool Choice regular expression library Resolve callback hell ... etc 25
  • 26. Conclusion `lev` is platform/language that start up a server more easily than Node Fast Low memory Easy C-libraries integration Overhauled and redesigned cBuffer base Support multicore with build-in 26
  • 27. Special Thanks !! @kristate, @hnakamur lev community luvit team and luvit commuity Mike Pall (LuaJIT) @kengonakajima (lua-msgpack-native) libuv, Node conributers, and Joyent 27
  • 28. Thank you for listening to my session 28
  • 30. Reference luvit http://luvit.io/ https://github.com/creationix/ nodeconf2012 http://coderwall.com/p/gkokaw benchmark data git://gist.github.com/3727820.git 30

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n