Sunday, November 30, 2014

[repost ]Play Framework – Making a java webframework looking less Java

original:http://spinscale.github.io/play-advanced-concepts.html



via WordPress http://blog.newitfarmer.com/scala/play/15429/repost-play-framework-making-a-java-webframework-looking-less-java

Labels:

[repost ]A better example of Play Framework 2.0 with Mybatis For Scala beta

original:http://www.fdmtech.org/2012/03/a-better-example-of-play-framework-2-0-with-mybatis-for-scala-beta/ This is a better example of using mybatis-scala with playframework 2.0 Note: If you are not familiar with play framework 2.0, please read this tutorial first:http://www.playframework.org/documentation/2.0/ScalaTodoList This is a simple CRUD application: Searchable List of Contacts Create new Contact Edit existing Contact Delete existing Contact Screens File layout Mybatis related files app/persistence/PersistenceContext.scala: Mybatis configuration. […]



via WordPress http://blog.newitfarmer.com/scala/play/15427/repost-a-better-example-of-play-framework-2-0-with-mybatis-for-scala-beta

Labels:

[repost ] Play framework:the basics

original:http://www.slideshare.net/PhilipLanger/playframework-34001972 1. Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna, Austria phone: +43 (1) 58801-18804 (secretary), fax: +43 (1) 58801-18896 office@big.tuwien.ac.at, www.big.tuwien.ac.at Play Framework: The Basics Building scalable web applications based on a non-blocking, stateless architecture and the Java Persistence API Philip Langer 2. Outline […]



via WordPress http://blog.newitfarmer.com/scala/play/15424/repost-play-frameworkthe-basics

Labels:

[repost ]Play Framework 2.1: The Bloom is Off The Rose

original:http://www.stupidjavatricks.com/2013/04/play-framework-2-1-the-bloom-is-off-the-rose/ Update: This post has gotten a lot more attention than I expected and I just want to say to those reading: Thanks for stopping by! On a recent project, my team evaluated several web frameworks for an upcoming web application. We chose The Play Framework. I was very attracted to its simplicity and the […]



via WordPress http://blog.newitfarmer.com/scala/play/15422/repost-play-framework-2-1-the-bloom-is-off-the-rose

Labels:

[repost ]Database and JPA in Play Framework

original:http://www.waitingforcode.com/play-framework/database-and-jpa-in-play-framework/read The next step in Play Framework discovery is the work with database data. Thanks to it, we can use centralized and dynamically managed data. At the first part of this article we’ll discover how to configure database connection. This will be also the opportunity to see how to manage dependencies in pom-like files. At […]



via WordPress http://blog.newitfarmer.com/scala/play/15420/repost-database-and-jpa-in-play-framework

Labels:

Friday, November 28, 2014

[repost ]DB2 常用命令小结

original:http://ift.tt/1rD4mc0 1、 打开命令行窗口 #db2cmd 2、 打开控制中心 db2cmd db2cc 3、 打开命令编辑器 db2cmd db2ce =====操作数据库命令===== 4、 启动数据库实例 #db2start 5、 停止数据库实例 #db2stop 如果你不能停止数据库由于激活的连接,在运行db2stop前执行db2 force application all就可以了 /db2stop force 6、 创建数据库 #db2 create db [dbname] 7、 连接到数据库 #db2 connect to [dbname] user [username] using [password] 8、 断开数据库连接 #db2 connect reset 9、 列出所有数据库 #db2 list db directory 10、 列出所有激活的数据库 #db2 […]



via WordPress http://ift.tt/122Fbtl

Labels:

[repost ] git SubprojectSupport

original:http://ift.tt/1vHjA6l Git was originally developed to manage the sources of the Linux kernel, a monolithic code base. It has since developed many features that make it attractive as a general purpose SCM, and is now used by all sorts of projects, some of which are developed in a ‘modular’ style. The rule of thumb for […]



via WordPress http://ift.tt/1rzrzkU

Labels:

[repost ]linux下的DB2命令

