Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mulesoft Meetup Tokyo #2 Hands-on

Mulesoft Meetup Tokyo #2 Hands-on

2018/9/21開催のMulesoft Meetup Tokyo #2で利用するハンズオンのテキストです。

Db3632913b120afe741970435b3baa34?s=128

Mitsuhiro Okamoto

September 21, 2018
Tweet

Transcript

  1. 2018/9/21: #2 Tokyo

  2.     MuleSoft  Mitsuhiro Okamoto Salesforce @mitsuhiro

  3. All contents © MuleSoft Inc. 31 (( 3 • MuleSoft3/Quick-Start'(

    – %&Anypoint Studio (Eclipse#)IDE)+64 ! – Web"$  .8  *<-2 – ;,(0:53 9 74 https://developer.mulesoft.com/guides/quick-start/designing-your-first-api
  4. All contents © MuleSoft Inc.   1.DBAPI 2. 

      Web$! Database &JSON "% #%& Proxy& 4
  5.  Anypoint Platform  

  6. All contents © MuleSoft Inc. Anypoint Platform   6

    https://anypoint.mulesoft.com/login/#/signup
  7. Step 1 API

  8. All contents © MuleSoft Inc. API   8 1.

      Design Center  2. + Create  API Specification  3. QuickStore-SpecCreate 
  9. All contents © MuleSoft Inc. API " 9 1. http://bit.ly/tokyo_mulehandson_1

    RAML!  &   2.  Mocking service:   On 3. API SummaryGet # 4. Publish to Exchange  API $
  10. Step 2 Mule Application (API) 

  11. All contents © MuleSoft Inc. Mule Application 11 1. 

    Design Center #! 2. + Create "Mule Application #! 3. QuickStore-ImplCreate " 4.   Go Straight to Canvas  
  12. All contents © MuleSoft Inc. HTTP Listener 12 1. TriggerHTTP

    Listener 2. Path : /api/products/{productId}  
  13. All contents © MuleSoft Inc. Database Connector  13 1.

    HTTP Listener+    2. Database Connector 3. OperationSelect
  14. All contents © MuleSoft Inc. HTTP Listener  14 1.

    Set up  2. Database Configuration   Test  Save Name Products_Config Connection MySQL Connection Host congo.devrel.mulesoft.com Port 3306 User mulesoft Password mulesoft Database products?useSSL=false&autoReconenct=true
  15. All contents © MuleSoft Inc. Database Connector – Query 15

    1. SQL Query Text http://bit.ly/tokyo_mulehandson_2 2. Input Parameters - Key : id - Value : attributes.uriParams.productId SELECT product.*, CONCAT('["', (GROUP_CONCAT(variant.picture SEPARATOR '", "')),'"]') AS pictures, CONCAT('[', GROUP_CONCAT('{"',variant.identifierType, '":"', variant.identifier, '"}'),']') AS identifiers FROM product INNER JOIN variant ON product.uuid = variant.productUUID WHERE product.uuid = :id;
  16. All contents © MuleSoft Inc. Transform 16 1. Database Connector+

     2. Transform 3. Script  
  17. All contents © MuleSoft Inc. Data Weave  17 1.

    Script DataWeave   http://bit.ly/tokyo_mulehandson_3 (Sample Data OK)
  18. All contents © MuleSoft Inc.   #!$% 18 1.

    Run  &! 2. "  Copy link  + “/api/products/1295527d-d3c7-11e7-9c84-06bf056d193e”   : http://quickstore-impl-srfy.jp-e1.cloudhub.io/api/products/1295527d-d3c7-11e7-9c84-06bf056d193e 3. Sandbox
  19. Step 3 Runtime  

  20. All contents © MuleSoft Inc. Runtime  "# 20 1.

     Runtime Manager $ 2.   "#! URL   "#  : http://quickstore-impl-srfy.jp-e1.cloudhub.io/api/products/1295527d-d3c7-11e7-9c84-06bf056d193e
  21. Step 4 API ManagerProxy

  22. All contents © MuleSoft Inc. API Proxy 22 1. 

    API Manager 2. Manage API from Exchange
  23. All contents © MuleSoft Inc. API Proxy 23 1. 

     API Name QuickStore-Spec Asset Type RAML/OAS API Version v1.0 Asset version 1.0.0 Managing Type Endpoint with Proxy Implementation URI: http://yourapp.cloudhub.io/api Proxy deployment target CloudHub Path /api Check this box if your are managing this API in Mule 4 or above 
  24. All contents © MuleSoft Inc. API Proxy 24 1. ProxyURL

     2. Deploy Proxy  : http://quickstore-xxx.jp-e1.cloudhub.io/api/products/1295527d-d3c7-11e7-9c84-06bf056d193e
  25. Step 5 API Proxy

  26. All contents © MuleSoft Inc. API    1.

    API ManagerAPIPolicies  2. Apply New Policy Rate limiting -> 1.2.1  3.   # of Req : 1 Time Period : 1 Time Unit : Minute 26
  27. All contents © MuleSoft Inc. API $%).13 1. # 20*

     (!"*4Shift + F5 or ⌘R /+) ': http://quickstore-xxx.jp-e1.cloudhub.io/api/products/1295527d-d3c7-11e7-9c84-06bf056d193e 2. Quota#%  13 3. 5(-&,  13 27
  28. Step 6 

  29. All contents © MuleSoft Inc. What’s next 29 • Tutorials

    & How Tos –    How to • !" • RAML$ 1 (RAML 100) – https://qiita.com/mokamoto/items/9f5e6d0347564639fcc7 • Mule standalone #AnyPoint Runtime Manager  – https://qiita.com/mokamoto/items/6fc8f0c9c65efdb36dde https://developer.mulesoft.com/tutorials-and-how-tos
  30. MuleSoft Thank you!!