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で利用するハンズオンのテキストです。

Mitsuhiro Okamoto

September 21, 2018
Tweet

More Decks by Mitsuhiro Okamoto

Other Decks in Technology

Transcript

  1. 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
  2. All contents © MuleSoft Inc.   1.DBAPI 2. 

      Web$! Database &JSON "% #%& Proxy& 4
  3. All contents © MuleSoft Inc. Anypoint Platform   6

    https://anypoint.mulesoft.com/login/#/signup
  4. All contents © MuleSoft Inc. API   8 1.

      Design Center  2. + Create  API Specification  3. QuickStore-SpecCreate 
  5. 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 $
  6. All contents © MuleSoft Inc. Mule Application 11 1. 

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

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

    HTTP Listener+    2. Database Connector 3. OperationSelect
  9. 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
  10. 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;
  11. All contents © MuleSoft Inc. Data Weave  17 1.

    Script DataWeave   http://bit.ly/tokyo_mulehandson_3 (Sample Data OK)
  12. 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
  13. 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
  14. All contents © MuleSoft Inc. API Proxy 22 1. 

    API Manager 2. Manage API from Exchange
  15. 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 
  16. 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
  17. 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
  18. 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
  19. 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