original:http://ift.tt/1xQUIoj DB2 数据库命令简介 1 .启动数据库 db2start 2 .停止数据库 db2stop 3 .连接数据库 db2 connect to o_yd user db2 using pwd 4 .读数据库管理程序配置 db2 get dbm cfg 5 .写数据库管理程序配置 db2 update dbm cfg using 参数名 参数值 6 .读数据库的配置 db2 connect to o_yd user db2 using pwd db2 get db cfg for o_yd 7 .写数据库的配置 db2 connect to […]



via WordPress http://ift.tt/1xQUEVF

Labels:

[repost ]DB2 Verifying the TCP/IP setup on the server and client

original:http://ift.tt/1rzrwpc Verifying the TCP/IP setup on the server The steps to confirm the setup on the server are as follows: Verify the existence of the database by issuing one of the following commands: db2 list db directory db2 list db directory show detail If this is a multi-tier environment, you may see the database cataloged […]



via WordPress http://ift.tt/1xQUHR6

Labels:

Wednesday, November 26, 2014

[repost ]Play Framework: async I/O without the thread pool and callback hell

original:http://ift.tt/XHj4zM



via WordPress http://ift.tt/1viVP1w

Labels:

[repost ]Building A Social Music Service Using AWS, Scala, Akka, Play, MongoDB, And Elasticsearch

original:http://ift.tt/1g5f9nV This is a guest repost by Rotem Hermon, former Chief Architect for serendip.me, on the architecture and scaling considerations behind making a startup music service. serendip.me is a social music service that helps people discover great music shared by their friends, and also introduces them to their “music soulmates” – people outside their immediate […]



via WordPress http://ift.tt/1ygIF7i

Labels:

[repost ]Servlet 3.0 实战:异步 Servlet 与 Comet 风格应用程序

original:http://ift.tt/1riEQyd 自 JSR 315 规范(即 Servlet 3.0)的草案公开发布以来,最新一代 Servlet 规范的各种新特性被越来越多的开发人员所关注。规范中提到的一系列高级目标:如可插拔的 Web 框架、便捷开发特性、增强安全性支持等都令人期待。但其中关注程度最高的,毫无疑问是异步 Servlet。本文将详细介绍 Comet 风格应用的实现方式,以及 Servlet 3.0 中的异步处理特性在 Comet 风格程序中的实际应用。 概述 作为 Java EE 6 体系中重要成员的 JSR 315 规范,将 Servlet API 最新的版本从 2.5 提升到了 3.0,这是近 10 年来 Servlet 版本号最大的一次升级,此次升级中引入了若干项令开发人员兴奋的特性,如: 可插拔的 Web 架构(Web framework pluggability)。 通过 Annotations 代替传统 web.xml 配置文件的 EOD 易于开发特性(ease of development)。 Serlvet 异步处理支持。 安全性提升,如 […]



via WordPress http://ift.tt/1riESWX

Labels:

[repost ]WebSphere Liberty To WebSphere eXtreme Scale Setup

original:http://ift.tt/1rtbqYE Add Java to your path and set your JAVA_HOME environment variable appropriately set JAVA_HOME=C:\work\java\ibm-java-sdk-60-win-i386 set PATH=%JAVA_HOME%\bin;%PATH% Download the following free for developers or trial versions of WebSphere software WebSphere Liberty 8.5.5.0 Download link: http://ift.tt/1riESGc Click on the “Download V8.5.5″ image under “WebSphere Application Server Liberty Profile” Click on the “Download” image, review and agree […]



via WordPress http://ift.tt/1rtbpUv

Labels:

Tuesday, November 25, 2014

[repost ]Cognitive computing can take the semantic Web to the next level

original:http://ift.tt/15n1344 As big data analytics pushes deeper into cognitive computing, it needs to bring the semantic Web into the heart of this new age The IT industry is approaching a point where we’ll soon need to distinguish between “cognitive” and “semantic” computing. The terms are blurring into each other. Actually, the distinctions among them have […]



via WordPress http://ift.tt/1vaNYD8

Labels:

[repost ]Cognitive computing

original:http://ift.tt/1vaNX2e Cognitive computing systems learn and interact naturally with people to extend what either humans or machine could do on their own. They help human experts make better decisions by penetrating the complexity of Big Data. Why cognitive systems? Explore why cognitive computing, which combines machine learning and artificial intelligence, is essential in the era […]



via WordPress http://ift.tt/15n10W0

Labels:

