social enterprise java apps on heroku webinar

Post on 22-May-2015

2.420 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

DESCRIPTION

8月3日に開催された「Social Enterprise Java Apps on Heroku Webinar」の資料です。

TRANSCRIPT

Social  Enterprise  Java  Apps  on  Heroku

Kazuyuki  Kawamura  Technical  Solu-on  Architect  

Tetsuo  Ajima  Technical  Solu-on  Architect  

Ayumu  Aizawa  Heroku  Evangelist  

h=p://www.developerforce.com/jp/events/webinars/2012-­‐08-­‐03/registraKon.php

Safe  harbor  statement  under  the  Private  Securi-es  Li-ga-on  Reform  Act  of  1995.  This  presenta-on  may  contain  forward-­‐looking  statements  that  involve  risks,  uncertain-es,  and  assump-ons.  If  any  such  uncertain-es  materialize  or  if  any  of  the  assump-ons  proves  incorrect,  the  results  of  salesforce.com,  inc.  could  differ  materially  from  the  results  expressed  or  implied  by  the  forward  looking-­‐statements  we  make.  All  statements  other  than  statements  of  historical  fact  could  be  deemed  forward-­‐looking,  including  any  projec-ons  of  product  or  service  availability,  subscriber  growth,  earnings,  revenues,  or  other  financial  items  and  any  statements  regarding  strategies  or  plans  of  management  for  future  opera-ons,  statements  of  belief,  any  statements  concerning  new,  planned,  or  upgraded  services  or  technology  developments  and  customer  contracts  or  use  of  our  services.  The  risks  and  uncertain-es  referred  to  above  include  -­‐  but  are  not  limited  to  -­‐  risks  associated  with  developing  and  delivering  new  func-onality  for  our  service,  new  products  and  services,  our  new  business  model,  our  past  opera-ng  losses,  possible  fluctua-ons  in  our  opera-ng  results  and  rate  of  growth,  interrup-ons  or  delays  in  our  Web  hos-ng,  breach  of  our  security  measures,  the  outcome  of  intellectual  property  and  other  li-ga-on,  risks  associated  with  possible  mergers  and  acquisi-ons,  the  immature  market  in  which  we  operate,  our  rela-vely  limited  opera-ng  history,  our  ability  to  expand,  retain,  and  mo-vate  our  employees  and  manage  our  growth,  new  releases  of  our  service  and  successful  customer  deployment,  our  limited  history  reselling  non-­‐salesforce.com  products,  and  u-liza-on  and  selling  to  larger  enterprise  customers.  Further  informa-on  on  poten-al  factors  that  could  affect  the  financial  results  of  salesforce.com,  inc.  is  included  in  our  annual  report  on  Form  10-­‐Q  for  the  most  recent  fiscal  quarter  ended.  This  documents  and  others  containing  important  disclosures  are  available  on  the  SEC  Filings  sec-on  of  the  Investor  Informa-on  sec-on  of  our  Web  site.  Any  unreleased  services  or  features  referenced  in  this  or  other  presenta-ons,  press  releases  or  public  statements  are  not  currently  available  and  may  not  be  delivered  on  -me  or  at  all.  Customers  who  purchase  our  services  should  make  the  purchase  decisions  based  upon  features  that  are  currently  available.  Salesforce.com,  inc.  assumes  no  obliga-on  and  does  not  intend  to  update  these  forward-­‐looking  statements.  

Safe  Harbor  Statement  

@herokujp  @developerforcej  

facebook.com/HerokuJP  facebook.com/DeveloperforceJapan  

§ 導入事例

§ 価格

§ サポート

§ 技術資料

§ 日本での情報

success.heroku.com  

price.heroku.com  

help.heroku.com  

devcenter.heroku.com  

facebook.com/herokujp  

twi=er.com/herokujp  

#herokujp  

Kazuyuki  Kawamura  Technical  Solu-on  Architect  @kazkawamura  /facebook.com/kaz.kawamura    

Tetsuo  Ajima  Technical  Solu-on  Architect  @liebejudith  facebook.com/tetsuo.ajima    

Ayumu  Aizawa  Developper  Marke-ng,  Heroku  @ayumin  /facebook.com/ayumu.aizawa  

アジェンダ

• “ソーシャル・エンタープライズアプリケーション”とは  

• Herokuの紹介  

• Java  on  Heroku  ハンズオン  

• ソーシャル・エンタープライズアプリケーションの構築  

• Q&A  

アジェンダ

• “ソーシャル・エンタープライズアプリケーション”とは  

• Herokuの紹介  

• Java  on  Heroku  ハンズオン  

• ソーシャル・エンタープライズアプリケーションの構築  

• Q&A  

従業員 ソーシャル

ネットワーク

顧客の ソーシャル ネットワーク ソーシャル

プロファイル コラボレーション

人材

