TechShift: There’s light beyond LAMP

1,802 views

Published on

Whilst LAMP continues to be a strong force in web-app development, there is also a new breed of technologies that are being used to build the next generation of hugely scalable applications. This presentation will share experiences using these new technologies to handle broadcast-sized audiences and the dynamics of TV viewing.

This session will cover how “The Cloud“ and HTML5 provide an excellent infrastructure for building large scale applications. It will look at some of the technologies that support rapid, scalable development including big data store Cassandra, cloud deployment platform Chef, and building best-of-breed single-page HTML5 applications running on multiple devices using Backbone.js.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,802
On SlideShare
0
From Embeds
0
Number of Embeds
84
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

TechShift: There’s light beyond LAMP

  1. TechShift: There’slight beyond LAMPStephen TallamyNew Initiatives, NDS
  2. ?
  3. typedef const struct { int mode; // 0 for I/O, 1 for in only -1 for out only unsigned char volatile *addr; // address unsigned char volatile *ddr;}port; // direction regport PortJ={ 0, (unsigned char volatile *)(0x0028), (unsigned char volatile *)(0x0029)};int MakeOutput(port *ppt){ if(ppt->mode==1) return 0; // input only if(ppt->mode==-1) return 1; // OK, output only (*ppt->ddr)=0xff; // make output return 1;}int MakeInput(port *ppt){ if(ppt->mode==-1) return 0; // output only if(ppt->mode==1) return 1; // OK, input only (*ppt->ddr)=0x00; // make input return 1;}unsigned char Input(port *ppt){ return (*ppt->addr);}void Output(port *ppt, unsigned char data){ (*ppt->addr)=data;}void main(void){ unsigned char MyData; MakeInput(&PortJ);
  4. Photo by George Rex.
  5. Light beyond LAMP
  6. Light beyond LAMP
  7. Page jQuery AjaxLinux Apache PHP MySQL
  8. Kafka
  9. Keyspace ( ~ Schema ) Column Family ( ~ Table ) Row ( ~ Table Row) Row Column ( ~ Table Cell ) Key Name Value Time
  10. 7pm 8pm
  11. Schedule[BBC1-2012-10-16@1900][title] = The ONE Show Column Value Column Name Column Family Row Key
  12. Schedule[BBC1-2012-10-16@1900][title] = The ONE ShowSchedule[BBC1-2012-10-16@1900][genre] = NewsSchedule[BBC1-2012-10-16@1930][title] = Cash BritainSchedule[BBC1-2012-10-16@2000][title] = EastEndersSchedule[BBC1-2012-10-16@2000][genre] = Drama
  13. title genreBBC1-2012- The ONE News10-16@1900 Show titleBBC1-2012- Cash10-16@1930 Britain title genreBBC1-2012- EastEnders Drama10-16@2000
  14. 7pm 8pm
  15. Schedule[BBC1-2012-10-16][1900] ={"title": "The ONE Show", "genre": "News"}Schedule[BBC1-2012-10-16][1930] ={"title": "Cash Britain"}Schedule[BBC1-2012-10-16][2000] ={"title": "EastEnders", "genre": "Drama"}
  16. Column Range Slice 1900 1930 2000BBC1- {"title": {"title": {"title":2012-10- "The ONE "Cash "EastEnde16 Show", Britain", rs", "genre": "genre": "genre": "News"} "Document "Drama"} ary"}
  17. 7pm 8pm
  18. 20,000,000 data points/day250,000 viewersViewing Activity Simulator Real Time NoSQL Data Store Computation Cluster
  19. Channels Channel ViewTemplate TemplateChannels Channel Controller / View View Presenter Channel Channel ModelCollection Model
  20. define([ Channel backbone Model],function(Backbone) { return Backbone.Model.extend({ getLogo: function() { return this.get(logo); }, getNowImage: function() { … }, getNowTitle: function() { … }, });});
  21. Channel Collectiondefine([ backbone, models/channel],function(Backbone,Channel) { return Backbone.Collection.extend({ model: Channel, url: http://api.com/channels.json });});
  22. define([ Channel underscore, View backbone, text!templates/channel.html],function(_,Backbone,template) { return Backbone.View.extend({ render: function() { var html = _.template(template, this.model); this.setElement(html); return this; } });});
  23. Channel Template<li class="channel" style="background-image: url( <%= model.getNowImage() %>)"> <img src="<%= model.getLogo() %>"/> <span class="title"> <%= model.getNowTitle() %> </span></li>
  24. Channelsinitialize: function() { View this.collection.bind(add, this.add, this);},add : function(item) { var view = new ChannelView({ model : item }); this.$el.append(view.render().el);}
  25. initialize: function() { this.collection.bind(add, this.add, this);},finalize : function() { this.collection.off(undefined, undefined, this);}
  26. -webkit-transform:translate3d(250px, 0px, 0px);opacity: 0.99;$(#myDiv).append();
  27. $(#myDiv).stop().animate( {property: 450}, {duration: 500, step: function(pos) { $(this).css(-webkit-transform, translate3d(+(pos)+px, 0px, 0px)); }}); vs-webkit-transition: -webkit-transform 500ms;$(#myDiv).css(-webkit-transform, translate3d(450px, 0px, 0px));
  28. The Modern JavaScript Application Andrew Appleton 15:10 – 15:50 – Porter Tun Stage
  29. Cookbook Recipe Resource Attributes Templates
  30. - cookbooks - mybook - attributes knife - recipes - templates Chef client Chef client
  31. # Install nginx packagepackage "nginx"# Register nginx as a serviceservice "nginx" do supports :status => true, :restart => true, :reload => true action :enableend# Set up nginx configtemplate"/etc/nginx/conf.d/default.conf" do source "default.conf.erb" owner "root" group "root"
  32. Ironfan.cluster fowa do cloud(:ec2) do availability_zones [eu-west-1a] flavor m1.small image_name base_ami end facet :web do instances 2 recipe "web_server" cloud do security_group :HTTP_PUBLIC end end facet :cassandra do
  33. [me@chef]$ knife cluster show fowa+-------------------------+-------+-------------+------------+| Name | Chef? | State | InstanceID |+-------------------------+-------+-------------+------------+| fowa-web-0 | no | not running | || fowa-web-1 | no | not running | || fowa-cassandra-0 | yes | running | i-1234abcd || fowa-cassandra-1 | yes | running | i-5678defa || fowa-loadTest-0 | yes | stopped | i-9123bcde |+-------------------------+-------+-------------+------------+[me@chef]$ knife cluster launch fowa-web--bootstrap+-------------------------+-------+-------------+------------+| Name | Chef? | State | InstanceID |+-------------------------+-------+-------------+------------+| fowa-web-0 | yes | running | i-4567fabc || fowa-web-1 | yes | running | i-8901defa || fowa-cassandra-0 | yes | running | i-1234abcd || fowa-cassandra-1 | yes | running | i-5678defa |
  34. +-------------------------+-------+-------------+------------+| Name | Chef? | State | InstanceID |+-------------------------+-------+-------------+------------+| fowa-web-0 | yes | running | i-4567fabc || fowa-web-1 | yes | running | i-8901defa || fowa-cassandra-0 | yes | running | i-1234abcd || fowa-cassandra-1 | yes | running | i-5678defa || fowa-loadTest-0 | yes | stopped | i-9123bcde |+-------------------------+-------+-------------+------------+[me@chef]$ git pull[me@chef]$ knife cookbook upload mybook[me@chef]$ knife cluster kick fowa-web-0[me@chef]$ knife cluster kick fowa-web[me@chef]$ knife cluster stop fowa
  35. Kafka
  36. Light beyond LAMP
  37. @StephenTallamy

×