T E C H
STACK
how locize leverages serverless
localization as a service
localization: The process of making a product
suitable for use in a particular country or region.
as a service: easy to use, scale as you grow/
need, hassle-free, collaborative, etc…
WHAT IS LOCIZE?
Bridging the gap between translation and development
As we know how hard it can be to have a solid and working localization process between
developers and technical editors / translators our mission is to offer a new platform where
everybody is efficient to do its own work and everybody is happy.
OUR MISSION
InContext Editor
Often doing correct translations
needs more information by
providing more context information.
The best context is always the
place where the content is shown -
your website.
Continuous Localization
Complete your CI/CD pipeline with
continuous localization! You’re able to
deploy your translation files separated
from your software so you can update
and manage them independently with
our CDN.
Flexible Integration
Your web project stays
connected with locize. No
more moving files around.
Always keeping the overview.
SOME BENEFITS
We help you to solve your localization
and translation process, decreasing
development time and cost.
DAY ZERO - HOW ALL BEGAN
2011
2013 2014
2016
2018 2019
2022
All started back in 2011 when we were in
search for an internationalization library that
meets our demand - allowing to run both on
server side node.js and on our client side
single page applications.
?
Enhanced scalability
Everyone wants his app to be successful, but if that
happens, can it handle the load? Serverless architecture
means you don’t need to make that choice. Scale
technically with your business model!
Lower cost
In terms of both computing power and human resources,
serverless saves. The next level of DevOps is to move
towards NoOps!
The real PaaS
Most PaaS are not geared towards bringing entire
applications up and down for every request, whereas
FaaS platforms do exactly this.
WHY WE CHOOSE SERVERLESS?
- was/is the only ready FaaS
provider (and more)
- works out of the box
- scales like expected
- API-first approach
- big ecosystem
AWS completes serverless
offering with other AWS
services:
- API Gateway
- DynamoDB
- Simple Storage Service (S3)
- CloudFront
- Simple Email Service (SES)
- etc…
WHY WE CHOOSE AWS?
THE BASIC SETUP
It integrates very well with S3 (where we serve the localized files) and with DynamoDB (our
main work storage). We don’t have to worry about scaling, multi-server communication and
other problems related to distributed systems.
JavaScript
everywhere!
Everything is written in JavaScript:
- app backend
- api
- web client
- cli
Full-Stack
JavaScript
express
We use 3 different lambda types
LAMBDA FUNCTIONS
RESTful APIs using
the express
framework
async
triggered by other
lambda functions to
compute non blocking
tasks
s3 event
i.e. triggered by a new
CloudFront log file
that was saved to s3
(i.e. to calculate
downloads)
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const ensureSettings = require('./lib/ensureSettings');
const verifyApiKey = require('./lib/verifyApiKey');
const missing = require('./routes/missing');
const update = require('./routes/update');
const download = require('./routes/download');
const cors = require('cors');
app.disable('x-powered-by');
app.use(cors());
app.use(ensureSettings);
app.use(bodyParser.urlencoded({ limit: '5mb', extended: true }));
app.use(bodyParser.json({ limit: '5mb'}));
app.post('/missing/:projectId/:version/:language/:namespace',
verifyApiKey,
missing
);
app.post('/update/:projectId/:version/:language/:namespace',
verifyApiKey,
update
);
app.get('/download/:projectId/:version?/:language?/:namespace?',
download
);
if (require.main === module) {
// called directly
app.listen(3000);
console.log('lambda started locally on port 3000');
} else {
// required as a module
module.exports = app;
}
app.js
const serverless = require('serverless-http');
// aws-serverless-express works too but is slower
const app = require('./app');
exports.handler = serverless(app);
lambda.js
updateNamespace.js
const aws = require('aws-sdk');
const lambda = new aws.Lambda({ region: 'eu-west-1' });
// ...
await lambda.invoke({
FunctionName: 'locize-async-processing',
// fire and forget; 'RequestResponse' would wait for response
InvocationType: 'Event',
LogType: 'None',
Payload: JSON.stringify({
event: 'namespaceUpdated',
payload: {
projectId: meta.projectId,
version: meta.version,
language: meta.language,
namespace: meta.namespace
}
}, null, 2)
}).promise();async
const AWS = require('aws-sdk');
exports.handler = (event, context) => {
const region = event.Records[0].awsRegion;
const s3 = new AWS.S3({ region: region });
const ddb = new AWS.DynamoDB.DocumentClient({ region: region });
const srcBucket = event.Records[0].s3.bucket.name;
const srcKey = event.Records[0].s3.object.key;
// ...
const objectHead = await s3.headObject({
Bucket: srcBucket,
Key: srcKey
}).promise();
// …
};
index.js
If you want to build simple services and run them with AWS Lambda, and you're looking for something low-
overhead, easy to get started with, and you only want to use the node.js runtime, Claudia is a good choice.
OUR DEPLOYMENT TOOLING
focused
works only for node.js,
but it does it really well
It automatically installs templates
to convert parameters and results
into objects that Javascript can
consume easily, and makes
things work the way Javascript
developers expect out of the box.
no abstraction
deployment utility,
not a framework
It does not abstract away AWS
services, but instead makes them
easier to get started with. Claudia
is not trying to change the way you
structure or run projects.
simple
helps you get simple
stuff done, quickly
There's no need to learn a special
interface syntax, no need to keep your
definition spread across multiple files
and introduce the overhead of
coordination and maintenance -- just
write the code to handle requests.
SNEAK PEEK ON
TECH STACK
• express => fastify
• redux => pullstate
• custom authentication => cognito
• claudia.js => cloud formation (SAM)
• still everything JavaScript
• more AWS (serverless) services
• more Lambda functions
• more native
• less tools
• newer
• faster
• more fun ;-)
Be connected. Be found. Be a localistar.
Whether as a translation agency or as a freelancer, with
localistars you have the opportunity to get more
contracts by keeping a direct relation to your customers.
Signup and start your magic. You are in control.
FOR TRANSLATORS
Find connections. Find translators. Find your localistars.
It has never been easier to find the right translator. We bring people together for whom the
prospect of long-term and good cooperation is particularly high. How does it work? The formula
for success is "direct contact", which means that you select the appropriate translator based on
your criteria and negotiate the appropriate conditions directly with the selected person.
FOR COMPANIES
Let’s share some
serverless experience.
FEEL FREE TO TRY/ASK ANYTHING!
locize.com
comes with a 14d free trial (and special prices for open source or charity projects)
localistars.com
more than localization experts (coming soon)
claudiajs.com
deploy Node.js projects to AWS Lambda easily
aws.amazon.com/serverless
AWS serverless getting started
github.com/fastify/aws-lambda-fastify
fastest lambda proxy integration for fastify (maintained by us)
Q & A
T H A N K
YOU
locize.com / localistars.com