販売

サービス サポート

マーケティング

拡張

 ソーシャルエンタープライズ

従業員 ソーシャル

ネットワーク

顧客の ソーシャル ネットワーク ソーシャル

プロファイル コラボレーション

人材

販売

サービス サポート

マーケティング

拡張

 ソーシャルエンタープライズ

 ソーシャルマーケティング

Today  関連的でアクティブな

エンゲージメント

Yesterday  静的、受動的な マーケティング

 マーケティングにおけるソーシャルの重要性は高まっている

ソーシャルエンタープライズ・アプリケーションをつくるには、

どのような部品が必要でしょうか?

 エンタープライズアプリケーション

堅牢な基盤

耐障害性

運用性

高可用性

フェールオーバー クラスタリング

負荷分散 SSLドメイン

データベース ロールバック

冗長化

WEBサーバ アプリケーションサーバ

DBサーバ 他

稼動監視 ログ解析

サーバ管理者 ネットワーク管理者

システム管理者 サーバ管理者 DBA

システム管理者 DBA

オペレーター 製品サポート

アジェンダ

• “ソーシャル・エンタープライズアプリケーション”とは  

• Herokuの紹介  

• Java  on  Heroku  ハンズオン  

• ソーシャル・エンタープライズアプリケーションの構築  

• Q&A  

$  heroku  ps  $  heroku  create   worker:  java  -­‐jar  ..   $  heroku  logs  -­‐-­‐tail  

 Herokuの特徴

Trust  &  Manage  Forget  Servers   Run    Anything   See  Everything  

 Herokuのアーキテクチャ

Elas-c  Load  Balancing  

Control  Surface  

APIs  

Developer    Code  • Java  • …    Deploy  • GIT  

Manage  • Heroku  CLI  • Scaling  • Monitoring  

User  •  Web  browser  Acces  •  API  access  

