Real-time Chat Backend on AWS IoT 20160422
-
Upload
akitsukada -
Category
Technology
-
view
2.033 -
download
3
Transcript of Real-time Chat Backend on AWS IoT 20160422
1
Real-time Chat Backendon AWS IoT
Amazon Web Services Solutions Architect
Akihiro Tsukada @akitsukada
8
Simple, Scalable, Extensible
client
mobile client
AmazonCognito
// <iOS> // Connect to Cognito
func application(application: UIApplication, didFinishLaunchingWithOptionslaunchOptions: [NSObject: AnyObject]?) -> Bool {
AWSLogger.defaultLogger().logLevel = .Verbose
// Initialize AWSlet credentialsProvider = AWSCognitoCredentialsProvider(
regionType: .APNortheast1,identityPoolId: CognitoIdentityPoolIdForTokyo)
let configuration = AWSServiceConfiguration(region: .APNortheast1,credentialsProvider: credentialsProvider)
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration= configuration
return true}
9
AWS IoT
Simple, Scalable, Extensible
IoTtopic
client
mobile client
AmazonCognito
// Subscribe to TopiciotDataManager.connectUsingWebSocketWithClientId(NSUUID().UUIDString, cleanSession: true) { (mqttStatus:AWSIoTMQTTStatus) -> Void in
switch mqttStatus {case .Connected:
self.iotDataManager.subscribeToTopic(TopicName,qos: 0,messageCallback:
{ (data:NSData!) -> Void in// received!
})
default:print(mqttStatus.rawValue)
} }
// Send messageiotDataManager.publishString(textField.text, onTopic: TopicName)
10
AWS IoT
Simple, Scalable, Extensible
IoTtopic
client
mobile client
AmazonCognito
IoTrule
RuleActions
ex)SELECT * FROM 'Test/Topic’WHERE temperature > 75
11
AWS IoT
Simple, Scalable, Extensible
IoTtopic
client
mobile client
AmazonCognito
IoTrule
AmazonDynamoDB
Amazon CloudWatch
AWSLambda
AmazonS3
Amazon Kinesis
AmazonSQS
AmazonSNS
alarm
Amazon Elasticsearch
Service
RuleActions
ex)SELECT * FROM 'Test/Topic’WHERE temperature > 75
IoTtopic
12
AWS IoT
Simple, Scalable, Extensible
IoTtopic
client
mobile client
AmazonCognito
IoTrule
AmazonDynamoDB
Amazon CloudWatch
AWSLambda
AmazonS3
Amazon Kinesis
AmazonSQS
AmazonSNS
alarm
Amazon Elasticsearch
Service
RuleActions
ex)SELECT * FROM 'Test/Topic’WHERE temperature > 75
Mobile Push
IoTtopic
15
http://www.slideshare.net/AmazonWebServicesJapan/aws-summit-chicago-2016
Over 10 new features @ AWS Summit Chicago !!