locize tech stack

  • 1.
    T E CH STACK how locize leverages serverless
  • 2.
    localization as aservice localization: The process of making a product suitable for use in a particular country or region. as a service: easy to use, scale as you grow/ need, hassle-free, collaborative, etc… WHAT IS LOCIZE?
  • 3.
    Bridging the gapbetween translation and development As we know how hard it can be to have a solid and working localization process between developers and technical editors / translators our mission is to offer a new platform where everybody is efficient to do its own work and everybody is happy. OUR MISSION
  • 4.
    InContext Editor Often doingcorrect translations needs more information by providing more context information. The best context is always the place where the content is shown - your website. Continuous Localization Complete your CI/CD pipeline with continuous localization! You’re able to deploy your translation files separated from your software so you can update and manage them independently with our CDN. Flexible Integration Your web project stays connected with locize. No more moving files around. Always keeping the overview. SOME BENEFITS We help you to solve your localization and translation process, decreasing development time and cost.
  • 5.
    DAY ZERO -HOW ALL BEGAN 2011 2013 2014 2016 2018 2019 2022 All started back in 2011 when we were in search for an internationalization library that meets our demand - allowing to run both on server side node.js and on our client side single page applications. ?
  • 6.
    Enhanced scalability Everyone wantshis app to be successful, but if that happens, can it handle the load? Serverless architecture means you don’t need to make that choice. Scale technically with your business model! Lower cost In terms of both computing power and human resources, serverless saves. The next level of DevOps is to move towards NoOps! The real PaaS Most PaaS are not geared towards bringing entire applications up and down for every request, whereas FaaS platforms do exactly this. WHY WE CHOOSE SERVERLESS?
  • 7.
    - was/is theonly ready FaaS provider (and more) - works out of the box - scales like expected - API-first approach - big ecosystem AWS completes serverless offering with other AWS services: - API Gateway - DynamoDB - Simple Storage Service (S3) - CloudFront - Simple Email Service (SES) - etc… WHY WE CHOOSE AWS?
  • 8.
    THE BASIC SETUP Itintegrates very well with S3 (where we serve the localized files) and with DynamoDB (our main work storage). We don’t have to worry about scaling, multi-server communication and other problems related to distributed systems.
  • 9.
    JavaScript everywhere! Everything is writtenin JavaScript: - app backend - api - web client - cli Full-Stack JavaScript
  • 10.
    express We use 3different lambda types LAMBDA FUNCTIONS RESTful APIs using the express framework async triggered by other lambda functions to compute non blocking tasks s3 event i.e. triggered by a new CloudFront log file that was saved to s3 (i.e. to calculate downloads)
  • 11.
    const express =require('express'); const bodyParser = require('body-parser'); const app = express(); const ensureSettings = require('./lib/ensureSettings'); const verifyApiKey = require('./lib/verifyApiKey'); const missing = require('./routes/missing'); const update = require('./routes/update'); const download = require('./routes/download'); const cors = require('cors'); app.disable('x-powered-by'); app.use(cors()); app.use(ensureSettings); app.use(bodyParser.urlencoded({ limit: '5mb', extended: true })); app.use(bodyParser.json({ limit: '5mb'})); app.post('/missing/:projectId/:version/:language/:namespace', verifyApiKey, missing ); app.post('/update/:projectId/:version/:language/:namespace', verifyApiKey, update ); app.get('/download/:projectId/:version?/:language?/:namespace?', download ); if (require.main === module) { // called directly app.listen(3000); console.log('lambda started locally on port 3000'); } else { // required as a module module.exports = app; } app.js const serverless = require('serverless-http'); // aws-serverless-express works too but is slower const app = require('./app'); exports.handler = serverless(app); lambda.js
  • 12.
    updateNamespace.js const aws =require('aws-sdk'); const lambda = new aws.Lambda({ region: 'eu-west-1' }); // ... await lambda.invoke({ FunctionName: 'locize-async-processing', // fire and forget; 'RequestResponse' would wait for response InvocationType: 'Event', LogType: 'None', Payload: JSON.stringify({ event: 'namespaceUpdated', payload: { projectId: meta.projectId, version: meta.version, language: meta.language, namespace: meta.namespace } }, null, 2) }).promise();async
  • 13.
    const AWS =require('aws-sdk'); exports.handler = (event, context) => { const region = event.Records[0].awsRegion; const s3 = new AWS.S3({ region: region }); const ddb = new AWS.DynamoDB.DocumentClient({ region: region }); const srcBucket = event.Records[0].s3.bucket.name; const srcKey = event.Records[0].s3.object.key; // ... const objectHead = await s3.headObject({ Bucket: srcBucket, Key: srcKey }).promise(); // … }; index.js
  • 14.
    If you wantto build simple services and run them with AWS Lambda, and you're looking for something low- overhead, easy to get started with, and you only want to use the node.js runtime, Claudia is a good choice. OUR DEPLOYMENT TOOLING focused works only for node.js, but it does it really well It automatically installs templates to convert parameters and results into objects that Javascript can consume easily, and makes things work the way Javascript developers expect out of the box. no abstraction deployment utility, not a framework It does not abstract away AWS services, but instead makes them easier to get started with. Claudia is not trying to change the way you structure or run projects. simple helps you get simple stuff done, quickly There's no need to learn a special interface syntax, no need to keep your definition spread across multiple files and introduce the overhead of coordination and maintenance -- just write the code to handle requests.
  • 15.
    SNEAK PEEK ON TECHSTACK • express => fastify • redux => pullstate • custom authentication => cognito • claudia.js => cloud formation (SAM) • still everything JavaScript • more AWS (serverless) services • more Lambda functions • more native • less tools • newer • faster • more fun ;-)
  • 16.
    Be connected. Befound. Be a localistar. Whether as a translation agency or as a freelancer, with localistars you have the opportunity to get more contracts by keeping a direct relation to your customers. Signup and start your magic. You are in control. FOR TRANSLATORS Find connections. Find translators. Find your localistars. It has never been easier to find the right translator. We bring people together for whom the prospect of long-term and good cooperation is particularly high. How does it work? The formula for success is "direct contact", which means that you select the appropriate translator based on your criteria and negotiate the appropriate conditions directly with the selected person. FOR COMPANIES
  • 17.
    Let’s share some serverlessexperience. FEEL FREE TO TRY/ASK ANYTHING! locize.com comes with a 14d free trial (and special prices for open source or charity projects) localistars.com more than localization experts (coming soon) claudiajs.com deploy Node.js projects to AWS Lambda easily aws.amazon.com/serverless AWS serverless getting started github.com/fastify/aws-lambda-fastify fastest lambda proxy integration for fastify (maintained by us) Q & A
  • 18.
    T H AN K YOU locize.com / localistars.com