h`p(s)  

REST  

 ソーシャル・エンタープライズアプリケーションのアーキテクチャ

Data API

Access Management

Profiles Identity Record-Level Filtering Permissions

Data

Metadata Business Data Files

Metadata API

Addons Polyglot & Open

Process Model

Real time Visibiility

Social API

アジェンダ

• “ソーシャル・エンタープライズアプリケーション”とは  

• Herokuの紹介  

• Java  on  Heroku  ハンズオン  

• ソーシャル・エンタープライズアプリケーションの構築  

• Q&A  

Spring MVC アプリケーショ

ン を Heroku にデプロイしてみ

ましょう ( http://java.heroku.com )

デモ /  ハンズオン (1)  

JAVA.HEROKU.COM  を利用した  テンプレートアプリケーションのデプロイ  

のデモ  

アジェンダ

• “ソーシャル・エンタープライズアプリケーション”とは  

• Herokuの紹介  

• Java  on  Heroku  ハンズオン  

• ソーシャル・エンタープライズアプリケーションの構築  

• Q&A  

デモ /  ハンズオン (2)  

$  git  push  heroku  master  

*.java  

*.jar  WAR  

Embe

dded

 Con

tainer

pom.xml  

アプリケーションのコード、依存関係、コンテナの情報を記

$  git  add  -­‐A  

ビルド、依存関係の解決などDynoへのデプロイ、起動

SALESFORCE.COMとの連携デモ  

Heroku と Salesforce.com をつかって、ソーシャル・エンタープライズアプリケーションをつく

りましょう

Salesforce.com との統合ステップ

1.  OAuth認証の設定

2.  依存関係の更新

3.  エンティティをJSONに切り替える

4.  DAOをForce REST APIに切り替える

5.  Spring Config を Force REST + OAuth に切り替える

6.  認証のためのServlet Filterを追加する

7.  認証キーを環境情報に設定する

Spring MVC App with Heroku & Salesforce.com

and Chatter APIs

ソーシャルフィードリコメンド

リアルタイムプッシュ通知

ストリーミングデータ配信

分析

ソーシャルエンタープライズアプリケーション

例えば、こんなことができます

アジェンダ

• “ソーシャル・エンタープライズアプリケーション”とは  

• Herokuの紹介  

• Java  on  Heroku  ハンズオン  

• ソーシャル・エンタープライズアプリケーションの構築  

• Q&A  

ご質問をどうぞ

@herokujp  @developerforcej  

facebook.com/HerokuJP  facebook.com/DeveloperforceJapan  

is GA

Java

Heroku Labs •  WAR deployment (http://bit.ly/war-deploy )

•  Jenkins plugin for Heroku(http://bit.ly/heroku-ci )

•  Heroku.jar- Java Wrapper (http://bit.ly/heroku-jar ) •  Atlassian Bamboo plugin for Heroku (Email

anand@heroku.com for more details)

you can try these out now.

We would love your feedback

= like  +

Coming Soon

Coming Soon

All day HEROKU ENTERPRISE DEVELOPER

WORKSHOP

Email anand@heroku.com if you are interested

Resources Ø  Getting Started -

§  http://java.heroku.com

§  http://bit.ly/heroku-java

Ø  Toolbelt (http://toolbelt.herokuapp.com )

Ø  Heroku Dev Center : http://devcenter.heroku.com

Ø  Heroku Add-ons: http://addons.heroku.com

Ø  Git: http://help.github.com/

Ø  Webinar Source code:

§  Spring MVC - Force.com : http://bit.ly/KZB68y

§  Chatter - http://bit.ly/KgMlPP

§  Pusher integration - http://bit.ly/KMVInx

James  Ward  @_JamesWard  Developer  Evangelist  at  Heroku  

jw@heroku.com  

Anand  Narasimhan  @anand_bn  Sr.  Product  Manager  at  Heroku  

anand@heroku.com    

Survey:  http://bit.ly/herokujavasurvey

Heroku  Devcenter:  http://devcenter.heroku.com  

APPENDIX SFDC Integration Steps

1. Setup OAuth i.  Salesforce.com > Setup > Develop > Remote

Access

ii.  Add Remote Access for Dev & Prod

•  Dev Callback URL: http://localhost:8080/_auth  

•  Prod Callback URL: https://some-­‐app-­‐1234.herokuapp.com/_auth    

2. Update dependencies <repositories>      <repository>          <id>force-­‐rest-­‐api</id>          <name>force-­‐rest-­‐api  repository  on  GitHub</name>          <url>          http://jesperfj.github.com/force-­‐rest-­‐api/repository/          </url>      </repository>  </repositories>  

2. Update dependencies <dependency>          <groupId>com.force.api</groupId>          <artifactId>force-­‐rest-­‐api</artifactId>          <version>0.0.15</version>  </dependency>  <dependency>          <groupId>com.force.sdk</groupId>          <artifactId>force-­‐oauth</artifactId>          <version>22.0.8-­‐BETA</version>  </dependency>  <dependency>          <groupId>com.force.sdk</groupId>          <artifactId>force-­‐springsecurity</artifactId>          <version>22.0.8-­‐BETA</version>  </dependency>  

3. Switch Entity to JSON @JsonIgnoreProperties(ignoreUnknown=true)  public  class  Person  {            @JsonProperty(value="Id")          private  String  id;            @JsonProperty(value="FirstName")          private  String  firstName;            @JsonProperty(value="LastName")          private  String  lastName;  

4. Switch DAO to Force REST API private  ForceApi  getForceApi()  {          SecurityContext  sc  =  ForceSecurityContextHolder.get();          ApiSession  s  =  new  ApiSession();          s.setAccessToken(sc.getSessionId());          s.setApiEndpoint(sc.getEndPointHost());          return  new  ForceApi(s);  }    //  Add  Contact          getForceApi().createSObject("contact",  person);    //  Query  Contacts  getForceApi().query("SELECT  Id  FROM  contact",  Person.class);    //  Delete  Contact  getForceApi().deleteSObject("contact",  id);  

5. Spring Config + OAuth <fss:oauth>      <fss:oauthInfo  endpoint="http://login.salesforce.com"          oauth-­‐key="#{systemEnvironment['OAUTH_CLIENT_KEY']}"          oauth-­‐secret="#{systemEnvironment['OAUTH_CLIENT_SECRET']}"/>  </fss:oauth>            <security:http  use-­‐expressions="true">      <security:intercept-­‐url  pattern="/people/*"          access="isAuthenticated()"  />  </security:http>      <!-­‐-­‐  https  redirect  support  -­‐-­‐>  <property  name="redirectHttp10Compatible"  value="false"  />  

6. Add Servlet Filter for Oauth <filter>      <filter-­‐name>springSecurityFilterChain</filter-­‐name>      <filter-­‐class>          org.springframework.web.filter.DelegatingFilterProxy      </filter-­‐class>      <init-­‐param>          <param-­‐name>contextAttribute</param-­‐name>          <param-­‐value>        org.springframework.web.servlet.FrameworkServlet.CONTEXT.spring          </param-­‐value>      </init-­‐param>  </filter>  <filter-­‐mapping>      <filter-­‐name>springSecurityFilterChain</filter-­‐name>      <url-­‐pattern>/*</url-­‐pattern>  </filter-­‐mapping>  

7. Add Oauth Keys export  OAUTH_CLIENT_KEY=CQ3gmEE53MVG99OxTyEMal8ytj1E3NF7...  export  OAUTH_CLIENT_SECRET=0905539091246761180  

heroku  config:add  OAUTH_CLIENT_KEY=CQ3gmEE53MVG99OxTyEMal8yt...  heroku  config:add  OAUTH_CLIENT_SECRET=0905539091246761180  

top related