Learn how to focus on creating a great user experience and forget complex infrastructure. Instantly add a powerful core, push notifications, and analytics to your app with Parse. We will take a deep dive at Parse's native SDKs for Android and see how to build an app that scales to millions of users.
Parse is a suite of cloud based APIs, services and libraries that focus on letting developers build out rich applications and less time dealing with the overhead of setting up and managing databases, push notifications, social sign on, analytics, and even hosting and servers.
In this series I'll overview the options around developing an application that leverages Parse, including using Cloud Code to deploy your Node.js app to Parse's own hosting service.
Parse: A Mobile Backend as a Service (MBaaS)Ville Seppänen
Parse is a mobile backend as a service (MBaaS), a subcategory of PaaS. This is a presentation evaluating the service for a post-graduate seminar course.
Learn how to focus on creating a great user experience and forget complex infrastructure. Instantly add a powerful core, push notifications, and analytics to your app with Parse. We will take a deep dive at Parse's native SDKs for Android and see how to build an app that scales to millions of users.
Parse is a suite of cloud based APIs, services and libraries that focus on letting developers build out rich applications and less time dealing with the overhead of setting up and managing databases, push notifications, social sign on, analytics, and even hosting and servers.
In this series I'll overview the options around developing an application that leverages Parse, including using Cloud Code to deploy your Node.js app to Parse's own hosting service.
Parse: A Mobile Backend as a Service (MBaaS)Ville Seppänen
Parse is a mobile backend as a service (MBaaS), a subcategory of PaaS. This is a presentation evaluating the service for a post-graduate seminar course.
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...Amazon Web Services
With AWS CloudFormation you can model, provision, and update the full breadth of AWS resources. You can manage anything from a single Amazon EC2 instance to a multi-tier application.
The British Broadcasting Corporation (BBC) uses AWS and CloudFormation to help deliver a range of services, including BBC iPlayer. Learn straight from the BBC team on how they developed these services with a multitude of AWS features and how they operate at scale. Get insight into the tooling and best practices developed by the BBC team and how they used CloudFormation to form an end-to-end deployment and management pipeline.
If you are new to AWS CloudFormation, get up to speed for this session by completing the Working with CloudFormation lab in the self-paced Labs Lounge.
Advanced Durable Functions - Serverless Meetup Tokyo - Feb 2018Chris Gillum
Deep dive into Azure Durable Functions and how it works behind the scenes. It assumes some familiarity with the basics of Azure Functions and Durable Functions. Note that this presentation contains both English and Japanese (and the Japanese may contain errors since I'm not a native speaker). Also note that some of the animations might be a little off since SlideShare doesn't support animations.
Leveraging parse.com for Speedy DevelopmentAndrew Kozlik
After viewing this presentation you will have a high level overview of Parse's services and understand how quick and easy it is to store and retrieve your data in the cloud. Stop wasting time building out a backend and get your MVP out the door!
This presentation was given to the combined Orlando iOS and Central Florida Android Developers Meetup on April 22, 2015.
Presentation from OSGi Community Event / EclipseCon Europe 2013
One of the major topics the OSGi alliance is working on is a proposal for distributed eventing especially in the cloud. This session starts with an overview of the current state in the alliance and then shows already available solutions from the Apache Sling open source project. This includes distributing events through event admin and controlled processing of events by exactly one processor in distributed installations. The current implementations will be set in context to the ongoing activations in the alliance.
(DEV307) Introduction to Version 3 of the AWS SDK for Python (Boto) | AWS re:...Amazon Web Services
In this session, we introduce Boto 3, the next major version of the AWS SDK for Python. You will learn about the new features in the SDK, such as the high-level resource APIs that simplify working with AWS collections and objects, and the eventing model that enables customizing your calls to AWS services. We use a sample application to demonstrate these features, and show how to integrate them with your existing projects.
Easing offline web application development with GWTArnaud Tournier
At this current time, HTML5 APIs are mature enough so that the web browser can now be a very good platform for applications that were before only implemented as native applications : offline applications with locally stored data, embedded SQL engines, etc. Although there are many good Javascript frameworks out there, the Java language allows to build, maintain, debug and work with ease on really big applications (> 100,000 LOC).
You'll discover in this presentation all the tools we assembled to make an application available with its data 100% of the time, even without internet!
Jeff Scudder, Eric Bidelman
The number of APIs made available for Google products has exploded from a handful to a slew! Get
the big picture on what is possible with the APIs for everything from YouTube, to Spreadsheets, to
Search, to Translate. We'll go over a few tools to help you get started and the things these APIs share
in common. After this session picking up new Google APIs will be a snap.
Webinar: Building Your First App in Node.jsMongoDB
Node.js is one of the fastest growing and most popular application frameworks today. It offers a set of features that is both useful and challenging to modern web and back-end developer. Most engineers think of it as a cool, simple, and fast application framework that makes iterative development easier.
In this webinar we will talk about how Node.js and MongoDB interact, discuss the best ways to get started, and walk through how to use MongoDB and Node.js in a set of use cases.
(APP306) Using AWS CloudFormation for Deployment and Management at Scale | AW...Amazon Web Services
With AWS CloudFormation you can model, provision, and update the full breadth of AWS resources. You can manage anything from a single Amazon EC2 instance to a multi-tier application.
The British Broadcasting Corporation (BBC) uses AWS and CloudFormation to help deliver a range of services, including BBC iPlayer. Learn straight from the BBC team on how they developed these services with a multitude of AWS features and how they operate at scale. Get insight into the tooling and best practices developed by the BBC team and how they used CloudFormation to form an end-to-end deployment and management pipeline.
If you are new to AWS CloudFormation, get up to speed for this session by completing the Working with CloudFormation lab in the self-paced Labs Lounge.
Advanced Durable Functions - Serverless Meetup Tokyo - Feb 2018Chris Gillum
Deep dive into Azure Durable Functions and how it works behind the scenes. It assumes some familiarity with the basics of Azure Functions and Durable Functions. Note that this presentation contains both English and Japanese (and the Japanese may contain errors since I'm not a native speaker). Also note that some of the animations might be a little off since SlideShare doesn't support animations.
Leveraging parse.com for Speedy DevelopmentAndrew Kozlik
After viewing this presentation you will have a high level overview of Parse's services and understand how quick and easy it is to store and retrieve your data in the cloud. Stop wasting time building out a backend and get your MVP out the door!
This presentation was given to the combined Orlando iOS and Central Florida Android Developers Meetup on April 22, 2015.
Presentation from OSGi Community Event / EclipseCon Europe 2013
One of the major topics the OSGi alliance is working on is a proposal for distributed eventing especially in the cloud. This session starts with an overview of the current state in the alliance and then shows already available solutions from the Apache Sling open source project. This includes distributing events through event admin and controlled processing of events by exactly one processor in distributed installations. The current implementations will be set in context to the ongoing activations in the alliance.
(DEV307) Introduction to Version 3 of the AWS SDK for Python (Boto) | AWS re:...Amazon Web Services
In this session, we introduce Boto 3, the next major version of the AWS SDK for Python. You will learn about the new features in the SDK, such as the high-level resource APIs that simplify working with AWS collections and objects, and the eventing model that enables customizing your calls to AWS services. We use a sample application to demonstrate these features, and show how to integrate them with your existing projects.
Easing offline web application development with GWTArnaud Tournier
At this current time, HTML5 APIs are mature enough so that the web browser can now be a very good platform for applications that were before only implemented as native applications : offline applications with locally stored data, embedded SQL engines, etc. Although there are many good Javascript frameworks out there, the Java language allows to build, maintain, debug and work with ease on really big applications (> 100,000 LOC).
You'll discover in this presentation all the tools we assembled to make an application available with its data 100% of the time, even without internet!
Jeff Scudder, Eric Bidelman
The number of APIs made available for Google products has exploded from a handful to a slew! Get
the big picture on what is possible with the APIs for everything from YouTube, to Spreadsheets, to
Search, to Translate. We'll go over a few tools to help you get started and the things these APIs share
in common. After this session picking up new Google APIs will be a snap.
Webinar: Building Your First App in Node.jsMongoDB
Node.js is one of the fastest growing and most popular application frameworks today. It offers a set of features that is both useful and challenging to modern web and back-end developer. Most engineers think of it as a cool, simple, and fast application framework that makes iterative development easier.
In this webinar we will talk about how Node.js and MongoDB interact, discuss the best ways to get started, and walk through how to use MongoDB and Node.js in a set of use cases.
Webinar: Building Your First App in Node.jsMongoDB
Node.js is one of the fastest growing and most popular application frameworks today. It offers a set of features that is both useful and challenging to modern web and back-end developer. Most engineers think of it as a cool, simple, and fast application framework that makes iterative development easier.
In this webinar we will talk about how Node.js and MongoDB interact, discuss the best ways to get started, and walk through how to use MongoDB and Node.js in a set of use cases.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Introduction to Cocoapods as Dependency Management for iOS project using Swift. This slide will also introduce some of common library used in iOS Development: Alamofire, SwiftyJSON, MBProgressHUD.
From development environments to production deployments with Docker, Compose,...Jérôme Petazzoni
In this session, we will learn how to define and run multi-container applications with Docker Compose. Then, we will show how to deploy and scale them seamlessly to a cluster with Docker Swarm; and how Amazon EC2 Container Service (ECS) eliminates the need to install,operate, and scale your own cluster management infrastructure. We will also walk through some best practice patterns used by customers for running their microservices platforms or batch jobs. Sample code and Compose templates will be provided on GitHub afterwards.
Introduction to Cloud Computing with Google Cloudwesley chun
This is a 20-30 minute technical talk introducing developers to cloud computing including an overview of Google Cloud computing products. There is a special focus on serverless tools as a convenient way for developers to run code. The talk ends with several inspirational apps showcasing what is possible with Google Cloud tools meant to plant a seed as to consider what is possible.
Aviary's customizable SDK powers cross-platform photo editing for over 6,500 partners and over 70 million monthly active users across the globe. Some of our notable partners include Walgreens, Squarespace, Yahoo Mail, Flickr, Photobucket, and Wix. At Aviary, we use node.js for several mission-critical projects in production and have seen extremely positive results. In this talk, we will discuss how we approach some common situations that developers deploying node.js projects will likely need to tackle. We will walk you through our routing mechanism, our automated deployment system, some of our custom middleware, and our testing philosophy.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
1. Parse Cloud Code
Building Web Apps WITH Programming Server a little bit.
http://goo.gl/oW1cZD
2014 Spring Web Programming, NCCU
Author: pa4373 (Licensed by CC-By 4.0)
6. To work with Cloud Code, you shall understand
how Parse actually works.
7. RESTful API
● RESTful API is the design principle of Web
Service
● Web Service: content consumable for
computer program. (Developers love it!)
8. RESTful API
How web service client works:
1. Construct HTTP request
2. Get HTTP response
3. Parse HTTP response (plain text) into native
data types supported by your programming
language.
4. Do whatever you like.
Programming language independent.
9. RESTful API
{
"resultCount":1,
"results": [
{"wrapperType":"artist", "artistType":"Artist",
"artistName":"Jack Johnson", "artistLinkUrl":"https:
//itunes.apple.com/us/artist/jack-johnson/id909253?
uo=4", "artistId":909253, "amgArtistId":468749,
"primaryGenreName":"Rock", "primaryGenreId":21,
"radioStationUrl":"https://itunes.apple.
com/station/idra.909253"}]
}
var object = JSON.parse(res);
// Do something with object variable.
plain text
10. RESTful API
Q: How client & server talks to each other?
● protocol, standard
○ SOAP (Simple Object Access Protocol)
○ XML RPC
○ REST
13. RESTful API: REST
REST: Representational State Transfer
What is that?
The story begins with the invention of HTTP by
Sir Tim-Berners Lee.
CERN, Swiss, 1990
14. RESTful API: REST
● WEB is a place providing resources.
● the very first version of HTTP:
○ GET
● HTTP 1.0
○ GET, POST and HEAD
● HTTP 1.1
○ GET, POST, HEAD, OPTIONS, PUT, DELETE,
PATCH
15. RESTful API: Resources
A resource is an object with a type, associated
data, relationships to other resources,
http://restful-api-design.readthedocs.org/en/latest/scope.html
17. How Parse Works
Your Code
Parse SDK (黑箱)
產生HTTP請求 產生HTTP回應
Parse Cloud (RESTful API)
18. Cloud Code
Bring server programming back to Parse while
not entirely dealing with server logic, Awesome!
docs: https://parse.com/docs/cloud_code_guide
19. Cloud Code
All source code available on GitHub:
$ git clone https://github.com/pa4373/wp2014s_cloudcode_example.git
20. Use Cloud Code
Install command-line tool:
● OS X / Linux
○
○ python, curl is required. ( usually included in OS. )
● Windows
○ https://parse.com/downloads/windows/console/parse.zip
$ curl -s https://www.parse.com/downloads/cloud_code/installer.sh | sudo /bin/bash
21. Use Cloud Code
Setting up Cloud Code
# Create new cloud code folder containing basic files
$ parse new cloudcode_demo
Email: pa4373@gmail.com
Password: # You won’t see **** while typing, stop asking!
1: ParseStore
2: PeerEvaluation
3: cloudcode_demo
Select an App: 3
# You shall see all apps on Parse, select one to link with
$ cd cloudcode_demo # change into the folder newly created
22. Use Cloud Code
Q: What’s my password?
A: If you use Facebook, Google, GitHub to
login,
you might need to go to “Account” to manually
set your password.
23. Use Cloud Code
Basic folder structure
# let’s see what parse cloud deploy created for us
.
├── cloud
│ └── main.js
# This is where cloud code are stored.
├── config
│ └── global.json
# A JSON file telling Parse how to deploy your code,
# normally you don’t need to worry about it.
└── public
└── index.html
# Few static files you want Parse to host.
24. Use Cloud Code
Write the very first cloud code function:
Open main.js and add the following codes.
Parse.Cloud.define("hello", function(request, response) {
response.success("Hello world!");
// You need to include response.success/error in Cloud
Code indicating the end of the request, or the codes will
went wrong.
});
25. Use Cloud Code
Deploy to the cloud:
in the project directory, typing:
$ parse deploy
Uploading source files
Finished uploading files
New release is named v2 (using Parse JavaScript SDK v1.
2.18)
26. Use Cloud Code
Call the function we just wrote. (Client JS)
Parse.Cloud.run('hello', {}, {
success: function(result) {
window.alert(result);
// result is 'Hello world!'
},
error: function(error) {
}
});
28. Use Cloud Code
Cloud Code Dashboard
Files: Cloud Code (Live editing)
Logs: console.log (Great for debugging)
Scheduled Jobs: See queued jobs
Job Status: See job status
29. Use Cloud Code
Topic Covered Today:
● beforeSave, afterSave, beforeDelete, and
afterDelete
● Parse.Cloud.httpRequest
● Background Jobs
● Modules
● Settings for Development vs. Production
30. Use Cloud Code
beforeSave, afterSave, beforeDelete, and
afterDelete:
Act as a hook, allow developers to perform
some operations before CRUD.
31. Use Cloud Code
Change its value before the object is saved
on Parse.
Parse.Cloud.beforeSave("ExampleClass", function(request,
response) {
request.object.set("text", "Always the same.");
response.success();
});
32. Use Cloud Code
Save an object to Parse and retrieve its value.
(Client JS)
var ExampleClass = Parse.Object.extend("ExampleClass");
var example_object = new ExampleClass();
example_object.set('text', 'I don't believe it!');
example_object.save(null, {
success: function(object){
var text = object.get('text');
window.alert(text);
}, error: function(object){
}
});
35. Use Cloud Code
API in the example: iTunes API
Documentation: https://www.apple.
com/itunes/affiliates/resources/documentation/it
unes-store-web-service-search-api.html
API to use:
https://itunes.apple.com/search?
term=john+mayer
36. Use Cloud Code
https://itunes.apple.com/search?term=john+mayer
Parse.Cloud.httpRequest({
url: 'https://itunes.apple.com/search',
params: {
term: request.params.singer // request.params as the Query Object
},
success: function (httpResponse) {
var SongClass = Parse.Object.extend('SongClass');
var ResObj = JSON.parse(httpResponse.text);
var newlyCreatedObjList = ResObj.results.map(function (e) {
var object = new SongClass();
object.set('trackName', e['trackName']);
return object;
});
// Resolve multiple asynchronous save problem (When to send http response?)
Parse.Object.saveAll(newlyCreatedObjList, {
success: function (list) {
response.success(request.params.singer + " is awesome!");
},
error: {}
});
},
error: function (httpResponse) {
console.error('Request failed with response code ' + httpResponse.status);
}
});
37. Use Cloud Code
Let’s put it into our ‘Hello World’ cloud code
app!
Parse.Cloud.define("get", function(request, response) {
// Put codes shown on the last page here.
});
38. Use Cloud Code
Call the function we just wrote. (Client JS)
Parse.Cloud.run('get', {singer: 'John Mayer'}, {
success: function(result) {
window.alert(result);
// result is 'John Mayer is awesome'
},
error: function(error) {
}
});
42. Use Cloud Code
Background Jobs:
Let’s say: we want to run the codes on previous
example per hour, periodically.
43. Use Cloud Code
Background Jobs:
Define the jobs
Parse.Cloud.job("iTunesAPI", function(request, status) {
// Put the codes in the previous example here.
});
44. Use Cloud Code
Background Jobs:
Parse.Cloud.job("iTunesAPI", function(request, status) {
Parse.Cloud.httpRequest({
url: 'https://itunes.apple.com/search',
params: {
term: request.params.singer
},
success: function (httpResponse) {
var SongClass = Parse.Object.extend('SongClass');
var ResObj = JSON.parse(httpResponse.text);
var newlyCreatedObjList = ResObj.results.map(function(e){
var object = new SongClass();
object.set('trackName', e['trackName']);
return object;
});
Parse.Object.saveAll(newlyCreatedObjList, {
success: function(list){
status.success(request.params.singer+" is awesome!"); // status required for a function to
stop.
}, error: {}
});
},
error: function (httpResponse) {
console.error('Request failed with response code ' + httpResponse.status);
}
});
});
49. Use Cloud Code
Advanced: Write a web crawler using
Background Jobs, httpRequest
Programmers love API and web service.
The regular users don’t.
How to extract information from normal web
page?
53. Use Cloud Code
Parse doesn’t support modules written in C /
C++, exposed from JavaScript.
No magical package manager (i.e npm, to use).
TAT
Grab native javascript modules to cloud folder
and put var module = require('cloud/<module filename>'); in
your code.
54. Use Cloud Code
Grab https://github.com/isaacs/sax-js/blob/master/lib/sax.js
as sax.js in cloud folder.
Grab https://github.com/SamDecrock/node-
xmlreader/blob/master/xmlreader.js as xmlreader.js in
cloud folder.
Replace
var sax = require("sax"); with var sax = require("cloud/sax.js");
var saxparser = sax.parser(true); with var saxparser = sax.parser(false);
in xmlreader.js
https://parse.com/questions/htmlxml-parser-with-
xpath-on-cloud-code
55. Use Cloud Code
XPath: a way to describe element in a DOM tree,
ex: /html/body/div[3]/div/ul/li/div[2]/p[2]
a little bit like CSS selector
Using ‘inspect element’ to look up Xpath.
58. Use Cloud Code
Parse.Cloud.job("webpage_scraping", function(request, status) {
var xmlreader = require('cloud/xmlreader.js');
Parse.Cloud.httpRequest({
url: 'http://www.ericclapton.com/tour',
success: function (httpResponse) {
xmlreader.read(httpResponse.text, function(err, doc){
var arena = doc.HTML.BODY.DIV.at(1).DIV.at(0).DIV.at(2).DIV.at(0).DIV.at(2).
DIV.at(0).DIV.at(0).TABLE.at(0).TBODY.at(0).TR.at(1).TD.at(1).A.at(0).text();
///html/body/div[2]/div/div[3]/div/div[3]/div/div/table/tbody/tr[2]/td[2]/a
var ConcertArenaClass = Parse.Object.extend('ConcertArenaClass');
var obj = new ConcertArenaClass();
obj.set('arena', arena);
obj.save(null, {
success: function(obj){
status.success('arena saved.');
}, error: {}
});
});
},
error: function (httpResponse) {
console.error('Request failed with response code ' + httpResponse.status);
}
});
});
59. Use Cloud Code
var xmlreader = require('cloud/xmlreader.js');
xmlreader.read(httpResponse.text, function(err, doc){
var arena = doc.HTML.BODY.DIV.at(1).DIV.at(0).DIV.at(2).DIV.at(0).DIV.at(2).
DIV.at(0).DIV.at(0).TABLE.at(0).TBODY.at(0).TR.at(1).TD.at(1).A.at(0).text();
// XPath: /html/body/div[2]/div/div[3]/div/div[3]/div/div/table/tbody/tr[2]/td[2]/a
// Watch the index diffirence. (start from 0, start from 1 -> None)
});
61. Use Cloud Code
Technique: Hack AJAX page
Some web page content is powered by AJAX technique, use ‘Inspect Elemenet’
62. Use Cloud Code
Always try to find API before writing your
own crawler!
Be practical.
63. Use Cloud Code
Modules
Imagine you got the codes from your peer, with
10k+ LoC in there.
Are you ready to debug to die?
Or say, write every function by your own.
And you wishes you were dead.
64. Use Cloud Code
Modules
● Write your own module
● Cloud modules
● Use Third-party modules (Painful!)
65. Use Cloud Code
Modules
● Write your own module
var coolNames = ['Ralph', 'Skippy', 'Chip', 'Ned', 'Scooter'];
exports.isACoolName = function(name) {
return coolNames.indexOf(name) !== -1;
}
var name = require('cloud/name.js');
name.isACoolName('Fred'); // returns false
name.isACoolName('Skippy'); // returns true;
name.coolNames; // undefined.
cloud/name.js
cloud/main.js
There’s a global exports object.
66. Use Cloud Code
Modules
● Write your own module
● Cloud modules
○ https://www.parse.com/docs/cloud_modules_guide
● Use Third-party modules
○ Put pure js modules in your cloud directory, and use
‘var mod = require('cloud/name.js');’
67. Use Cloud Code
Settings for Development vs. Production
You got a app running for production,
but you also want to add some cool features,
what to do now?
Modify Production on the fly, dangerous and
stupid!
69. Use Cloud Code
Settings for Development vs. Production
Production App
Development App
Your Cloud Code
Project
70. Use Cloud Code
Settings for Development vs. Production
Link other apps to your project
# Link existing project to other apps, accessible via
alias ‘production’
$ parse add production
Email: pa4373@gmail.com
Password: # You won’t see **** while typing, stop asking!
1: ParseStore
2: PeerEvaluation
3: cloudcode_demo
4: cloudcode_demo_production
Select an App: 4
71. Use Cloud Code
Settings for Development vs. Production
Developing Cloud Code
# Deploy tool will monitor files change on fly and updated
to Parse server (No more deploy again)
$ parse develop <APP_NAME>
E2013-03-19:20:17:01.423Z] beforeSave handler in release
'v1' ran for GameScore with the input:
{"original": null, "update":{"score": 1337}}
and failed validation with Each GamesScore must have a
playerName
New release is named v58
I2013-03-19T20:17:10.343Z] Deployed v58 with triggers:
GameScore:
before_save
72. Use Cloud Code
Settings for Development vs. Production
Deploy Code to Production
$ parse deploy production
New release is named v2