[repost ]Cognitive computing

original:http://ift.tt/1pJq0Ok Cognitive computing (CC) makes a new class of problems computable. It addresses complex situations that are characterized by ambiguity and uncertainty; in other words it handles human kinds of problems. In these dynamic, information-rich, and shifting situations, data tends to change frequently, and it is often conflicting. The goals of users evolve as they […]



via WordPress http://ift.tt/1troQUP

Labels:

Thursday, November 20, 2014

[repost ]Building Telephony Systems with OpenSIPS 1.6

original:http://ift.tt/1uWq8w3



via WordPress http://ift.tt/1zGlC4U

Labels:

[repost ]MediaProxy

original:http://ift.tt/1dncedH Description MediaProxy is a media relay for RTP/RTCP and UDP streams that works in tandem with OpenSIPS to provide NAT traversal capability for media streams from SIP user agents located behind NAT. MediaProxy supports ICE negotiation by behaving like a TURN relay candidate and the policy can be controlled from OpenSIPS configuration. MediaProxy relay […]



via WordPress http://ift.tt/1xGf3Se

Labels:

[repost ]MediaProxy Installation Guide

original:http://ift.tt/1xGf3S8 MediaProxy must run natively on the host operating system and not in a virtual environment. You can install MediaProxy in the following ways: From a tar file From a Debian repository From the version control repository 1. From the tar file hosted at AG Projects downloads page The software is available as a tar […]



via WordPress http://ift.tt/1xGf4Wg

Labels:

[repost ]AG Projects – Software Repositories

original:http://ift.tt/1xGf4FN Debian and Ubuntu Linux Install AG Projects software signing key: wget http://ift.tt/1t7OChD sudo apt-key add agp-debian-gpg.key Add the following lines to /etc/apt/sources.list Ubuntu Precise deb http://ift.tt/1t7OChH precise main deb-src http://ift.tt/1t7OChH precise main Ubuntu Quantal deb http://ift.tt/1t7OChH quantal main deb-src http://ift.tt/1t7OChH quantal main Ubuntu Raring deb http://ift.tt/1t7OChH raring main deb-src http://ift.tt/1t7OChH raring main Ubuntu Saucy […]



via WordPress http://ift.tt/1xGf4W5

Labels:

Saturday, November 15, 2014

[repost ]在Kubuntu 12.04中使用二进制包安装mysql-5.5.23历程(4/4)

original:http://ift.tt/1xr8T8o http://ift.tt/1xr8T8o



via WordPress http://ift.tt/1H13Uhz

Labels:

[repost ]How to install Mediaproxy 2.5.2 on CentOS 6 64 bit

original:http://ift.tt/1q3vWnz Mediaproxy 2.5.2 is a Python application from AG-Projects which is available as a free download as well as being available as a commercial product from AG-Projects. It is used in combination with the Mediaproxy module of OpenSIPS. Mediaproxy 2 has several dependencies and can be quite tricky to install. The INSTALL instructions that come […]



via WordPress http://ift.tt/1H13Rm3

Labels:

Wednesday, November 12, 2014

[repost ]opensips安装步骤 for CentOS

original:http://ift.tt/1ubMGZE 参考的文档: http://ift.tt/1wlXeC6 http://ift.tt/1ubMEB9 1.安装依赖的包: yum install gcc make yum install lynx yum install flex bison ncurses libncurses-dev ncurses-devel yum install mysql mysql-server mysql-libs mysql-devel 2.针对64位系统,需要创建软连接 cd /usr/lib mkdir mysql ln -sf /usr/lib64/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so ln -sf /usr/lib64/mysql/libmysqlclient.a /usr/lib/mysql/libmysqlclient.a ln -sf /usr/bin/ld/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so yum install curses yum install perl-* 5.下载并安装: 下载地址:http://ift.tt/1wlXeCe wget http://ift.tt/1wlXeCn tar zxvf opensips-1.11.2_src.tar.gz […]



via WordPress http://ift.tt/1umL2UM

Labels:

[repost ]开源SIP服务器OpenSIPS应用介绍

