Introducing Liferay Standalone Applications

3e52153b29fd5540b549089f1f925eca?s=47 Eduardo Lundgren
November 06, 2014
470

Introducing Liferay Standalone Applications

3e52153b29fd5540b549089f1f925eca?s=128

Eduardo Lundgren

November 06, 2014
Tweet

Transcript

  1. Standalone Applications in Liferay @eduardolundgren

  2. “Liferay isn't sexy...”

  3. None
  4. One of the most efficient animal in the kingdom

  5. None
  6. None
  7. They have 360-degree view

  8. 360-degree view

  9. They are immortal

  10. None
  11. None
  12. The most deadly creature on earth

  13. None
  14. None
  15. None
  16. None
  17. None
  18. What is the secret behind the jellyfish ? ? ?

    ? ? ? ? ? ? ? ? ?
  19. None
  20. “Teams with a better distribution of skills, not segmented by

    roles, produce better results” Jared Spool User Interface Engineering
  21. None
  22. @rotty3000 (he also loves cars)

  23. Standalone app is our Jellyfish

  24. 2013

  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. !

  32. None
  33. Datastore

  34. Datastore " Liferay A B Schemaless NoSQL Robust Scalable

  35. A B " Datastore Liferay

  36. Datastore ( your code goes here ) A B Deploy

    Liferay
  37. Datastore ( your code goes here ) A B Deploy

    Liferay
  38. Datastore API Clients A B Cross domain requests Promises Error

    handling Batch Real time Liferay HTTP JavaScript Java ObjectiveC
  39. Datastore RESTful Web Services API Clients A B Restful Liferay

    HTTP JavaScript Java ObjectiveC
  40. <script src="//apis.liferay.com/client.js" /> 8KB

  41. lfr.request('http://api.example.com/v1/users') .then(function(response) {
 // success
 }) .catch(function(reason) {
 // failure

    });
  42. Your clients can talk directly to the back end services

    without needing to go through your server side code
  43. Autogenerated RESTful apis

  44. The secret to machines talking to machines is to speak

    human first
  45. None
  46. None
  47. Users

  48. Users https://api.example.com/v1/users Version Entity

  49. Users /v1/users/ec557f-b045-0bad-5130-1347

  50. Users /v1/users/559743231794

  51. App id = 1, 2, 3... Normal DB

  52. App id = 7 Sharded id = 46 id =

    wat? DB DB DB
  53. App id = 7 Sharded id = 46 id =

    wat? DB 1) Random 2) Ordered 3) Unique 4) Distributed 5) Human
 Readable DB DB
  54. 64 bits IDs 0000000000000000000000000000000000000000000 0 00000000000000000000 |------------------------------------------| |---| |------------------| timestamp

    sequence random bits safety bit bits Liferay's Simpleflake IDs /v1/users/559743231794
  55. 64 bits IDs 0000000000000000000000000000000000000000000 0 00000000000000000000 |------------------------------------------| |---| |------------------| timestamp

    sequence random bits safety bit bits Chances of collision Liferay's Simpleflake IDs
  56. Places for data: method and url, headers and body

  57. POST https://api.example.com/v1/users PUT https://api.example.com/v1/users ! { "about": "Start simple. Dream

    big. Do good. Be well.", "city": "Recife", "country": "BR" } ! HTTP 1.1/201 Created HTTP 1.1/202 Accepted (pending) Create
  58. PUT https://api.example.com/v1/users/1 PATCH https://api.example.com/v1/users/1 ! { "about": "Updated", "city": "Recife",

    "country": "BR" } ! HTTP 1.1/200 OK HTTP 1.1/202 Accepted (pending) Update
  59. DELETE https://api.example.com/v1/users/1 ! HTTP 1.1/204 No content Delete

  60. GET https://api.example.com/v1/users ! HTTP/1.1 200 OK Content-Type: application/json ! {

    "users": [ { "about": "Start simple. Dream big. Do good. Be well.", "city": "Recife", "country": "BR" } ]} GET
  61. GET https://api.example.com/v1/users.json ! HTTP/1.1 200 OK Content-Type: application/json ! {

    "users": [ { "about": "Start simple. Dream big. Do good. Be well.", "city": "Recife", "country": "BR" } ]} GET JSON output
  62. GET https://api.example.com/v1/users.xml ! HTTP/1.1 200 OK Content-Type: text/xml ! <?xml

    version="1.0" encoding="UTF-8" ?> <users> <about>Start simple. Dream big. Do good. Be well.</aboutMe> <city>Recife</city> <country>BR</country> </users> GET XML output
  63. POST https://api.example.com/v1/users/1/publish POST https://api.example.com/v1/users/1/star ! HTTP 1.1/200 OK HTTP 1.1/202

    Accepted (pending) ! Custom verbs
  64. Real-time

  65. RESTful Web Services API Clients Restful HTTP JavaScript Java ObjectiveC

  66. None
  67. lfr.subscribe('http://api.example.com/v1/users') .on('data', function(response) {
 // data has arrived... });

  68. Push notifications for all your services for free

  69. Routing !

  70. http://example.com/special/women

  71. http://example.com/special/men

  72. routes.txt

  73. None
  74. Automated tools

  75. None
  76. None
  77. None
  78. None
  79. Management

  80. Quota, Billing, Security policies, Reports, available at one click

  81. Architecture

  82. Database Service Builder Portlet Portlet Portlet JSON Web Services

  83. RESTful Web Services Real-time Datastore MongoDB Elasticsearch RID Generator Auth

    Permissions
  84. Service Builder RESTful Web Services JSON Web Services Database Real-time

    Datastore MongoDB Elasticsearch RID Generator Auth Permissions Portlet Portlet Portlet
  85. None
  86. Concrete Abstract "

  87. " Concrete Abstract

  88. Concrete Abstract "

  89. None
  90. " Concrete Abstract

  91. DATASTORE RESTFUL REAL TIME ROUTING MANAGEMENT AUTHENTICATION TOOLS

  92. We wanna be more than sexy.

  93. Thank you! @eduardolundgren