SlideShare une entreprise Scribd logo
1  sur  7
Télécharger pour lire hors ligne
NSURLSESSION & NSSTREAM
Manjula Jonnalagadda
NSURLSESSION
• Introduced in iOS 7
• Meant for downloading & Upload HTTP content
• Highly asynchronous
• Highly configurable
• Use completion handler or delegate
TYPES OF SESSIONS
• Default sessions - Uses disk cache and store credentials
• Ephemeral session - Uses no cache and doesn't store
credentials
• Background session - Similar to default but uses separate
process
CONFIGURATION
• Private support for caches, support, cookies for single session
• Control cookie policies
• Control HTTPPipelining behavior
• Per-resource timeouts
• Minimum and maximum version ofTLS support
KINDS OFTASKS
• Data tasks - downloads data, does not save into file
• Download task - downloads and saves file into a file
• Upload task - send data probably a file
• Stream task -TCP data
COCOA CLASSES FOR
STREAMS
• NSStream
• NSInputStream
• Stream to read the data from
• NSOutputStream
• Stream to write data to
USING STREAMS
• Create Streams from Socket
• Open
• Implement a delegate to listen to the events

Contenu connexe

Tendances

Pulsar - flexible pub-sub for internet scale
Pulsar - flexible pub-sub for internet scalePulsar - flexible pub-sub for internet scale
Pulsar - flexible pub-sub for internet scaleMatteo Merli
 
Cassandra tech talk
Cassandra tech talkCassandra tech talk
Cassandra tech talkSatish Mehta
 
Apache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage ServiceApache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage ServiceSijie Guo
 
Monitoring Oracle SOA Suite
Monitoring Oracle SOA SuiteMonitoring Oracle SOA Suite
Monitoring Oracle SOA SuiteC2B2 Consulting
 
MongoDB Administration ~ Kevin Hanson
MongoDB Administration ~ Kevin HansonMongoDB Administration ~ Kevin Hanson
MongoDB Administration ~ Kevin Hansonhungarianhc
 
Crash course intro to cassandra
Crash course   intro to cassandraCrash course   intro to cassandra
Crash course intro to cassandraJon Haddad
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012Gluster.org
 
Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)MongoDB
 
Big data_hadoop_spark_kafka_nosql_training
Big data_hadoop_spark_kafka_nosql_trainingBig data_hadoop_spark_kafka_nosql_training
Big data_hadoop_spark_kafka_nosql_trainingKamal A
 
Ndb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_memNdb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_memmikaelronstrom
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic siteswpnepal
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high trafficRoshan Bhattarai
 
Ceph as storage for CloudStack
Ceph as storage for CloudStack Ceph as storage for CloudStack
Ceph as storage for CloudStack Ceph Community
 
Redis vs Infinispan | DevNation Tech Talk
Redis vs Infinispan | DevNation Tech TalkRedis vs Infinispan | DevNation Tech Talk
Redis vs Infinispan | DevNation Tech TalkRed Hat Developers
 
MongoDB Administration 20110922
MongoDB Administration 20110922MongoDB Administration 20110922
MongoDB Administration 20110922radiocats
 
Redis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Labs
 
Tokyo azure meetup #9 azure update, october
Tokyo azure meetup #9   azure update, octoberTokyo azure meetup #9   azure update, october
Tokyo azure meetup #9 azure update, octoberTokyo Azure Meetup
 

Tendances (20)

Pulsar - flexible pub-sub for internet scale
Pulsar - flexible pub-sub for internet scalePulsar - flexible pub-sub for internet scale
Pulsar - flexible pub-sub for internet scale
 
Cosmos db
Cosmos dbCosmos db
Cosmos db
 
Cache bonanza
Cache bonanzaCache bonanza
Cache bonanza
 
Cassandra tech talk
Cassandra tech talkCassandra tech talk
Cassandra tech talk
 
Couchbase
CouchbaseCouchbase
Couchbase
 
Apache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage ServiceApache BookKeeper: A High Performance and Low Latency Storage Service
Apache BookKeeper: A High Performance and Low Latency Storage Service
 
Monitoring Oracle SOA Suite
Monitoring Oracle SOA SuiteMonitoring Oracle SOA Suite
Monitoring Oracle SOA Suite
 
MongoDB Administration ~ Kevin Hanson
MongoDB Administration ~ Kevin HansonMongoDB Administration ~ Kevin Hanson
MongoDB Administration ~ Kevin Hanson
 
Crash course intro to cassandra
Crash course   intro to cassandraCrash course   intro to cassandra
Crash course intro to cassandra
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012
 
Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)Sharding with MongoDB (Eliot Horowitz)
Sharding with MongoDB (Eliot Horowitz)
 
Big data_hadoop_spark_kafka_nosql_training
Big data_hadoop_spark_kafka_nosql_trainingBig data_hadoop_spark_kafka_nosql_training
Big data_hadoop_spark_kafka_nosql_training
 
Ndb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_memNdb cluster 80_ycsb_mem
Ndb cluster 80_ycsb_mem
 
Roshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sitesRoshan Bhattarai: Scaling WordPress for high traffic sites
Roshan Bhattarai: Scaling WordPress for high traffic sites
 
Scaling wordpress for high traffic
Scaling wordpress for high trafficScaling wordpress for high traffic
Scaling wordpress for high traffic
 