original:http://ift.tt/14d41HX 1、引入 随着通信IP化的发展,IP传输的高带宽、低成本等优势使得越来越多的企业、电信运营商加快建设基于IP的各种通信应用。在通信协议IP化发展中,SIP协议毫无争议地成为各大电信运营商构建其未来网络的基础协议,越来越多的SIP软件产品也不断出现在行业应用中。SIP协议的标准化,同时也造就了一大批优秀的开源软件产品,包括Asterisk、SipXecs、FreeSWITCH、OpenSIPS等SIP服务端软件,也包括X-lite、LinPhone、eyeBeam等SIP客户端软件。本文介绍了国外成熟的SIPServer开源项目OpenSIPS,并结合其它通信方面的开源项目对其应用情况进行了一些介绍。 2、OpenSIPS介绍 OpenSIPS是一个成熟的开源SIP服务器,除了提供基本的SIP代理及SIP路由功能外,还提供了一些应用级的功能。OpenSIPS的结构非常灵活,其核心路由功能完全通过脚本来实现,可灵活定制各种路由策略,可灵活应用于语音、视频通信、IM以及Presence等多种应用。同时OpenSIPS性能上是目前最快的SIP服务器之一,可用于电信级产品构建。 2.1、功能特点 凭借其可扩展、模块化的系统架构,OpenSIPS提供了一个高度灵活的、用户可配置的路由引擎,可以为voice、video、IM和presence等服务提供强大高效的路由、鉴权、NAT、网关协议转化等功能。由于其稳定高效等特点,OpenSIPS已经被诸多电信运营商应用在自己的网络体系中。其主要功能如下: SIP注册服务器/代理服务器(lcr、dynamic routing、dialplan)/重定向服务器 SIP presence agent SIP B2BUA SIP IM Server SIP to SMS/XMPP网关 SIP to XMPP网关 SIP 负载均衡 SIP NAT traversal 2.2、基本应用配置 OpenSIPS不但提供了丰富的功能,还具有操作简单的特点。所有OpenSIPS的应用功能都可以通过一个配置文件opensips.cfg来实现的。该配置文件主要分为三个部分,第一部分主要是全局变量的设置;第二部分主要是加载模块,并设置模块的相应参数;第三部分主要是路由的策略和功能应用。为了更清晰的呈现opensips.cfg配置文件带来的强大功能,接下来对这三个部分以简单的示例进一步说明。 第一部分全局变量的设置,通过一条语句就能指定用于侦听接收sip消息的端口和传输层协议。 第二部分负责模块的加载和参数配置。以之前的OpenSIPS的负载均衡功能配置为例,需要加载load_balancer模块,并进行配置。 第三部分是sip消息的路由和功能应用。还是以OpenSIPS的负载均衡功能为例。 从以上应用示例可以看到,通过在opensips.cfg中进行简单的配置,就能实现强大的功能。 2.3、系统结构 OpenSIPS的架构开放灵活,其核心功能控制均可通过脚本控制实现,各个功能也通过模块加载的方式来构建。采用lex和yacc工具构建的配置文件分析器是其架构设计中的重要部分之一。通过这个分析器,opensips设计了自己的语法规则,使得我们可以适合SIP规范的语言来进行配置文件中的脚本编写,从而达到简化程序以及方便代码阅读的目的。同时这样的设计也使opensips.cfg配置文件的执行速度达到了C语言的级别。其体系结构大体如下图: 框架的最上层是用于实现sip消息路由逻辑的opensips.cfg脚本配置,在配置文件中,可以使用Core提供的Parameter和Function,也可以使用众多Modules提供的Function。比如在之前的负载均衡示例中,is_method(“INVITE”)就属于textops模块提供的功能,src_ip和src_port都属于Core提供的参数。下层,提供了网络传输、sip消息解析等基本功能。在左侧,通过相应的数据库适配器,可是使用多种数据库存取数据。在这样的体系结构下,我们就可以方便地通过增加功能module来添加我们需要的功能,而不会对原有系统造成影响。 除了以上所述的OpenSIPS的优点,OpenSIPS还提供了一系列的管理维护命令的接口。我们可以通过Core和Module提供的MI管理接口,方便的监控系统以及模块的状态。比如,通过Core的fifo ps命令,可以获取当前进程的状态;通过Core的fifo get_statistics命令,可以获得当前共享内存以及各进程私有内存的使用情况等等。通过MI管理接口,我们还可以方便地在运行时修改部分参数,比如,对于load_balancer模块,我们可以通过fifo lb_reload命令,更新目标组的配置信息,可以通过fifo lb_status命令激活或关闭某个目标,这些命令在实际应用中都非常实用。如果希望通过WEB图形界面管理OpenSIPS,OpenSIPS社区还提供了OpenSIPS Control Panel 4.0产品。 3、与其它开源项目共同搭建VOIP服务 OpenSIPS提供了以上那么多的功能,那OpenSIPS是不是已经实现了PBX的功能了?不是!OpenSIPS并不具备一个媒体服务器(Media Server)的功能。媒体服务器主要提供了类似VoiceMail、呼叫中语音交换、会议服务、视频服务等一系列和语音、视频相关的服务;而OpenSIPS的主要功能主要在于代理、路由和网关。因此,单独的OpenSIPS并不能够提供VOIP服务,只有和Asterisk等具备媒体功能的软件整合,才能构建可靠的语音服务体系。 对于媒体服务器,开源世界也提供了很多选择,如老牌的Asterisk,以及功能全面的sipXecs以及专注于IVR功能的FreeSwitch等,他们都是非常优秀的开源项目。其中Asterisk功能全面、灵活,但主要面向企业应用,在性能上稍差。但Asterisk提供了完善的PBX功能,可以连接多种不同的电话终端,支持多种主流的IP电话协议和系统接口。FreeSwtich专注于IVR功能,性能、可靠性非常高。近期FreeSwitch已被sipXecs采用作为其IVR部分功能。sipXecs则是一个功能比较全面的产品,包括IVR、VoiceMail、人工坐席等等,更难得的是SipXecs提供了良好的配置、管理界面,易于使用。 只要将OpenSIPS作为前置接入,将多个Asterisk、FreeSwitch、sipXecs挂接在其后,由OpenSIPS实现SIP消息的转发和负载均衡,就可以轻松地实现各种语音业务以及规模扩展。如下图所示。 4、小结 从文中介绍可以看出,OpenSIPS是一个成熟的电信级SIP Server平台,可广泛应用于SIP应用的路由分发、负载均衡,可用于搭建SIP代理,提供SIP注册服务等。而且目前OpenSIPS自身也提供SIP Presence以及IM功能。同时,应该注意的是OpenSIPS本身并不提供媒体相关服务,如呼叫中心、VoiceMail等业务,该部分业务可通过FreeSwtich、sipXecs等平台实现。 参考文献: […]



