Playframework(13)Update Version and pick up the knowledge
1. Pick up the Old Knowledge
Our company is using the old version http://downloads.typesafe.com/releases/play-2.0.4.zip
Just follow the blog and set up all these things.
>play eclipsify
Then can be import to eclipse
>play idea
Import to intellij
deployment
>plan clean compile stage
>target/start
>target/start -DapplyEvolutions.default=true
Or
>play dist
>play -Dconfig.file=path/file dist
>start -Dconfig.url=http://conf.mycompany.cm/conf/prod.conf
>start -Dhttp.port=9998
>start -Dhttp.port=1234 -Dhttp.address=127.0.0.1
Handling Asynchronous Results
def index = Action {
val promiseOfResp = Akka.future {
Ok("")
}
Async {
promiseOfResp.map(resp => resp)
}
}
Thread Pool
https://www.playframework.com/documentation/2.3.1/ThreadPools
http://stackoverflow.com/questions/24579030/play-framework-what-happens-when-requests-exceeds-the-available-threads
https://www.playframework.com/documentation/2.1.0/ThreadPools
https://www.playframework.com/documentation/2.0.4/ScalaAsync
Based on the document, there is default thread pool configured to support multiple thread, but there is thread VS events. So the suggestion is to use events and threads.
Threads is configured based on the cores.
We use Promise to do asynchronous requests to support multiple events.
Threads For Spray
http://spray.io/documentation/1.2.1/spray-can/
http://spray.io/documentation/1.2.1/spray-can/configuration/
http://doc.akka.io/docs/akka/2.1.4/general/configuration.html?_ga=1.238217664.1729015399.1407273046
It seems to be
default-dispatcher {
type = “Dispatcher”
executor = “fork-join-executor”
for-join-executor{
parallelism-min = 8
parallelism-factor = 3.0 #ceil(available processors * factor)
parallelism-max = 64
}
}
2. Latest Play and Typesafe Activator
Download the latest activator
>wget http://downloads.typesafe.com/typesafe-activator/1.2.8/typesafe-activator-1.2.8-minimal.zip
Unzip it and place it in the working directory, add the command to the path.
>activator ui
Here is the source codes
https://github.com/typesafehub/activator
This command will be perfect.
>activator ui -Dhttp.address=0.0.0.0 -Dhttp.port=8888
That can build the project based on the ui. Or we do it in command line.
>activator new easyplay play-scala
>cd easyplay
>activator
Then the same thing, visit this page to go on
http://localhost:9000/
References:
Playframework 1~12
http://sillycat.iteye.com/blog/1743396
http://sillycat.iteye.com/blog/1750340
http://sillycat.iteye.com/blog/1750947
http://sillycat.iteye.com/blog/1751649
http://sillycat.iteye.com/blog/1752183
http://sillycat.iteye.com/blog/1752579
http://sillycat.iteye.com/blog/1753450
http://sillycat.iteye.com/blog/1754139
http://sillycat.iteye.com/blog/1754381
http://sillycat.iteye.com/blog/1756342
http://sillycat.iteye.com/blog/1757098
http://sillycat.iteye.com/blog/1774803
https://www.playframework.com/documentation/2.0.4/IDE
https://www.playframework.com/documentation/2.3.x/NewApplication
- 浏览: 2551584 次
- 性别:
- 来自: 成都
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
相关推荐
### Play Framework Cookbook 知识点解析 #### 一、Play Framework 概览 - **框架简介**:Play Framework 是一个开源的 Web 开发框架,基于 Java 和 Scala 编程语言。它采用轻量级、非阻塞的服务端架构,特别适合...
Play Framework 是一个开源的Web应用框架,主要针对Java和Scala开发者设计,它的核心理念是简化开发流程,提高开发效率,并且特别强调了RESTful架构风格。这个“playframework中文教程.zip”压缩包很可能是为了帮助...
Play Framework框架 Play Framework框架是一种基于Java的软件框架,旨在提高开发效率和提供REST式的架构风格。该框架可以让开发者继续使用他们喜欢的开发环境或繻库,不需要切换到另一种语言、IDE或者其他繻库。 ...
Play Framework 是一个开源的Web应用框架,用于构建现代、高性能的Java和Scala应用程序。它采用模型-视图-控制器(MVC)架构模式,并且强调简洁的代码和开发的即时反馈。Play Framework API 是开发者使用该框架进行...
### Play Framework Cookbook 知识点解析 #### 一、Play Framework 概览 - **定义与背景**:Play Framework 是一款基于 Java 和 Scala 的高性能、轻量级 Web 开发框架。它采用 RESTful 架构设计,支持热重载功能,...
PlayFramework是一个高性能的Java和Scala框架,它支持Web应用的快速开发,并且主要面向RESTful应用程序。在PlayFramework中,为了确保数据的准确性和合法性,通常会在数据保存到数据库之前,对HTTP请求中的参数进行...
playframework javaweb playframework javaweb
Play Framework是一款基于Java和Scala的开源Web应用框架,它遵循模型-视图-控制器(MVC)架构模式,旨在提供高效、简洁且可测试的开发环境。标题中的"v2.7.9"指的是该框架的特定版本,通常每个新版本会包含性能优化...
Mastering Play Framework for Scala
Play Framework 是一个基于Java和Scala的开源Web应用框架,它遵循模型-视图-控制器(MVC)架构模式。在“Playframework框架学习之路 1”中,我们可能要探讨这个框架的基础概念、安装过程以及如何创建一个简单的应用...
Play Framework2是一个强大的Java和Scala应用开发框架,它以其简洁的API、快速的开发周期以及对Web标准的紧密集成而闻名。本教程旨在为初学者和有经验的开发者提供全面的指导,帮助他们掌握Play Framework2的核心...
《Play Framework 2.0 - 创建你的第一个应用程序》 Play Framework 2.0 是一个开源的Web应用框架,它基于Scala和Java语言,遵循“模式-动作”(Action)架构,提供了一种轻量级、敏捷开发的方式。本篇文章将引导你...
《Play Framework框架项目部署详解》 Play Framework是一个强大的、基于Java和Scala的开源Web应用程序框架,它采用模型-视图-控制器(MVC)架构模式,以简洁的API和直观的开发体验受到开发者喜爱。本篇文章将详述...
Play Framework是Java Web开发领域的一款流行开源框架,以其简洁、高效和模块化的特性著称。在标题"playFramework1.2.3"中,我们关注的是Play Framework的1.2.3版本。这个版本是在其早期发展的一个稳定版本,提供了...
Leverage the awesome features of Play Framework to build scalable, resilient, and responsive applications First published: May 2015 274page
1. Play Framework 介绍 2. 创建和发布 Play 应用 2.1 创建 Play 的工程 2.2 Play 常用指令 2.3 Play 应用的 JVM 调优 3. 如何读取静态资源 4. Play框架的配置文件 5. 使用 Play 框架开发 Java 应用 5.1 HTTP...
play2-war-plugin, 用于 Play Framework 2.x的WAR插件 用于 Play Framework 2.x的 WAR插件Current versions: Play 2.2.x : 1.2.1 Play 2.3.0 -> 2.3.1 : 1.3-beta1 (Scala 2.1
Play Framework 是一个基于Java的开源Web应用框架,它遵循MVC(模型-视图-控制器)架构模式,致力于简化Web应用程序的开发过程。这个资料大全包含了许多关于Play Framework的重要资源,帮助开发者深入理解和高效使用...
play framework2.01上半部分。