SlideShare une entreprise Scribd logo
1  sur  41
The Framework for API lovers 
@elefrantjs
About me 
Marcos Sanz Latorre 
@marsanla 
IT. Engineer 
I’m Spanish 
Denmark, USA, Poland 
Love Basketball & Coding
About me 
I quit my stable job, to follow my dream 
Created 13Genius (Group of friends) 
App Twitter, Elefrant, Meetk.at, Fantity
My Team
A bit of background… 
We love to develop our ideas 
Start Meetk.at project
Needs 
Multidevice system - API 
Modern language 
Scalable
Technology 
NodeJs : 
– Fast and easy (Javascript) 
– We can use for everything 
– XMPP, Reverse Ajax, Websockets, Server-sent Events, Long 
Polling, Flash Sockets… 
– Native bindings 
We want a Realtime app
What’s an API? 
API = Application Program Interface 
Set of Routines, Protocols and Tools 
Used by a lot of companies
Benefits 
Standard communications between App’s 
Create App’s in the Cloud 
Earn & Save Money 
Multidevice 
Light App’s 
Fast Maintenance
In the market…
We wanted… 
Just an API Framework Server 
Light and Simple 
Modulable
So… 
had borned!
Elefrant 
NodeJs Framework to create API servers 
HMC 
(Model & Controller modulable) 
Restify based 
Fast & Easy 
Light 
Open source
Features 
Modulable & Customizable 
Scalable + Cluster 
Events 
Socket, HTTP 
Auto Documentation 
Authentication Basic & 2.0
Features 
Validation 
Rate Limit controller 
ORM Waterline 
Audit & Logger 
Custom Errors 
Cache
Pros 
Simple 
Authentication 
Documentation 
Fast 
Architecture 
Versionable
Framework 
Elefrant 
Balancer 
Websockets 
http/Ajax 
Cache 
Db 
3rd 
Services 
Actions 
Components 
Core 
Pub/Sub
Who’s using… 
Health and Nutrition Startup 
Security and Biometric Software 
Own projects
Current Version 
Version 0.1 
We have just started 
but we have a great future
v 0.1 (Current) 
Core 
Controllers (API versions) 
Models 
Config 
Routes 
Env
Init 
Core 
Controllers (API versions) 
Models 
Config 
Routes 
Env 
1 2 
3 
5 
4 
6
Controllers 
Versions of API’s 
https://api.acme.com/v1/products 
https://api.acme.com/v2/products 
Validation of params from path, body, query 
Documentation 
Functionality of the actions
Controllers 
add: { 
spec: { 
summary: 'Return a list of users, filtered by parameters’, 
…. 
}, 
validation: { 
email: { 
isRequired: true, 
isEmail: true, 
scope: 'body’, 
description: '' 
}, 
… 
}, 
action: function (req, res, next) { 
// Functionality 
} 
}
Models 
MongoDb + ElasticSearch 
Validation in Model Layer 
Typical Functionality of models – like CRUD
Routing 
Auto generate route from: 
{ 
name: 'nameforroute', 
path: 'url/of/the/route', 
method: 'GET or POST or PUT or DELETE or PATCH', 
version: [ 
'1.0.0', 
’2.0.1' 
], 
auth: true or false, 
scopes: [ 
'scopeItem', 
'scopeItem' 
], 
action: api.v1.nameController.method 
}
Config 
All enviroments variables 
-Config 
- Env 
- Production 
- Database.js 
- … 
- Test 
- … 
- Development 
- Database.js 
- … 
- Redis.js 
- Database.js 
- Session.js 
- Logger.js 
- … 
module.exports = { 
host: 'localhost', 
port: '27017', 
database: 'elefrant' 
}; 
Access: 
config.database.host
Integrations 
Task 
automator 
Continuous 
Integration
v 0.2 
Core 
Config Env 
Actions (API versions) 
Components 
Default 
Components
v 0.2 
1 2 3 
Core 
Config Env 
Actions (API versions) 
Components 
Default 
Components 
4 
6 
5
Features 
+ features v 0.1 
More control 
Develop your own components 
Open ocean of possibilities 
…
Components 
Example: oauth2.0, logger, response, audit, elasticSearch, … 
Config 
Components, modules or plugins 
nameOfComp.js 
Particles.json 
Lib 
Whatever you need…
Components 
Particles.json – (Variables to define the component) 
Example of component index: 
module.exports = function(config, logger) { 
return { 
start: function() { 
http.createServer(app).listen(config.server.port, function 
() { 
logger(‘Server listening on' + 
config.server.port); 
}); 
} 
}; 
}; 
module.exports.__module = { 
args: [”config", ”logger”] 
};
Actions 
Group of actions for API 
Example: Users, Settings, Tweets, Favourites, … 
Controllers 
Models 
Config 
Env 
Routes
Integrations
Release v. 0.2 
End October 2014
Future features 
Game server Modules 
Mailer 
Background Tasks 
PubSub 
TCP 
Hooks 
…
Real case 
Client 
API System 
Balancer 
Elefrant 
MongoD 
b 
Cache 
Redis 
Elastic 
search
Response Times 
Ram: 512 MB 
Processor: 1 Core 
SSD: 20 GB 
Tranfer: 1 Tb 
Request: 
Search items in mongoDb using 
ElasticSearch 
First call 84 ms 
Next calls 4-15 ms 
Con. Conex. ≤500
Get Started v0.1 
Donwload from Github 
https://github.com/Elefrant/elefrant 
Install dependencies 
npm install 
Execute Elefrant 
grunt
Want to get involved? 
Join to Elefrant Code Team!
Thank you!! 
@elefrantjs @marsanla 
marcos.sanz@13genius.com 
www.elefrant.com

Contenu connexe

Tendances

Tendances (20)

Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
Universal JavaScript Web Applications with React - Luciano Mammino - Codemoti...
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
 
Ember testing internals with ember cli
Ember testing internals with ember cliEmber testing internals with ember cli
Ember testing internals with ember cli
 
Test like a pro with Ember.js
Test like a pro with Ember.jsTest like a pro with Ember.js
Test like a pro with Ember.js
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
AngularJS Unit Testing
AngularJS Unit TestingAngularJS Unit Testing
AngularJS Unit Testing
 
RESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher PecoraroRESTful API development in Laravel 4 - Christopher Pecoraro
RESTful API development in Laravel 4 - Christopher Pecoraro
 
Testing Ember Apps: Managing Dependency
Testing Ember Apps: Managing DependencyTesting Ember Apps: Managing Dependency
Testing Ember Apps: Managing Dependency
 
Full Stack Unit Testing
Full Stack Unit TestingFull Stack Unit Testing
Full Stack Unit Testing
 
Workshop 3: JavaScript build tools
Workshop 3: JavaScript build toolsWorkshop 3: JavaScript build tools
Workshop 3: JavaScript build tools
 
The JavaFX Ecosystem
The JavaFX EcosystemThe JavaFX Ecosystem
The JavaFX Ecosystem
 
Angular Pipes Workshop
Angular Pipes WorkshopAngular Pipes Workshop
Angular Pipes Workshop
 
Tech Webinar: Angular 2, Introduction to a new framework
Tech Webinar: Angular 2, Introduction to a new frameworkTech Webinar: Angular 2, Introduction to a new framework
Tech Webinar: Angular 2, Introduction to a new framework
 
Web services with laravel
Web services with laravelWeb services with laravel
Web services with laravel
 
AngularJS - TechTalk 3/2/2014
AngularJS - TechTalk 3/2/2014AngularJS - TechTalk 3/2/2014
AngularJS - TechTalk 3/2/2014
 
Rapid prototyping and easy testing with ember cli mirage
Rapid prototyping and easy testing with ember cli mirageRapid prototyping and easy testing with ember cli mirage
Rapid prototyping and easy testing with ember cli mirage
 
SCR Annotations for Fun and Profit
SCR Annotations for Fun and ProfitSCR Annotations for Fun and Profit
SCR Annotations for Fun and Profit
 
Javascript laravel's friend
Javascript laravel's friendJavascript laravel's friend
Javascript laravel's friend
 
Unit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJSUnit Testing and Coverage for AngularJS
Unit Testing and Coverage for AngularJS
 

Similaire à Elefrant [ng-Poznan]

RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
Rahul Singh
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
Python Ireland
 
Resume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_expResume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_exp
Sandip Mohod
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
hamzadamani7
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIs
NLJUG
 

Similaire à Elefrant [ng-Poznan] (20)

StrongLoop Overview
StrongLoop OverviewStrongLoop Overview
StrongLoop Overview
 
How modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantageHow modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantage
 
RAHUL_Updated( (2)
RAHUL_Updated( (2)RAHUL_Updated( (2)
RAHUL_Updated( (2)
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
 
Going FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at NetflixGoing FaaSter, Functions as a Service at Netflix
Going FaaSter, Functions as a Service at Netflix
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
Serverless Application Development with SAM
Serverless Application Development with SAMServerless Application Development with SAM
Serverless Application Development with SAM
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Naga Srinivas
Naga SrinivasNaga Srinivas
Naga Srinivas
 
Resume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_expResume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_exp
 
Part6 introducing the jas forge collaborative project
Part6   introducing the jas forge collaborative projectPart6   introducing the jas forge collaborative project
Part6 introducing the jas forge collaborative project
 
540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf540slidesofnodejsbackendhopeitworkforu.pdf
540slidesofnodejsbackendhopeitworkforu.pdf
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Practices and tools for building better APIs
Practices and tools for building better APIsPractices and tools for building better APIs
Practices and tools for building better APIs
 
Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)Practices and tools for building better API (JFall 2013)
Practices and tools for building better API (JFall 2013)
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Having fun with code igniter
Having fun with code igniterHaving fun with code igniter
Having fun with code igniter
 
Deep Dive on Serverless Stack
Deep Dive on Serverless StackDeep Dive on Serverless Stack
Deep Dive on Serverless Stack
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Elefrant [ng-Poznan]

  • 1. The Framework for API lovers @elefrantjs
  • 2. About me Marcos Sanz Latorre @marsanla IT. Engineer I’m Spanish Denmark, USA, Poland Love Basketball & Coding
  • 3. About me I quit my stable job, to follow my dream Created 13Genius (Group of friends) App Twitter, Elefrant, Meetk.at, Fantity
  • 5. A bit of background… We love to develop our ideas Start Meetk.at project
  • 6. Needs Multidevice system - API Modern language Scalable
  • 7. Technology NodeJs : – Fast and easy (Javascript) – We can use for everything – XMPP, Reverse Ajax, Websockets, Server-sent Events, Long Polling, Flash Sockets… – Native bindings We want a Realtime app
  • 8. What’s an API? API = Application Program Interface Set of Routines, Protocols and Tools Used by a lot of companies
  • 9. Benefits Standard communications between App’s Create App’s in the Cloud Earn & Save Money Multidevice Light App’s Fast Maintenance
  • 11. We wanted… Just an API Framework Server Light and Simple Modulable
  • 13. Elefrant NodeJs Framework to create API servers HMC (Model & Controller modulable) Restify based Fast & Easy Light Open source
  • 14. Features Modulable & Customizable Scalable + Cluster Events Socket, HTTP Auto Documentation Authentication Basic & 2.0
  • 15. Features Validation Rate Limit controller ORM Waterline Audit & Logger Custom Errors Cache
  • 16. Pros Simple Authentication Documentation Fast Architecture Versionable
  • 17. Framework Elefrant Balancer Websockets http/Ajax Cache Db 3rd Services Actions Components Core Pub/Sub
  • 18. Who’s using… Health and Nutrition Startup Security and Biometric Software Own projects
  • 19. Current Version Version 0.1 We have just started but we have a great future
  • 20. v 0.1 (Current) Core Controllers (API versions) Models Config Routes Env
  • 21. Init Core Controllers (API versions) Models Config Routes Env 1 2 3 5 4 6
  • 22. Controllers Versions of API’s https://api.acme.com/v1/products https://api.acme.com/v2/products Validation of params from path, body, query Documentation Functionality of the actions
  • 23. Controllers add: { spec: { summary: 'Return a list of users, filtered by parameters’, …. }, validation: { email: { isRequired: true, isEmail: true, scope: 'body’, description: '' }, … }, action: function (req, res, next) { // Functionality } }
  • 24. Models MongoDb + ElasticSearch Validation in Model Layer Typical Functionality of models – like CRUD
  • 25. Routing Auto generate route from: { name: 'nameforroute', path: 'url/of/the/route', method: 'GET or POST or PUT or DELETE or PATCH', version: [ '1.0.0', ’2.0.1' ], auth: true or false, scopes: [ 'scopeItem', 'scopeItem' ], action: api.v1.nameController.method }
  • 26. Config All enviroments variables -Config - Env - Production - Database.js - … - Test - … - Development - Database.js - … - Redis.js - Database.js - Session.js - Logger.js - … module.exports = { host: 'localhost', port: '27017', database: 'elefrant' }; Access: config.database.host
  • 27. Integrations Task automator Continuous Integration
  • 28. v 0.2 Core Config Env Actions (API versions) Components Default Components
  • 29. v 0.2 1 2 3 Core Config Env Actions (API versions) Components Default Components 4 6 5
  • 30. Features + features v 0.1 More control Develop your own components Open ocean of possibilities …
  • 31. Components Example: oauth2.0, logger, response, audit, elasticSearch, … Config Components, modules or plugins nameOfComp.js Particles.json Lib Whatever you need…
  • 32. Components Particles.json – (Variables to define the component) Example of component index: module.exports = function(config, logger) { return { start: function() { http.createServer(app).listen(config.server.port, function () { logger(‘Server listening on' + config.server.port); }); } }; }; module.exports.__module = { args: [”config", ”logger”] };
  • 33. Actions Group of actions for API Example: Users, Settings, Tweets, Favourites, … Controllers Models Config Env Routes
  • 35. Release v. 0.2 End October 2014
  • 36. Future features Game server Modules Mailer Background Tasks PubSub TCP Hooks …
  • 37. Real case Client API System Balancer Elefrant MongoD b Cache Redis Elastic search
  • 38. Response Times Ram: 512 MB Processor: 1 Core SSD: 20 GB Tranfer: 1 Tb Request: Search items in mongoDb using ElasticSearch First call 84 ms Next calls 4-15 ms Con. Conex. ≤500
  • 39. Get Started v0.1 Donwload from Github https://github.com/Elefrant/elefrant Install dependencies npm install Execute Elefrant grunt
  • 40. Want to get involved? Join to Elefrant Code Team!
  • 41. Thank you!! @elefrantjs @marsanla marcos.sanz@13genius.com www.elefrant.com