via WordPress http://ift.tt/1xsJmJA

Labels:

[repost ]分布式即时聊天服务器 zkfire

original:http://ift.tt/1wldvr5 zkfire = zookeeper+openfire(3.8.1) Openfire 采用Java开发,开源的实时协作(RTC)服务器基于XMPP(Jabber)协议,您可以使用它轻易的构建高效率的即时通信服务器. 根据对xmpp与openfire的理解,我在openfire中相应的地方植入少量的代码,并把zookeeper包也一并打包到zkfire中。使用zookeeper(http://ift.tt/jYjXOe)管理集群中的节点。 客户登陆集群中的不同服务器进行通信就如登陆同一台服务器一样。 openfire自身也有一套集群的实现,使用了oracle 的coherence的中间件,使用时要自己加入相应的jar包与集群插件。 之所以又自己开发了一套集群实现,一个是给集群提供多一些选择,一个是兴趣^_^,让openfire天然就支持集群 zkfire使用的场景: zkfire中有zookeeper的服务器监听与客户端连接程序,但可以不依赖自身的zookeeper服务,可以在openfire之外另外开启其他zookeeper服务,此时只需指定 cluster.xml配置文件中zClient节点的连接地址即可。 如果只是zookeeper单机服务,那么所有openfire服务器只需要连到同一个zookeeper服务器就可以完成openfire的集群 如果是zookeeper集群,根据zookeeper的集群特点,集群中节点不应该少于3台。如果超过一半的zk节点宕机,那么整个集群境将不能正常的工作。 使用方法: 将zkfire.jar包替换lib下的openfire.jar,之所以命名zkfire.jar只是为了易于区分,名字可以随意取。并将cluster.xml放到bin目录下。 zkfire基于单openfire的实现,所以如果使用的话建议不要开启openfire自身的集群功能。 在安装的openfire目前bin下,放入cluster.xml文件。 示例内容如下: <?xml version=”1.0″ encoding=”UTF-8″?> <jive> <!– 该节点用于openfire服务器之间通讯。IP为本机IP地址,需其他服务器能访问到 –> <notice>10.10.152.180:3004</notice> <!– zoo节点用于配置zkfire的zookeeper服务。如果用其他zk服务器,那么这个节点可以去掉。–> <zoo> <tickTime>2000</tickTime> <initLimit>10</initLimit> <syncLimit>5</syncLimit> <dataDir>E:/zoo/data</dataDir> <clientPort>3181</clientPort> <server name=”server.1″>10.10.152.180:2888:3888</server> <server name=”server.2″>10.10.152.185:2888:3888</server> <server name=”server.3″>10.10.152.189:2888:3888</server> <myid>1</myid> </zoo> <!– 该节点用于连接zk服务器,如果连接zkfire自身的zk服务器,那么该节点可以去掉 –> <zClient>127.0.0.1:3181</zClient> </jive> zoo中的节点server用于配置zookeeper的集群,myid指定本身zookeeper服务器的myid值,server.X 这个数字就是对应myid中的数字,集群中不同zk服务器的myid值不同。 zoo中其他节点的内容皆对应zk配制文件的键值内容。这里不再详述,可以参考 http://ift.tt/1wldvr9 有任何问题请随时email给我donnie4w@gmail.com […]



