SlideShare a Scribd company logo
About Clack
    Hatena Co., Ltd.
  Eitarow Fukamachi




                                                      Oct 24, 2012
                       International Lisp Conference @ Kyoto, Japan
About Me
•   Eitarow FUKAMACHI (≒ eight arrow)
•   Live in Kyoto, Japan
•   Common Lisp user since 2010
•   Attended ILC2010 @ Reno
•   (I’m using Clozure CL)


•   Web application developer at Hatena Co., Ltd.
•   Using Perl at work
Products

• Clack          • CL-Markup

• Caveman        • CL-Project

• ningle         • Shelly

• CL-TEST-MORE                             etc.


• CL-DBI


                       See github.com/fukamachi
What’s “Clack”?
What’s Clack?
•   Web application environment
    •   Foundation for Web application framework
•   Equivalent to...
    •   Python’s WSGI, Ruby’s Rack, Perl’s Plack/PSGI and
        Clojure’s Ring
What’s Clack?
•   Web application environment
    •   Foundation for Web application framework
•   Equivalent to...
    •   Python’s WSGI, Ruby’s Rack, Perl’s Plack/PSGI and
        Clojure’s Ring

•   Abstract HTTP into a simple API (Portability)
•   Share code across web frameworks (Reusability)
Clack’s
“Portability”
“Portability”
•   Abstract a web server




                            ※Application includes Web frameworks.
“Portability”
•   Abstract a web server




                            ※Application includes Web frameworks.
“Portability”
(clack:clackup app)
;-> Hunchentoot server is started.
;   Listening on localhost:5000.
;   # #x30200A102B3D
“Portability”
(clack:clackup app)
;-> Hunchentoot server is started.
;   Listening on localhost:5000.
;   # #x30200A102B3D


(clack:clackup app :server :hunchentoot) ;; default
(clack:clackup app :server :fcgi)
(clack:clackup app :server :apache)
Clack’s
“Reusability”
“Reusability”
•   Application takes Request and returns Response
“Reusability”
•   Application takes Request and returns Response
•   Extension mechanism called “Middleware”
•   “Middleware” can be reused
“Show me how to use it!”
Example 1
“Hello,   World!”
Example: Hello, World!

(defun app (env)
  (declare (ignore env))
  '(200
    (:content-type "text/plain")
    ("Hello, World!")))

(clack:clackup #'app)
Example: Hello, World!

(defun app (env)
  (declare (ignore env))
  '(200
  ‘(200
    (:content-type "text/plain")
                   “text/plain”)
    ("Hello, World!")))
    (“Hello, World!”))

(clack:clackup #'app)
Example: Hello, World!

            (defun app (env)
                (declare (ignore env))
                '(200
                ‘(200
(:request-method :GET
 :script-name ""   (:content-type "text/plain")
                                  “text/plain”)
 :path-info "/sns/member"
                   ("Hello, World!")))
                   (“Hello, World!”))
 :query-string "id=3"