Ceph as storage for CloudStack
Ceph as storage for CloudStack Ceph as storage for CloudStack
Ceph as storage for CloudStack
 
Redis vs Infinispan | DevNation Tech Talk
Redis vs Infinispan | DevNation Tech TalkRedis vs Infinispan | DevNation Tech Talk
Redis vs Infinispan | DevNation Tech Talk
 
MongoDB Administration 20110922
MongoDB Administration 20110922MongoDB Administration 20110922
MongoDB Administration 20110922
 
Redis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs TalksRedis Developers Day 2014 - Redis Labs Talks
Redis Developers Day 2014 - Redis Labs Talks
 
Tokyo azure meetup #9 azure update, october
Tokyo azure meetup #9   azure update, octoberTokyo azure meetup #9   azure update, october
Tokyo azure meetup #9 azure update, october
 

Similaire à Networking in iOS NSURLSession & NSStream

Flashy prefetching for high performance flash drives
Flashy prefetching for high performance flash drivesFlashy prefetching for high performance flash drives
Flashy prefetching for high performance flash drivesPratik Bhat
 
Linux Internet Servers. An overview of the Environment
Linux Internet Servers. An overview of the EnvironmentLinux Internet Servers. An overview of the Environment
Linux Internet Servers. An overview of the Environmentjuliuskimuli78
 
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013it-people
 
Systems administration for coders presentation
Systems administration for coders presentationSystems administration for coders presentation
Systems administration for coders presentationMatt Willsher
 
Developing a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsDeveloping a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsCeph Community
 
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010Jason Ragsdale
 
Network latency - measurement and improvement
Network latency - measurement and improvementNetwork latency - measurement and improvement
Network latency - measurement and improvementMatt Willsher
 
Practical examples of using extended events
Practical examples of using extended eventsPractical examples of using extended events
Practical examples of using extended eventsDean Richards
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
Spectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSpectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSandeep Patil
 
Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Trishali Nayar
 
Managing Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchManaging Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchJoe Alex
 

Similaire à Networking in iOS NSURLSession & NSStream (20)

Flashy prefetching for high performance flash drives
Flashy prefetching for high performance flash drivesFlashy prefetching for high performance flash drives
Flashy prefetching for high performance flash drives
 
Linux Internet Servers. An overview of the Environment
Linux Internet Servers. An overview of the EnvironmentLinux Internet Servers. An overview of the Environment
Linux Internet Servers. An overview of the Environment
 
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
Александр Соловьев "Cassandra in-e commerce". Выступление на Cassandra conf 2013
 
Cassandra in e-commerce
Cassandra in e-commerceCassandra in e-commerce
Cassandra in e-commerce
 
Systems administration for coders presentation
Systems administration for coders presentationSystems administration for coders presentation
Systems administration for coders presentation
 
Meetup 25/04/19: Big Data
Meetup 25/04/19: Big Data Meetup 25/04/19: Big Data
Meetup 25/04/19: Big Data
 
Developing a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure EnvironmentsDeveloping a Ceph Appliance for Secure Environments
Developing a Ceph Appliance for Secure Environments
 
Linux basics (part 2)
Linux basics (part 2)Linux basics (part 2)
Linux basics (part 2)
 
Freezer - Vietnam OpenStack Technical Meetup #12
Freezer - Vietnam OpenStack Technical Meetup #12Freezer - Vietnam OpenStack Technical Meetup #12
Freezer - Vietnam OpenStack Technical Meetup #12
 
Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010Caching: A Guided Tour - 10/12/2010
Caching: A Guided Tour - 10/12/2010
 
Network latency - measurement and improvement
Network latency - measurement and improvementNetwork latency - measurement and improvement
Network latency - measurement and improvement
 
dbaas-clone
dbaas-clonedbaas-clone
dbaas-clone
 
Practical examples of using extended events
Practical examples of using extended eventsPractical examples of using extended events
Practical examples of using extended events
 
Qts 4.2 presentation
Qts 4.2 presentationQts 4.2 presentation
Qts 4.2 presentation
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 
HDFS Basics
HDFS BasicsHDFS Basics
HDFS Basics
 
Spectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSpectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN Caching
 
Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...
 
Managing Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using ElasticsearchManaging Security At 1M Events a Second using Elasticsearch
Managing Security At 1M Events a Second using Elasticsearch
 
Hazelcast 101
Hazelcast 101Hazelcast 101
Hazelcast 101
 

Networking in iOS NSURLSession & NSStream

  • 2. NSURLSESSION • Introduced in iOS 7 • Meant for downloading & Upload HTTP content • Highly asynchronous • Highly configurable • Use completion handler or delegate
  • 3. TYPES OF SESSIONS • Default sessions - Uses disk cache and store credentials • Ephemeral session - Uses no cache and doesn't store credentials • Background session - Similar to default but uses separate process
  • 4. CONFIGURATION • Private support for caches, support, cookies for single session • Control cookie policies • Control HTTPPipelining behavior • Per-resource timeouts • Minimum and maximum version ofTLS support
  • 5. KINDS OFTASKS • Data tasks - downloads data, does not save into file • Download task - downloads and saves file into a file • Upload task - send data probably a file • Stream task -TCP data
  • 6. COCOA CLASSES FOR STREAMS • NSStream • NSInputStream • Stream to read the data from • NSOutputStream • Stream to write data to
  • 7. USING STREAMS • Create Streams from Socket • Open • Implement a delegate to listen to the events