introduction to foxx by our community member iskandar soesman @ikandars
TRANSCRIPT
About me
● VP engineering @ Kumparan● Ex software architect @ detik● Ex software engineer @ kompas● Founder of Panada PHP
Framework● Social science background but fall
in love in web tech● @ikandars for Twitter, Facebook,
Github● kandar.id for personal blog
FeaturesMongoDB have great cool features
ReplicasetA way to get data
redundancy and high availability
Sharding SchemalessA way to distribute your
data across many serversNo need create your db
scheme in upfront
Document baseJSON like document type.
It easy to embed subdocument
● I need DB with all MongoDB like features.
● I need DB with multi master feature.
● I need NoSQL with built in join feature.
● I need DB with built in Graph feature.
● I need all those features in a single DB vendor.
But why I move to other DB?
SQL Join
SELECT * FROM users INNER JOIN friends ON (friends.user = users.id);
AQL Join
FOR user IN users FOR friend IN friends FILTER friend.user == user._key RETURN MERGE(user, friend)
ArangoDB also have a Foxx™
Embed your app within your DB server
Foxx™ is a JavaScript framework for writing data-centric HTTP microservices that run directly inside of ArangoDB
You can put any logic into our Google V8 powered JavaScript framework Foxx™ and have full access to the functionality of ArangoDB on C++ level.
Reduced network
overhead
Because Foxx runs directly inside of ArangoDB it lets you bundle all the database queries and logic necessary to handle a request in one place.
Unified data storage logic
By moving the details of your data access and storage logic inside the database and providing a consistent domain specific API to clients, you can shield clients from changes to your internal data structures and know every client will be accessing your database using the same performance optimized queries.
Express like route expression
router.get((req, res) => { res.write(` Hello :D This is your database speaking. `)})
Express like route expression
router.get('/hello/:name', (req, res) => { res.write(`Hello ${req.pathParams.name}!`)}).pathParam('name', joi.string().required())
Other features ● Automatic generated Swagger documentation● Full-stack JavaScript● Batteries included: JWT, job queue and bulit in
validation● Infinitely extensible. You can use npm as you
would when using Node.js● Integrate external services via built HTTP client