Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Creating data centric microservices

1,604 views

Published on

Webinar: Creating data-centric microservices

In this webinar we will focus on Foxx, the microservice framework included in ArangoDB.

Foxx is used to extend the API of ArangoDB with just a couple of lines in JS code. It allows you to move all the logic regarding your data directly into the database which yields the following benefits:

* increased performance all logic is operated as close to the data as possible, no unnecessary data transfer.
* All database details are no longer part of your application.
* You can define fine grained security for your whole dataset.

This webinar is meant as an introduction to the Foxx framework and how to use it.

Published in: Data & Analytics
  • Be the first to comment

Creating data centric microservices

  1. 1. Creating data-centric microservices Michael Hackstein @mchacki
  2. 2. ‣ Monolithic large applications ‣ Run on single server ‣ Loose coupling (object orientation) 2
  3. 3. ‣ Few lines of Code ‣ Independently Scalable ‣ Design for failure ‣ Self-handled Persistence ‣ http://martinfowler.com/articles/microservices. html 3
  4. 4. ‣ Communication with database ‣ Data-intensive operations ‣ Encapsulate data model 4 μS μS μS
  5. 5. ‣ Customize ArangoDB ‣ Abstract from the database ‣ Encapsulate data transformation ‣ Integrate it as a microservice 5 / (~( ) ) /_/ ( _-----_(@ @) ( / /|/--| V " " " "
  6. 6. ‣ Medical data ‣ requires attribute level security ‣ Nurse and Doctor both read the patient file ‣ Some information should not be read- / writeable for the nurse ‣ Session Service ‣ Simple logic ‣ High dependency on database ‣ Social Data Sharing ‣ User defines which content is shared ‣ Join access rights with data ‣ Likely to collect insufficient amount of data 6
  7. 7. ‣ Direct data access ‣ Control outgoing data ‣ Speed improvements 7
  8. 8. ‣ Access patterns are complicated ‣ Easier defined in code ‣ Attribute-Level possible ‣ Pattern described by other data ‣ Use startup options: ‣ -- server.authenticate-system-only true ‣ -- server.disable-authentication false ‣ Database user have full access ‣ Foxx users have restricted access ‣ Foxx users != Database users 8
  9. 9. ‣ Cleaner code separation ‣ Do not pollute your application code ‣ Move query strings behind the API ‣ Convert data on the fly ‣ No additional update request 9
  10. 10. 10 ArangoDB Foxx
  11. 11. Foxx 11 ArangoDB Manifest Collection Controller
  12. 12. { "name": "aardvark", "description": "ArangoDB Admin Web Interface", "author": "ArangoDB GmbH", "version": "1.0", "license": "Apache License, Version 2.0“, "controllers": { "/": "controller.js“ } "files": { "/favicon.ico" : "favicon.ico“} } 12
  13. 13. var FoxxController = require("org/arangodb/foxx").Controller, controller = new FoxxController(applicationContext), db = require("internal").db; /** Short description * Long description */ controller.get("byId/:id“, function(req, res) { var id = req.params("id"); var doc = db.myCollection.document(id); res.json(doc); }.errorResponse(ArangoError, 404, "Document not found“) .pathParam("id", type: joi.string().required().description("Doc id“); 13
  14. 14. ‣ How to get started? ‣ Generator in Web Interface ‣ ArangoDB store ‣ https://www.arangodb.com/tutorial-foxx/ 14
  15. 15. ‣ More features? ‣ Authentication (classic or oauth) ‣ Repository + Models for schema checking ‣ API-Keys 15
  16. 16. ‣ Image links ‣ http://static.tvtropes.org/pmwiki/pub/images/ data4_2257.jpg ‣ http://3.bp.blogspot.com/-EVRkrp-kJ4A/T9EDtL5MGKI/ AAAAAAAAGwg/g_Qvvvs6LdM/s400/soc.jpg ‣ http://www.safetysign.com/images/catlog/product/ large/F7877-restricted-area-do-not-enter-sign.png ‣ http://www.photoeverywhere.co.uk/britain/westernisles/ stonecircle_callanish3715.jpg ‣ http://upload.wikimedia.org/wikipedia/commons/d/d5/ UIUC_Arboretum_20070923_img_1946.jpg 16

×