SlideShare a Scribd company logo
‹#›
‹#›
‹#›
‹#›
‹#›
‹#›
‹#›
‹#›
‹#›
‹#›
6
                                   Worker	
  
                                   Thread

                                   Worker	
  
                                   Thread           Web Container
                                   Worker	
  
                                                    HTTP Engine
                                   Thread

                                   Worker	
  
                                                         VS Select
                                   Thread

            Acceptor	
             Worker	
         NSAPI Engine
            Thread                 Thread
                               4                5
            Acceptor	
             Worker	
         …
            Thread                 Thread

    1   2                  3                7


                                                        KeepAlive	
  
                                                         Thread
                                                        KeepAlive	
  
                                                         Thread
9                                               8




                                                                        ‹#›
                 	
	
                                            	
                    	



       B	
                       B	
  
               Thread-­‐1	
                        Thread-­‐1	
  

       B	
                       B	
  
               Thread-­‐2	
                        Thread-­‐2	
  

       B	
                       B	
  
               Thread-­‐3	
                        Thread-­‐3	
  




                                                                         ‹#›
‹#›
no9fy

no9fy




        ‹#›
Selector selector = Selector.open();!
ServerSocketChannel serverChannel = ServerSocketChannel.open();!
serverChannel.configureBlocking(false);//                   !
serverChannel.socket().bind(new InetSocketAddress(9090));!
serverChannel.register(selector, SelectionKey.OP_ACCEPT);!
while (selector.select() > 0) {!
    for (Iterator it = selector.selectedKeys().iterator();
it.hasNext();) {!
       SelectionKey key = (SelectionKey) it.next();!
       it.remove();!
       if (key.isAcceptable()) {!
           ServerSocketChannel serverChannel =!
               (ServerSocketChannel) key.channel();!
           SocketChannel channel = serverChannel.accept();!
           channel.configureBlocking(false);!
           channel.register(selector, SelectionKey.OP_READ);!

                                                             ‹#›
SocketChannel channel = serverChannel.accept();!



AsynchronousServerSocketChannel server =
AsynchronousServerSocketChannel.open().bind(9900);!
Future<AsynchronousSocketChannel> acceptFuture = server.accept
();!
AsynchronousSocketChannel worker = future.get();!
//AsynchronousSocketChannel worker = future.get(10,
TimeUnit.SECONDS); //                             !




                                                             ‹#›
‹#›
‹#›
GlassFish glassfish = GlassFishRuntime.bootstrap().!
     !     !     !     !     !     !     !newGlassFish();!
glassfish.start();!
!

CommandRunner commandRunner = glassfish.getService
(CommandRunner.class);!
CommandResult commandResult = commandRunner.run("create-http-
listener", "--listenerport=9090", "--listeneraddress=0.0.0.0",
"--defaultvs=server", "my-http-listener");!
!

Deployer deployer = glassfish.getDeployer();!
deployer.deploy(new File(“HelloWorldWeb-GA.war"));!




                                                             ‹#›
public class HelloWorldAdapter extends GrizzlyAdapter {!
    @Override!
    public void service(GrizzlyRequest request, GrizzlyResponse
response) {!
        try {!
             response.getWriter().println("HelloWorld");!
        } catch (IOException ex) {!
             ex.printStackTrace();!
        }}!

<adapters>!
    <adapter context-root="/helloworld" class-
name="co.jp.oracle.http.HelloWorldAdapter"/>!
</adapters>!

> asadmin deploy helloworld.jar


                                                             ‹#›
GrizzlyWebServer gws = new GrizzlyWebServer(8080, "no static
content");!
!
ServletAdapter simpleServletAdapter = new ServletAdapter();!
simpleServletAdapter.setContextPath("/hello");!
simpleServletAdapter.setServletInstance(new MyServlet());!
gws.addGrizzlyAdapter(simpleServletAdapter, new String[]{"/
hello"});!
!
gws.start();!




                                                               ‹#›
‹#›
-Dcom.sun.grizzly.displayConfiguration = true!


Grizzly running on Darwin - 10.8.0 under JDK version: 1.7.0-internal -
Oracle Corporation !
         port: 4848!
         Thread Pool:
com.sun.enterprise.v3.services.impl.monitor.MonitorableThreadPool@7e8e
68bd, port=4848!
         Read Selector: -1!
         ByteBuffer size: 8192 !
         maxHttpHeaderSize: 8192!
         sendBufferSize: 8192!
         maxKeepAliveRequests: 250!
         keepAliveTimeoutInSeconds: 30 !
         Static File Cache enabled: false!
                                                                     ‹#›
         Adapter : com.sun.enterprise.v3.services.impl.ContainerMapper !
         Asynchronous Request Processing enabled: false|#]!
-­‐Dcom.sun.grizzly.enableSnoop=true!



[#|2011-­‐09-­‐01T22:00:39.319+0900|INFO|glassfish3.1.1|
com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=67;_ThreadName=Thread-­‐2;|GRIZZLY0020:	
  
SocketChannel	
  headers	
  java.nio.channels.SocketChannel[connected	
  local=/127.0.0.1:4848	
  remote=/
127.0.0.1:55379]	
  are:	
  	
  
===	
  MimeHeaders	
  ===	
  
host	
  =	
  127.0.0.1:4848	
  
user-­‐agent	
  =	
  Mozilla/5.0	
  (Macintosh;	
  Intel	
  Mac	
  OS	
  X	
  10.6;	
  rv:6.0.1)	
  Gecko/20100101	
  Firefox/6.0.1	
  
accept	
  =	
  text/html,applica9on/xhtml+xml,applica9on/xml;q=0.9,*/*;q=0.8	
  
accept-­‐language	
  =	
  ja,en;q=0.7,en-­‐us;q=0.3	
  
accept-­‐encoding	
  =	
  gzip,	
  deflate	
  
accept-­‐charset	
  =	
  Shil_JIS,un-­‐8;q=0.7,*;q=0.7	
  



                                                                                                                                      ‹#›
-client!
-Xmx512m!


-server !
-Xmx3500m -Xms3500m -Xss128k !
-XX:+AggressiveHeap !
-XX:+DisableExplicitGC!




                                 ‹#›
‹#›

More Related Content

What's hot (19)

Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
som_nangia
 
Sinatra Rack And Middleware
Sinatra Rack And MiddlewareSinatra Rack And Middleware
Sinatra Rack And Middleware
Ben Schwarz
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRuby
Frederic Jean
 
mruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしmruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなし
Hiroshi SHIBATA
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
bobmcwhirter
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
 
Devignition 2011
Devignition 2011Devignition 2011
Devignition 2011
tobiascrawley
 
A tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutesA tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutes
Johan Janssen
 
Tatsumaki
TatsumakiTatsumaki
Tatsumaki
Tatsuhiko Miyagawa
 
TorqueBox for Rubyists
TorqueBox for RubyistsTorqueBox for Rubyists
TorqueBox for Rubyists
bobmcwhirter
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
Hiroshi SHIBATA
 
Beyond Phoenix
Beyond PhoenixBeyond Phoenix
Beyond Phoenix
Gabriele Lana
 
Practical ngx_mruby
Practical ngx_mrubyPractical ngx_mruby
Practical ngx_mruby
Hiroshi SHIBATA
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
ZendCon
 
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
andreaslubbe
 
Presentation of JSConf.eu
Presentation of JSConf.euPresentation of JSConf.eu
Presentation of JSConf.eu
Fredrik Wendt
 
Message queueing
Message queueingMessage queueing
Message queueing
Richard Jones
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
Bram Vogelaar
 
Message Queueing - by an MQ noob
Message Queueing - by an MQ noobMessage Queueing - by an MQ noob
Message Queueing - by an MQ noob
Richard Jones
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
som_nangia
 
Sinatra Rack And Middleware
Sinatra Rack And MiddlewareSinatra Rack And Middleware
Sinatra Rack And Middleware
Ben Schwarz
 
Quick Intro To JRuby
Quick Intro To JRubyQuick Intro To JRuby
Quick Intro To JRuby
Frederic Jean
 
mruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしmruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなし
Hiroshi SHIBATA
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
bobmcwhirter
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
 
A tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutesA tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutes
Johan Janssen
 
TorqueBox for Rubyists
TorqueBox for RubyistsTorqueBox for Rubyists
TorqueBox for Rubyists
bobmcwhirter
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
Hiroshi SHIBATA
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
ZendCon
 
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
Beautiful code instead of callback hell using ES6 Generators, Koa, Bluebird (...
andreaslubbe
 
Presentation of JSConf.eu
Presentation of JSConf.euPresentation of JSConf.eu
Presentation of JSConf.eu
Fredrik Wendt
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
Bram Vogelaar
 
Message Queueing - by an MQ noob
Message Queueing - by an MQ noobMessage Queueing - by an MQ noob
Message Queueing - by an MQ noob
Richard Jones
 

Similar to Grizzly1.9.3x (20)

Sinatra for REST services
Sinatra for REST servicesSinatra for REST services
Sinatra for REST services
Emanuele DelBono
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
Fabio Akita
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tour
q3boy
 
Run Node Run
Run Node RunRun Node Run
Run Node Run
Kevin Swiber
 
Understanding the Rails web model and scalability options
Understanding the Rails web model and scalability optionsUnderstanding the Rails web model and scalability options
Understanding the Rails web model and scalability options
.toster
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
gicappa
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled Cucumbers
Joseph Wilk
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
Nobuo Danjou
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Masahiro Nagano
 
What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & java
Eugene Bogaart
 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
Doug Jones
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
Cosimo Streppone
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
http403
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
tianyi5212222
 
Node js quick tour v2
Node js quick tour v2Node js quick tour v2
Node js quick tour v2
Wyatt Fang
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
Felix Geisendörfer
 
Deployment de Rails
Deployment de RailsDeployment de Rails
Deployment de Rails
elliando dias
 
Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)Nodejs - A quick tour (v6)
Nodejs - A quick tour (v6)
Felix Geisendörfer
 
Rails Performance
Rails PerformanceRails Performance
Rails Performance
Wen-Tien Chang
 
Fisl - Deployment
Fisl - DeploymentFisl - Deployment
Fisl - Deployment
Fabio Akita
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tour
q3boy
 
Understanding the Rails web model and scalability options
Understanding the Rails web model and scalability optionsUnderstanding the Rails web model and scalability options
Understanding the Rails web model and scalability options
.toster
 
Ruby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developerRuby on Rails survival guide of an aged Java developer
Ruby on Rails survival guide of an aged Java developer
gicappa
 
Rocket Fuelled Cucumbers
Rocket Fuelled CucumbersRocket Fuelled Cucumbers
Rocket Fuelled Cucumbers
Joseph Wilk
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
Tom Croucher
 
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
Nobuo Danjou
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Masahiro Nagano
 
What is new and cool j2se & java
What is new and cool j2se & javaWhat is new and cool j2se & java
What is new and cool j2se & java
Eugene Bogaart
 
Node.js - Advanced Basics
Node.js - Advanced BasicsNode.js - Advanced Basics
Node.js - Advanced Basics
Doug Jones
 
VUG5: Varnish at Opera Software
VUG5: Varnish at Opera SoftwareVUG5: Varnish at Opera Software
VUG5: Varnish at Opera Software
Cosimo Streppone
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
http403
 
Node js quick-tour_v2
Node js quick-tour_v2Node js quick-tour_v2
Node js quick-tour_v2
tianyi5212222
 
Node js quick tour v2
Node js quick tour v2Node js quick tour v2
Node js quick tour v2
Wyatt Fang
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
Felix Geisendörfer
 

More from Yoshio Terada (20)

Introduction of Azure Container Apps for Java Developers
Introduction of Azure Container Apps for Java DevelopersIntroduction of Azure Container Apps for Java Developers
Introduction of Azure Container Apps for Java Developers
Yoshio Terada
 
AI-Java-for-Financial.pdf
AI-Java-for-Financial.pdfAI-Java-for-Financial.pdf
AI-Java-for-Financial.pdf
Yoshio Terada
 
Java-Virtual-Thread-LT.pdf
Java-Virtual-Thread-LT.pdfJava-Virtual-Thread-LT.pdf
Java-Virtual-Thread-LT.pdf
Yoshio Terada
 
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイントCloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Yoshio Terada
 
Jakarta EE Microproile Update JJUG 2020 May
Jakarta EE Microproile Update JJUG 2020 MayJakarta EE Microproile Update JJUG 2020 May
Jakarta EE Microproile Update JJUG 2020 May
Yoshio Terada
 
Azure RedHat OpenShift - Red Hat Forum 2019
Azure RedHat OpenShift - Red Hat Forum 2019Azure RedHat OpenShift - Red Hat Forum 2019
Azure RedHat OpenShift - Red Hat Forum 2019
Yoshio Terada
 
JakartaOne 2020 Japan Announce
JakartaOne 2020 Japan AnnounceJakartaOne 2020 Japan Announce
JakartaOne 2020 Japan Announce
Yoshio Terada
 
Jjug CCC 2019 Fall Azure Spring Cloud
Jjug CCC 2019 Fall Azure Spring CloudJjug CCC 2019 Fall Azure Spring Cloud
Jjug CCC 2019 Fall Azure Spring Cloud
Yoshio Terada
 
Sapporo Developer Festa 2019
Sapporo Developer Festa 2019Sapporo Developer Festa 2019
Sapporo Developer Festa 2019
Yoshio Terada
 
AKS (k8s) Hands on Lab Contents
AKS (k8s) Hands on Lab ContentsAKS (k8s) Hands on Lab Contents
AKS (k8s) Hands on Lab Contents
Yoshio Terada
 
Java on Azure 2019
Java on Azure 2019Java on Azure 2019
Java on Azure 2019
Yoshio Terada
 
Java on Azure 2019
Java on Azure 2019Java on Azure 2019
Java on Azure 2019
Yoshio Terada
 
Oisix ra Daichi Microservice with Kubernetes
Oisix ra Daichi Microservice with Kubernetes Oisix ra Daichi Microservice with Kubernetes
Oisix ra Daichi Microservice with Kubernetes
Yoshio Terada
 
Virtual Kubelet and Virtual Node
Virtual Kubelet and Virtual NodeVirtual Kubelet and Virtual Node
Virtual Kubelet and Virtual Node
Yoshio Terada
 
Japan Container Day 2018
Japan Container Day 2018Japan Container Day 2018
Japan Container Day 2018
Yoshio Terada
 
Java on Kubernetes on Azure
Java on Kubernetes on AzureJava on Kubernetes on Azure
Java on Kubernetes on Azure
Yoshio Terada
 
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFestThe Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
Yoshio Terada
 
Application Development Vision
Application Development VisionApplication Development Vision
Application Development Vision
Yoshio Terada
 
How to face the Kubernetes ?
How to face the Kubernetes ? How to face the Kubernetes ?
How to face the Kubernetes ?
Yoshio Terada
 
JavaOne 2016 Report for Java EE
JavaOne 2016 Report for Java EEJavaOne 2016 Report for Java EE
JavaOne 2016 Report for Java EE
Yoshio Terada
 
Introduction of Azure Container Apps for Java Developers
Introduction of Azure Container Apps for Java DevelopersIntroduction of Azure Container Apps for Java Developers
Introduction of Azure Container Apps for Java Developers
Yoshio Terada
 
AI-Java-for-Financial.pdf
AI-Java-for-Financial.pdfAI-Java-for-Financial.pdf
AI-Java-for-Financial.pdf
Yoshio Terada
 
Java-Virtual-Thread-LT.pdf
Java-Virtual-Thread-LT.pdfJava-Virtual-Thread-LT.pdf
Java-Virtual-Thread-LT.pdf
Yoshio Terada
 
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイントCloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Cloud Native Architecture ことはじめ 最適な実行環境を選ぶポイント
Yoshio Terada
 
Jakarta EE Microproile Update JJUG 2020 May
Jakarta EE Microproile Update JJUG 2020 MayJakarta EE Microproile Update JJUG 2020 May
Jakarta EE Microproile Update JJUG 2020 May
Yoshio Terada
 
Azure RedHat OpenShift - Red Hat Forum 2019
Azure RedHat OpenShift - Red Hat Forum 2019Azure RedHat OpenShift - Red Hat Forum 2019
Azure RedHat OpenShift - Red Hat Forum 2019
Yoshio Terada
 
JakartaOne 2020 Japan Announce
JakartaOne 2020 Japan AnnounceJakartaOne 2020 Japan Announce
JakartaOne 2020 Japan Announce
Yoshio Terada
 
Jjug CCC 2019 Fall Azure Spring Cloud
Jjug CCC 2019 Fall Azure Spring CloudJjug CCC 2019 Fall Azure Spring Cloud
Jjug CCC 2019 Fall Azure Spring Cloud
Yoshio Terada
 
Sapporo Developer Festa 2019
Sapporo Developer Festa 2019Sapporo Developer Festa 2019
Sapporo Developer Festa 2019
Yoshio Terada
 
AKS (k8s) Hands on Lab Contents
AKS (k8s) Hands on Lab ContentsAKS (k8s) Hands on Lab Contents
AKS (k8s) Hands on Lab Contents
Yoshio Terada
 
Oisix ra Daichi Microservice with Kubernetes
Oisix ra Daichi Microservice with Kubernetes Oisix ra Daichi Microservice with Kubernetes
Oisix ra Daichi Microservice with Kubernetes
Yoshio Terada
 
Virtual Kubelet and Virtual Node
Virtual Kubelet and Virtual NodeVirtual Kubelet and Virtual Node
Virtual Kubelet and Virtual Node
Yoshio Terada
 
Japan Container Day 2018
Japan Container Day 2018Japan Container Day 2018
Japan Container Day 2018
Yoshio Terada
 
Java on Kubernetes on Azure
Java on Kubernetes on AzureJava on Kubernetes on Azure
Java on Kubernetes on Azure
Yoshio Terada
 
The Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFestThe Experience of Java on Kubernetes with Microservices from HackFest
The Experience of Java on Kubernetes with Microservices from HackFest
Yoshio Terada
 
Application Development Vision
Application Development VisionApplication Development Vision
Application Development Vision
Yoshio Terada
 
How to face the Kubernetes ?
How to face the Kubernetes ? How to face the Kubernetes ?
How to face the Kubernetes ?
Yoshio Terada
 
JavaOne 2016 Report for Java EE
JavaOne 2016 Report for Java EEJavaOne 2016 Report for Java EE
JavaOne 2016 Report for Java EE
Yoshio Terada
 

Recently uploaded (20)

Leadership u automatizaciji: RPA priče iz prakse!
Leadership u automatizaciji: RPA priče iz prakse!Leadership u automatizaciji: RPA priče iz prakse!
Leadership u automatizaciji: RPA priče iz prakse!
UiPathCommunity
 
The Constructor's Digital Transformation Playbook: Reducing Risk With Technology
The Constructor's Digital Transformation Playbook: Reducing Risk With TechnologyThe Constructor's Digital Transformation Playbook: Reducing Risk With Technology
The Constructor's Digital Transformation Playbook: Reducing Risk With Technology
Aggregage
 
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use CasesMastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Sanjay Willie
 
NSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to KnowNSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to Know
Soulmaite
 
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
 
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional RenownedWilliam Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae
 
Temporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptxTemporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptx
Samir Sharma
 
16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
IT Industry
 
TrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy LawsTrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy Laws
TrustArc
 
Deno ...................................
Deno ...................................Deno ...................................
Deno ...................................
Robert MacLean
 
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
BookNet Canada
 
Teaching Prompting and Prompt Sharing to End Users.pptx
Teaching Prompting and Prompt Sharing to End Users.pptxTeaching Prompting and Prompt Sharing to End Users.pptx
Teaching Prompting and Prompt Sharing to End Users.pptx
Michael Blumenthal (Microsoft MVP)
 
10 FinTech Solutions Every Business Should Know!.pdf
10 FinTech Solutions Every Business Should Know!.pdf10 FinTech Solutions Every Business Should Know!.pdf
10 FinTech Solutions Every Business Should Know!.pdf
Yodaplus Technologies Private Limited
 
Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3
Margaret Maynard-Reid
 
What's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and HighlightsWhat's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and Highlights
ThousandEyes
 
UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1
DianaGray10
 
ISOIEC 42001 AI Management System Slides
ISOIEC 42001 AI Management System SlidesISOIEC 42001 AI Management System Slides
ISOIEC 42001 AI Management System Slides
GilangRamadhan884333
 
Caching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at ScaleCaching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at Scale
ScyllaDB
 
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meterWebinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
DanBrown980551
 
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data ProcessingBedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Zilliz
 
Leadership u automatizaciji: RPA priče iz prakse!
Leadership u automatizaciji: RPA priče iz prakse!Leadership u automatizaciji: RPA priče iz prakse!
Leadership u automatizaciji: RPA priče iz prakse!
UiPathCommunity
 
The Constructor's Digital Transformation Playbook: Reducing Risk With Technology
The Constructor's Digital Transformation Playbook: Reducing Risk With TechnologyThe Constructor's Digital Transformation Playbook: Reducing Risk With Technology
The Constructor's Digital Transformation Playbook: Reducing Risk With Technology
Aggregage
 
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use CasesMastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Mastering ChatGPT & LLMs for Practical Applications: Tips, Tricks, and Use Cases
Sanjay Willie
 
NSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to KnowNSFW AI Chatbot Development Costs: What You Need to Know
NSFW AI Chatbot Development Costs: What You Need to Know
Soulmaite
 
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
 
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional RenownedWilliam Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae - A Seasoned Professional Renowned
William Maclyn Murphy McRae
 
Temporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptxTemporary Compound microscope slide .pptx
Temporary Compound microscope slide .pptx
Samir Sharma
 
16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
16 KALALU🕉️🏇🪓🪈🏹👑👑👑👑👑🤴🦁💿✈️🛸🚀🪩🥏🍥 APARAMAHASAHASRA SIMHAMAHANKALKIADIPARASAKTIBH...
IT Industry
 
TrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy LawsTrustArc Webinar: State of State Privacy Laws
TrustArc Webinar: State of State Privacy Laws
TrustArc
 
Deno ...................................
Deno ...................................Deno ...................................
Deno ...................................
Robert MacLean
 
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025Transcript: AI in publishing: Your questions answered - Tech Forum 2025
Transcript: AI in publishing: Your questions answered - Tech Forum 2025
BookNet Canada
 
Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3
Margaret Maynard-Reid
 
What's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and HighlightsWhat's New? ThousandEyes Product Features and Highlights
What's New? ThousandEyes Product Features and Highlights
ThousandEyes
 
UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1UiPath Automation Developer Associate Training Series 2025 - Session 1
UiPath Automation Developer Associate Training Series 2025 - Session 1
DianaGray10
 
ISOIEC 42001 AI Management System Slides
ISOIEC 42001 AI Management System SlidesISOIEC 42001 AI Management System Slides
ISOIEC 42001 AI Management System Slides
GilangRamadhan884333
 
Caching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at ScaleCaching for Performance Masterclass: Caching at Scale
Caching for Performance Masterclass: Caching at Scale
ScyllaDB
 
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meterWebinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
DanBrown980551
 
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data ProcessingBedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Bedrock Data Automation (Preview): Simplifying Unstructured Data Processing
Zilliz
 

Grizzly1.9.3x

  • 11. 6 Worker   Thread Worker   Thread Web Container Worker   HTTP Engine Thread Worker   VS Select Thread Acceptor   Worker   NSAPI Engine Thread Thread 4 5 Acceptor   Worker   … Thread Thread 1 2 3 7 KeepAlive   Thread KeepAlive   Thread 9 8 ‹#›
  • 12.     B   B   Thread-­‐1   Thread-­‐1   B   B   Thread-­‐2   Thread-­‐2   B   B   Thread-­‐3   Thread-­‐3   ‹#›
  • 14. no9fy no9fy ‹#›
  • 15. Selector selector = Selector.open();! ServerSocketChannel serverChannel = ServerSocketChannel.open();! serverChannel.configureBlocking(false);// ! serverChannel.socket().bind(new InetSocketAddress(9090));! serverChannel.register(selector, SelectionKey.OP_ACCEPT);! while (selector.select() > 0) {!     for (Iterator it = selector.selectedKeys().iterator(); it.hasNext();) {!        SelectionKey key = (SelectionKey) it.next();!        it.remove();!        if (key.isAcceptable()) {!            ServerSocketChannel serverChannel =! (ServerSocketChannel) key.channel();! SocketChannel channel = serverChannel.accept();! channel.configureBlocking(false);!            channel.register(selector, SelectionKey.OP_READ);! ‹#›
  • 16. SocketChannel channel = serverChannel.accept();! AsynchronousServerSocketChannel server = AsynchronousServerSocketChannel.open().bind(9900);! Future<AsynchronousSocketChannel> acceptFuture = server.accept ();! AsynchronousSocketChannel worker = future.get();! //AsynchronousSocketChannel worker = future.get(10, TimeUnit.SECONDS); // ! ‹#›
  • 19. GlassFish glassfish = GlassFishRuntime.bootstrap().! ! ! ! ! ! ! !newGlassFish();! glassfish.start();! ! CommandRunner commandRunner = glassfish.getService (CommandRunner.class);! CommandResult commandResult = commandRunner.run("create-http- listener", "--listenerport=9090", "--listeneraddress=0.0.0.0", "--defaultvs=server", "my-http-listener");! ! Deployer deployer = glassfish.getDeployer();! deployer.deploy(new File(“HelloWorldWeb-GA.war"));! ‹#›
  • 20. public class HelloWorldAdapter extends GrizzlyAdapter {! @Override! public void service(GrizzlyRequest request, GrizzlyResponse response) {! try {! response.getWriter().println("HelloWorld");! } catch (IOException ex) {! ex.printStackTrace();! }}! <adapters>! <adapter context-root="/helloworld" class- name="co.jp.oracle.http.HelloWorldAdapter"/>! </adapters>! > asadmin deploy helloworld.jar ‹#›
  • 21. GrizzlyWebServer gws = new GrizzlyWebServer(8080, "no static content");! ! ServletAdapter simpleServletAdapter = new ServletAdapter();! simpleServletAdapter.setContextPath("/hello");! simpleServletAdapter.setServletInstance(new MyServlet());! gws.addGrizzlyAdapter(simpleServletAdapter, new String[]{"/ hello"});! ! gws.start();! ‹#›
  • 23. -Dcom.sun.grizzly.displayConfiguration = true! Grizzly running on Darwin - 10.8.0 under JDK version: 1.7.0-internal - Oracle Corporation ! port: 4848! Thread Pool: com.sun.enterprise.v3.services.impl.monitor.MonitorableThreadPool@7e8e 68bd, port=4848! Read Selector: -1! ByteBuffer size: 8192 ! maxHttpHeaderSize: 8192! sendBufferSize: 8192! maxKeepAliveRequests: 250! keepAliveTimeoutInSeconds: 30 ! Static File Cache enabled: false! ‹#› Adapter : com.sun.enterprise.v3.services.impl.ContainerMapper ! Asynchronous Request Processing enabled: false|#]!
  • 24. -­‐Dcom.sun.grizzly.enableSnoop=true! [#|2011-­‐09-­‐01T22:00:39.319+0900|INFO|glassfish3.1.1| com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=67;_ThreadName=Thread-­‐2;|GRIZZLY0020:   SocketChannel  headers  java.nio.channels.SocketChannel[connected  local=/127.0.0.1:4848  remote=/ 127.0.0.1:55379]  are:     ===  MimeHeaders  ===   host  =  127.0.0.1:4848   user-­‐agent  =  Mozilla/5.0  (Macintosh;  Intel  Mac  OS  X  10.6;  rv:6.0.1)  Gecko/20100101  Firefox/6.0.1   accept  =  text/html,applica9on/xhtml+xml,applica9on/xml;q=0.9,*/*;q=0.8   accept-­‐language  =  ja,en;q=0.7,en-­‐us;q=0.3   accept-­‐encoding  =  gzip,  deflate   accept-­‐charset  =  Shil_JIS,un-­‐8;q=0.7,*;q=0.7   ‹#›
  • 25. -client! -Xmx512m! -server ! -Xmx3500m -Xms3500m -Xss128k ! -XX:+AggressiveHeap ! -XX:+DisableExplicitGC! ‹#›