:server-name "localhost"
:server-port 5000
           (clack:clackup #'app)
:request-uri "/sns/member?id=3"
:server-protocol :HTTP/1.1
:http-user-agent "Mozilla/5.0 (Macintosh..."
:remote-addr "127.0.0.1"
:remote-port 26077
:http-referer nil
:http-host "localhost:5000"
:http-cookies nil)
Example: Hello, World!
Example 2
“Conditional     flow”
Example: Conditional flow
(defun app (env)
  (cond
    ((string= (getf env :path-info) "/favicon.ico")
     '(200
        (:content-type "image/x-icon")
        #p"/path/to/favicon.ico"))
    ((string= (getf env :path-info) "/")
     '(200
        (:content-type "text/html")
        ("Hello again")))
    (t '(404 (:content-type "text/plain") ("Not found")))))

(clack:clackup #'app)
Example 3
“Basic   Auth”
Example: Basic Auth
(import ‘(clack.builder:builder
          clack.middleware.auth.basic:<clack-middleware-auth-basic>))

(defun app (env)
  (declare (ignore env))
  '(200
    (:content-type "text/plain")
    ("Hello, World!")))

(clack:clackup
  (builder
    (<clack-middleware-auth-basic>
      :authenticator
      (lambda (user pass)
        (and (string= user "johnmccarthy")
             (string= password "password"))))
    #'app))
Example: Basic Auth
Example 4
“Static   files”
Example: Static files
(import ‘(clack.builder:builder
          clack.middleware.static:<clack-middleware-static>))

(defun app (req)
  (declare (ignore req))
  '(200
    (:content-type "text/plain")
    ("Hello, World!")))

(clack:clackup
  (builder
    (<clack-middleware-static>
     :path (lambda (path)
             (when (ppcre:scan "^/(?:images|css|js)/" path)
               (ppcre:regex-replace "^/[^/]+" path "")))
     :root #p"static/")
    #'app))
What are the benefits of using Clack?
Clack allows you to:
•   If you’re a “Web framework developer”...
    •   Clack provides server interfaces.
    •   Reuse code from other web frameworks.
Clack allows you to:
•   If you’re a “Web framework developer”...
    •   Clack provides server interfaces.
    •   Reuse code from other web frameworks.
•   If you’re a “Web application engineer”...
    •   Reuse code in your projects
    •   Extensible
Frameworks
Frameworks


•   Caveman
    •   A Sinatra-like micro framework
•   ningle
    •   A really micro framework
Frameworks


•   Caveman (fukamachi.github.com/caveman/)
    •   A Sinatra-like micro framework
•   ningle (fukamachi.github.com/ningle/)
    •   A really micro framework
Future Work
Future Work
•   More Middlewares
•   More Servers
    •   non-blocking web server?
    •   preforking web server?
Future Work
•   More Middlewares
•   More Servers
    •   non-blocking web server?
    •   preforking web server?
•   More Frameworks
    •   Ruby on Rails?
THE END
Thank you for listening
Maybe we still have time.

    Any questions in easy English?



                    To Japanese speakers:
                    Please translate a question for me if it looks I don't understand it.
                    僕が質問を理解できていなさそうだったら翻訳してください><

More Related Content

What's hot

ksqlDB로 실시간 데이터 변환 및 스트림 처리
ksqlDB로 실시간 데이터 변환 및 스트림 처리ksqlDB로 실시간 데이터 변환 및 스트림 처리
ksqlDB로 실시간 데이터 변환 및 스트림 처리
confluent
 
Sources와 Sinks를 Confluent Cloud에 원활하게 연결
Sources와 Sinks를 Confluent Cloud에 원활하게 연결Sources와 Sinks를 Confluent Cloud에 원활하게 연결
Sources와 Sinks를 Confluent Cloud에 원활하게 연결
confluent
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
OpenStack Korea Community
 
Terraform features(kr)
Terraform features(kr)Terraform features(kr)
Terraform features(kr)
규석 이
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
Jakub Pavlik
 
KSQL: Streaming SQL for Kafka
KSQL: Streaming SQL for KafkaKSQL: Streaming SQL for Kafka
KSQL: Streaming SQL for Kafka
confluent
 
Spy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platformSpy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platform
Redge Technologies
 
Delivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSDelivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWS
NGINX, Inc.
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
Terry Cho
 
NATS Connect Live!
NATS Connect Live!NATS Connect Live!
NATS Connect Live!
NATS
 
A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
Steve Pember
 
Kafka as an Event Store - is it Good Enough?
Kafka as an Event Store - is it Good Enough?Kafka as an Event Store - is it Good Enough?
Kafka as an Event Store - is it Good Enough?
Guido Schmutz
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
Mark Proctor
 
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
Ji-Woong Choi
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntuSim Janghoon
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
SANG WON PARK
 
Confluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CM
Confluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CMConfluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CM
Confluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CM
confluent
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
Brendan Gregg
 
KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!
Guido Schmutz
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
confluent
 

What's hot (20)

ksqlDB로 실시간 데이터 변환 및 스트림 처리
ksqlDB로 실시간 데이터 변환 및 스트림 처리ksqlDB로 실시간 데이터 변환 및 스트림 처리
ksqlDB로 실시간 데이터 변환 및 스트림 처리
 
Sources와 Sinks를 Confluent Cloud에 원활하게 연결
Sources와 Sinks를 Confluent Cloud에 원활하게 연결Sources와 Sinks를 Confluent Cloud에 원활하게 연결
Sources와 Sinks를 Confluent Cloud에 원활하게 연결
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
 
Terraform features(kr)
Terraform features(kr)Terraform features(kr)
Terraform features(kr)
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
 
KSQL: Streaming SQL for Kafka
KSQL: Streaming SQL for KafkaKSQL: Streaming SQL for Kafka
KSQL: Streaming SQL for Kafka
 
Spy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platformSpy hard, challenges of 100G deep packet inspection on x86 platform
Spy hard, challenges of 100G deep packet inspection on x86 platform
 
Delivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSDelivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWS
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
NATS Connect Live!
NATS Connect Live!NATS Connect Live!
NATS Connect Live!
 
A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
 
Kafka as an Event Store - is it Good Enough?
Kafka as an Event Store - is it Good Enough?Kafka as an Event Store - is it Good Enough?
Kafka as an Event Store - is it Good Enough?
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0
 
Kvm performance optimization for ubuntu
Kvm performance optimization for ubuntuKvm performance optimization for ubuntu
Kvm performance optimization for ubuntu
 
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
Apache kafka 모니터링을 위한 Metrics 이해 및 최적화 방안
 
Confluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CM
Confluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CMConfluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CM
Confluent Cloud로 이벤트 기반 마이크로서비스 10배 확장하기 with 29CM
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
 

Viewers also liked

Integral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common LispIntegral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common Lisp
fukamachi
 
Woo: Writing a fast web server
Woo: Writing a fast web serverWoo: Writing a fast web server
Woo: Writing a fast web server
fukamachi
 
Clack: glue for web apps
Clack: glue for web appsClack: glue for web apps
Clack: glue for web apps
fukamachi
 
Clack & Caveman
Clack & CavemanClack & Caveman
Clack & Cavemanfukamachi
 
SBLint
SBLintSBLint
SBLint
fukamachi
 
Mito, a successor of Integral
Mito, a successor of IntegralMito, a successor of Integral
Mito, a successor of Integral
fukamachi
 
Shelly
ShellyShelly
Shelly
fukamachi
 
第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」
fukamachi
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
fukamachi
 
Lispで仕事をするために
Lispで仕事をするためにLispで仕事をするために
Lispで仕事をするために
fukamachi
 
Redesigning Common Lisp
Redesigning Common LispRedesigning Common Lisp
Redesigning Common Lisp
fukamachi
 
Dexador Rises
Dexador RisesDexador Rises
Dexador Rises
fukamachi
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
Vladimir Sedach
 
JavaからClojure、そして夢の世界へ
JavaからClojure、そして夢の世界へJavaからClojure、そして夢の世界へ
JavaからClojure、そして夢の世界へ
fukamachi
 
自分をClojure化する方法
自分をClojure化する方法自分をClojure化する方法
自分をClojure化する方法fukamachi
 
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common LispLisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
masayukitakagi
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界
fukamachi
 
オウンドメディアのコンテンツ事例集40選(サムライト)
オウンドメディアのコンテンツ事例集40選(サムライト)オウンドメディアのコンテンツ事例集40選(サムライト)
オウンドメディアのコンテンツ事例集40選(サムライト)
サムライト株式会社
 

Viewers also liked (20)

Integral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common LispIntegral - New O/R Mapper for Common Lisp
Integral - New O/R Mapper for Common Lisp
 
Woo: Writing a fast web server
Woo: Writing a fast web serverWoo: Writing a fast web server
Woo: Writing a fast web server
 
Clack: glue for web apps
Clack: glue for web appsClack: glue for web apps
Clack: glue for web apps
 
Clack & Caveman
Clack & CavemanClack & Caveman
Clack & Caveman
 
SBLint
SBLintSBLint
SBLint
 
Mito, a successor of Integral
Mito, a successor of IntegralMito, a successor of Integral
Mito, a successor of Integral
 
Lisp Poetry
Lisp PoetryLisp Poetry
Lisp Poetry
 
Shelly
ShellyShelly
Shelly
 
第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」第四回関西Emacs「ari.el」
第四回関西Emacs「ari.el」
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
 
Lispで仕事をするために
Lispで仕事をするためにLispで仕事をするために
Lispで仕事をするために
 
Redesigning Common Lisp
Redesigning Common LispRedesigning Common Lisp
Redesigning Common Lisp
 
Dexador Rises
Dexador RisesDexador Rises
Dexador Rises
 
SALVUS HOUSE lo
SALVUS HOUSE loSALVUS HOUSE lo
SALVUS HOUSE lo
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
 
JavaからClojure、そして夢の世界へ
JavaからClojure、そして夢の世界へJavaからClojure、そして夢の世界へ
JavaからClojure、そして夢の世界へ
 
自分をClojure化する方法
自分をClojure化する方法自分をClojure化する方法
自分をClojure化する方法
 
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common LispLisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
Lisp Meet Up #31, Clake: a GNU make-like build utility in Common Lisp
 
Lisperの見る世界
Lisperの見る世界Lisperの見る世界
Lisperの見る世界
 
オウンドメディアのコンテンツ事例集40選(サムライト)
オウンドメディアのコンテンツ事例集40選(サムライト)オウンドメディアのコンテンツ事例集40選(サムライト)
オウンドメディアのコンテンツ事例集40選(サムライト)
 

Similar to About Clack

Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
Mario-Leander Reimer
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
QAware GmbH
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
Amazon Web Services Japan
 
Node azure
Node azureNode azure
Node azure
Emanuele DelBono
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
Hiroshi SHIBATA
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
Hiroshi SHIBATA
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
orkaplan
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
Daniel Woods
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
Guillaume Laforge
 
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tServerless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Toshiaki Maki
 
XQuery in the Cloud
XQuery in the CloudXQuery in the Cloud
XQuery in the Cloud
William Candillon
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
hawkowl
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
Barney Hanlon
 
Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)
Ran Mizrahi
 
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Ran Mizrahi
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
Workhorse Computing
 

Similar to About Clack (20)

Everything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPLEverything-as-code. A polyglot adventure. #DevoxxPL
Everything-as-code. A polyglot adventure. #DevoxxPL
 
Everything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventureEverything-as-code - A polyglot adventure
Everything-as-code - A polyglot adventure
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
Node azure
Node azureNode azure
Node azure
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 
Advanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutesAdvanced technic for OS upgrading in 3 minutes
Advanced technic for OS upgrading in 3 minutes
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
NullMQ @ PDX
NullMQ @ PDXNullMQ @ PDX
NullMQ @ PDX
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1tServerless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
Serverless with Spring Cloud Function, Knative and riff #SpringOneTour #s1t
 
XQuery in the Cloud
XQuery in the CloudXQuery in the Cloud
XQuery in the Cloud
 
PSGI/Plack OSDC.TW
PSGI/Plack OSDC.TWPSGI/Plack OSDC.TW
PSGI/Plack OSDC.TW
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
 
Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)
 
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

About Clack

  • 1. About Clack Hatena Co., Ltd. Eitarow Fukamachi Oct 24, 2012 International Lisp Conference @ Kyoto, Japan
  • 2. About Me • Eitarow FUKAMACHI (≒ eight arrow) • Live in Kyoto, Japan • Common Lisp user since 2010 • Attended ILC2010 @ Reno • (I’m using Clozure CL) • Web application developer at Hatena Co., Ltd. • Using Perl at work
  • 3. Products • Clack • CL-Markup • Caveman • CL-Project • ningle • Shelly • CL-TEST-MORE etc. • CL-DBI See github.com/fukamachi
  • 5. What’s Clack? • Web application environment • Foundation for Web application framework • Equivalent to... • Python’s WSGI, Ruby’s Rack, Perl’s Plack/PSGI and Clojure’s Ring
  • 6. What’s Clack? • Web application environment • Foundation for Web application framework • Equivalent to... • Python’s WSGI, Ruby’s Rack, Perl’s Plack/PSGI and Clojure’s Ring • Abstract HTTP into a simple API (Portability) • Share code across web frameworks (Reusability)
  • 8. “Portability” • Abstract a web server ※Application includes Web frameworks.
  • 9. “Portability” • Abstract a web server ※Application includes Web frameworks.
  • 10. “Portability” (clack:clackup app) ;-> Hunchentoot server is started. ; Listening on localhost:5000. ; # #x30200A102B3D
  • 11. “Portability” (clack:clackup app) ;-> Hunchentoot server is started. ; Listening on localhost:5000. ; # #x30200A102B3D (clack:clackup app :server :hunchentoot) ;; default (clack:clackup app :server :fcgi) (clack:clackup app :server :apache)
  • 13. “Reusability” • Application takes Request and returns Response
  • 14. “Reusability” • Application takes Request and returns Response • Extension mechanism called “Middleware” • “Middleware” can be reused
  • 15. “Show me how to use it!”
  • 16. Example 1 “Hello, World!”
  • 17. Example: Hello, World! (defun app (env) (declare (ignore env)) '(200 (:content-type "text/plain") ("Hello, World!"))) (clack:clackup #'app)
  • 18. Example: Hello, World! (defun app (env) (declare (ignore env)) '(200 ‘(200 (:content-type "text/plain") “text/plain”) ("Hello, World!"))) (“Hello, World!”)) (clack:clackup #'app)
  • 19. Example: Hello, World! (defun app (env) (declare (ignore env)) '(200 ‘(200 (:request-method :GET :script-name "" (:content-type "text/plain") “text/plain”) :path-info "/sns/member" ("Hello, World!"))) (“Hello, World!”)) :query-string "id=3" :server-name "localhost" :server-port 5000 (clack:clackup #'app) :request-uri "/sns/member?id=3" :server-protocol :HTTP/1.1 :http-user-agent "Mozilla/5.0 (Macintosh..." :remote-addr "127.0.0.1" :remote-port 26077 :http-referer nil :http-host "localhost:5000" :http-cookies nil)
  • 22. Example: Conditional flow (defun app (env) (cond ((string= (getf env :path-info) "/favicon.ico") '(200 (:content-type "image/x-icon") #p"/path/to/favicon.ico")) ((string= (getf env :path-info) "/") '(200 (:content-type "text/html") ("Hello again"))) (t '(404 (:content-type "text/plain") ("Not found"))))) (clack:clackup #'app)
  • 24. Example: Basic Auth (import ‘(clack.builder:builder clack.middleware.auth.basic:<clack-middleware-auth-basic>)) (defun app (env) (declare (ignore env)) '(200 (:content-type "text/plain") ("Hello, World!"))) (clack:clackup (builder (<clack-middleware-auth-basic> :authenticator (lambda (user pass) (and (string= user "johnmccarthy") (string= password "password")))) #'app))
  • 26. Example 4 “Static files”
  • 27. Example: Static files (import ‘(clack.builder:builder clack.middleware.static:<clack-middleware-static>)) (defun app (req) (declare (ignore req)) '(200 (:content-type "text/plain") ("Hello, World!"))) (clack:clackup (builder (<clack-middleware-static> :path (lambda (path) (when (ppcre:scan "^/(?:images|css|js)/" path) (ppcre:regex-replace "^/[^/]+" path ""))) :root #p"static/") #'app))
  • 28. What are the benefits of using Clack?
  • 29. Clack allows you to: • If you’re a “Web framework developer”... • Clack provides server interfaces. • Reuse code from other web frameworks.
  • 30. Clack allows you to: • If you’re a “Web framework developer”... • Clack provides server interfaces. • Reuse code from other web frameworks. • If you’re a “Web application engineer”... • Reuse code in your projects • Extensible
  • 32. Frameworks • Caveman • A Sinatra-like micro framework • ningle • A really micro framework
  • 33. Frameworks • Caveman (fukamachi.github.com/caveman/) • A Sinatra-like micro framework • ningle (fukamachi.github.com/ningle/) • A really micro framework
  • 35. Future Work • More Middlewares • More Servers • non-blocking web server? • preforking web server?
  • 36. Future Work • More Middlewares • More Servers • non-blocking web server? • preforking web server? • More Frameworks • Ruby on Rails?
  • 37. THE END Thank you for listening
  • 38. Maybe we still have time. Any questions in easy English? To Japanese speakers: Please translate a question for me if it looks I don't understand it. 僕が質問を理解できていなさそうだったら翻訳してください><

Editor's Notes

  1. Hello, everyone. My name is Eitarow Fukamachi.\nI&amp;#x2019;m very happy now. Today is my first presentation in English.\nMy English is not good, but I&apos;ll do my best.\n
  2. First of all, I know my name is hard to pronounce for non-Japanese speaker. My name is pronounced like &amp;#x201C;eight arrow&amp;#x201D;. Please call me &amp;#x201C;eight arrow&amp;#x201D; or &amp;#x201C;eight&amp;#x201D;.\nI live in Kyoto. I have been a Common Lisp user since 2010.\nThis is my second attendance of ILC. I attended the previous one at Reno.\nIt was really exciting experience for me. Many people often asked me &amp;#x201C;Which language do you use?&amp;#x201D; Of course, I said &amp;#x201C;I use Common Lisp&amp;#x201D;. Then immediately he said &amp;#x201C;Which one?&amp;#x201D; I got confused. At that time I understood that &amp;#x201C;Lisp&amp;#x201D; is not only one language for us. SBCL and CLISP is slightly different. Many people at there wanted to know which implementation I used.\nI&amp;#x2019;m using Clozure CL for my hobby programming. It is slower than SBCL, but it&amp;#x2019;s compilation speed is reliable.\nI work at a company called Hatena as a web application developer. I love Web, I love Lisp, but I still use Perl at work.\n
  3. Let me introduce some of my Common Lisp products.\nI wrote 11 Common Lisp libraries and all of them are available on Quicklisp.\nMost of them are related to web. Web frameworks, a database interface, a template engine and so on.\nIn this session, I would like to introduce something I made called &amp;#x201C;Clack&amp;#x201D;. If you are a web application enginner or web framework developper, this session would be interesting for you.\n
  4. What&amp;#x2019;s &amp;#x201C;Clack&amp;#x201D;?\n
  5. Clack is a &amp;#x201C;Web application environment&amp;#x201D;. Which means it is a foundation for a Web application or a Web application framework.\nIt makes web applications portable and reusable by abstracting HTTP into a simple API.\nThis is equivalent to Python&amp;#x2019;s WSGI, Ruby&amp;#x2019;s Rack, Perl&amp;#x2019;s Plack/PSGI and Clojure&amp;#x2019;s Ring. These middlewares has become imperative in Web anymore.\n
  6. Clack is built with two ideas in mind -- &amp;#x201C;Portability&amp;#x201D; and &amp;#x201C;Reusability&amp;#x201D;.\n
  7. First, I&amp;#x2019;d like to talk about Clack&amp;#x2019;s portability.\n
  8. Some years ago, web application and web application frameworks need to have web server adapters for each web server.\nThis figure is really complicated and ugly.\nClack changes this to...\n
  9. ...this. It&amp;#x2019;s pretty simple. Each application has only to know the interface of Clack.\nClack aims to make a web application work on many web servers without changing any code. Web application based on Clack don&amp;#x2019;t need to know what web server is behind it.\nThis allows running an application on different backend for different environments. It is possible to run an application on Hunchentoot during development, and then use a faster backend like FastCGI for your production environment.\n
  10. Here is some sample code.\n&amp;#x201C;clackup&amp;#x201D; is a function to start a Clack server.\nClack uses Hunchentoot as it&amp;#x2019;s backend by default.\n
  11. It can be changed by passing the :server keyword.\nIf you pass &amp;#x201C;:fcgi&amp;#x201D; to it, FastCGI server will be started.\nIf you pass &amp;#x201C;:apache&amp;#x201D; to it, Apache2 + mod_lisp proxy server will be started as well.\n\nNow, as a result of this abstraction, we obtain another possibility.\n
  12. It is &amp;#x201C;Reusability&amp;#x201D;\n
  13. In Clack, an application takes a request and just returns a response. Since it&amp;#x2019;s simple, it is easy to extend.\n
  14. Clack has an extension mechanism called &amp;#x201C;Middleware&amp;#x201D;.\nMiddlewares surround Applications. It takes a request before Application takes it and gets the Response which Application generates. By wrapping an Application, Middleware allows you to change the Application&amp;#x2019;s behavior without rewriting the existing code.\nAs Middlewares are completely separated from Application, they can be reused other Applications.\n
  15. Now, I&amp;#x2019;ll show you 4 examples of Clack in use.\n
  16. First, &amp;#x201C;Hello, World&amp;#x201D; -- it&amp;#x2019;s the most famous example.\n
  17. This is a program to display a string &amp;#x201C;Hello, World!&amp;#x201D; in your browser.\n&amp;#x201C;App&amp;#x201D; is a simple web application.\nIt is just a function which takes exactly one argument &amp;#x201C;env&amp;#x201D; and returns a list containing exactly three values -- HTTP status, headers and body.\n
  18. Highlighted strings are the request and the response.\n
  19. &amp;#x201C;Env&amp;#x201D; is something like this. It is just a property-list.\nSome people may wonder why the request isn&amp;#x2019;t a CLOS object.\nThis is because it&amp;#x2019;s quite simpler. A property-list is easy to understand how to deal with it.\nIt doesn&amp;#x2019;t require any dependencies.\nThis simple interface allows you to extend applications easily.\nI&amp;#x2019;ll show you the example a little later.\n
  20. After &amp;#x201C;clackup&amp;#x201D;, &amp;#x201C;Hello, World!&amp;#x201D; would be displayed in your browser.\n
  21. The second example of Clack has a conditional flow in an app.\n
  22. This sample code shows different content for what the request path is.\nThis app would serve favicon.ico if the request path is &quot;/favicon.ico&quot;, &quot;Hello again&quot; for the request to the root (/) and otherwise 404.\nThis is a simple URL dispatcher.\n
  23. My next example of Clack uses Basic Authentication.\n
  24. Here is some sample code. The &amp;#x201C;app&amp;#x201D; is the same as the first one.\nA macro &amp;#x201C;builder&amp;#x201D; builds the app and middlewares into an app.\n&amp;#x201C;&lt;clack-middleware-auth-basic&gt;&amp;#x201D; is a Clack middleware. It adds Basic Authentication to an app without rewriting the app. This authenticator means only the user Dr. &amp;#x201C;John McCarthy&amp;#x201D; is allowed.\n
  25. This code will show you a page like this.\nI hope the internet is also available in heaven.\n
  26. My final example of Clack is more practical.\n
  27. This will serve static files when the pathname starts with &amp;#x201C;/images/&amp;#x201D;, &amp;#x201C;/css/&amp;#x201D; or &amp;#x201C;/js/&amp;#x201D;.\nIt emits the directory names and searchs a file to serve from &amp;#x201C;static&amp;#x201D; directory.\n
  28. Now I will tell you about the benefits of using Clack.\n
  29. Your usage of Clack depends on who you are.\nIf you&amp;#x2019;re a &amp;#x201C;Web framework developer&amp;#x201D;, Clack provides server interfaces. You don&amp;#x2019;t have to write adapters for each web server. Moreover, Middlewares will be help to build up your framework.\n
  30. If you&amp;#x2019;re a &amp;#x201C;Web application engineer&amp;#x201D;, you can get benefits to use web frameworks built on Clack.\nThe benefit of a framework built on Clack is that the design is loosely coupled. Some parts of it are made as Clack Middlewares, which means developers can remove or replace parts of a framework as necessary.\n
  31. I introduce you 2 frameworks built on Clack.\n
  32. Caveman is a Sinatra-like micro framework.\nIt has the minimum set of features required for web applications -- a URL-based dispatcher, an adapter to a template engine, and a database interface.\nningle is even smaller. It provides only a URL-based dispatcher.\n
  33. See these URLs for more detail.\nBoth of them are already available on Quicklisp.\n
  34. \n
  35. \n
  36. Finally, I would like to talk about Clack&amp;#x2019;s future.\n
  37. I have almost completed Clack&amp;#x2019;s core, but I need to improve it a little more.\nI have to increase the bundled middleware and web server adapters.\nI&amp;#x2019;m looking for a high-performance non-blocking web server and a preforking web server.\nIf you know something about it, please let me know that after this.\n
  38. And now, there are only 2 frameworks, and I hope more frameworks will be built on Clack.\nBoth of them are really small. So I think a full-stack framework such as Ruby on Rails for Common Lisp should exist.\n
  39. \n
  40. Are there any questions in &amp;#x201C;easy&amp;#x201D; English?\n