via WordPress http://ift.tt/1wlccbw

Labels:

[repost ]SIP服务器 OpenSIPS

original:http://ift.tt/1umj2kf OpenSIPS是一个成熟的开源SIP服务器,除了提供基本的SIP代理及SIP路由功能外,还提供了一些应用级的功能。OpenSIPS的结构非常灵活,其核心路由功能完全通过脚本来实现,可灵活定制各种路由策略,可灵活应用于语音、视频通信、IM以及Presence等多种应用。同时OpenSIPS性能上是目前最快的SIP服务器之一,可用于电信级产品构建。 凭借其可扩展、模块化的系统架构,OpenSIPS提供了一个高度灵活的、用户可配置的路由引擎,可以为voice、video、IM和 presence等服务提供强大高效的路由、鉴权、NAT、网关协议转化等功能。由于其稳定高效等特点,OpenSIPS已经被诸多电信运营商应用在自己的网络体系中。其 主要功能如下: SIP注册服务器/代理服务器(lcr、dynamic routing、dialplan)/重定向服务器 SIP presence agent SIP B2BUA SIP IM Server SIP to SMS/XMPP网关 SIP to XMPP网关 SIP 负载均衡 SIP NAT traversal



via WordPress http://ift.tt/1GOHFLR

Labels:

Friday, November 07, 2014

[repost ]Facebook’s Instagram: Making the Switch to Cassandra from Redis, a 75% ‘Insta’ Savings

original:http://ift.tt/1tosIFy Rick Branson Infrastructure Software Engineer at Instagram “Implementing Cassandra cut our costs to the point where we were paying around a quarter of what we were paying before. Not only that, but it also freed us to just throw data at the cluster because it was much more scalable and we could add nodes […]



via WordPress http://ift.tt/1tosIpi

Labels:

Tuesday, November 04, 2014

[repost ]recommendations Model benchmarks

original:http://ift.tt/1rNmAXY A lot of people have asked me what models we use for recommendations at Spotify so I wanted to share some insights. Here’s benchmarks for some models. Note that we don’t use all of them in production. This particular benchmark looks at how well we are able to rank “related artists”. More info about […]



via WordPress http://ift.tt/13DMTut

Labels:

[repost ]Word2vec Tutorial

original:http://ift.tt/1llx0hV I never got round to writing a tutorial on how to use word2vec in gensim. It’s simple enough and the API docs are straightforward, but I know some people prefer more verbose formats. Let this post be a tutorial and a reference example. Preparing the Input Starting from the beginning, gensim’s word2vec expects a […]



via WordPress http://ift.tt/1sdaJCH

Labels: