SlideShare a Scribd company logo
INTERNET OF THINGS
TYBSC IT- SEM V
UNIT III
Ms. Arti Gavas
Assistant Professor,
Anna Leela College of Commerce & Eco., Shobha Jayaram Shetty College
for BMS, Kurla
CHAPTER 6:
PROTOTYPING THE PHYSICAL DESIGN
• PREPARATION
• SKETCH, ITERATE, AND EXPLORE
• NONDIGITAL METHODS
• LASER CUTTING
• CHOOSING A LASER CUTTER
• SOFTWARE
• HINGES AND JOINTS
• 3D PRINTING
• TYPES OF 3D PRINTING
• SOFTWARE
• CNC MILLING
• REPURPOSING/RECYCLING
PREPARATION
SKETCH, ITERATE, AND EXPLORE
• All you need to do is develop an interest in the world around.
• You and start paying attention to the wealth of objects and experiences that you
encounter.
• As you go, collect details about the items that inspire you.
• Take photos, jot down things in your notebook, or sketch them out.
• your first idea is unlikely to be the best, so you should be optimising for speed of
iteration rather than quality of prototype.
• You could iterate through designs with a 3D printer, but doing so with a pen and
paper is much quicker.
• Use whatever tools make most sense to help with the idea generation and
exploration.
• Over time you’ll build up an archive of good design that will help you spark your
NONDIGITAL METHODS
One of the key advantages that these techniques have
over the newer digital fabrication methods is their
immediacy. Three-dimensional printing times are
often measured in hours.
• Modeling clay
• Epoxy putty
• Sugru
• Toy construction sets
• Cardboard
• Foamcore or foamboard
• Extruded polystyrene
LASER CUTTING
• Laser cutters range from desktop models to industrial units which can take a
full 8' by 4' sheet in one pass.
• Most commonly, though, they are floor-standing and about the same size as
a large photocopier.
• Most of the laser cutter is given over to the bed; this is a flat area that holds
the material to be cut.
• The bed contains a two-axis mechanism with mirrors and a lens to direct the
laser beam to the correct location and focus it onto the material being cut.
• The computer controls the two-axis positioning mechanism and the power of
the laser beam.
CHOOSING A LASER CUTTER
Two main features to consider:
• The size of the bed:
• This is the place where the sheet of material sits while it’s being cut, so a larger bed can cut
larger items.
• A larger bed allows you to buy material in bigger sheets (which is more cost effective), and if
you move to small-scale production, it would let you cut multiple units in one pass.
• The power of the laser:
• More powerful lasers can cut through thicker material.
• Depending on what you’re trying to create, you can cut all sorts of different materials in a laser
cutter.
• You are able to get laser cutters which can cut metal, they tend to be the more powerful and
industrial units.
• The lower-powered models don’t cut through the metal; and worse, as the shiny surface of
many metals does an excellent job of reflecting the laser beam, you run a real risk of
SOFTWARE
• The file formats or software which you need to use to provide your design vary across machines and providers.
• Although some laser-cutting software will let you define an engraving pattern with a bitmap, typically you use some
type of vector graphics format.
• Vector formats capture the drawing as a series of lines and curves, which translate much better into instructions
for moving the laser cutter than the grid-like representation of a bitmap.
• With a bitmap, as you might have seen if you’ve ever tried blowing up one small part of a digital photo, the details
become jagged as you zoom in closely, whereas the vector format knows that it’s still a single line and can redraw
it with more detail.
• CorelDRAW is a common choice for driving the laser cutters themselves, and you can use it to generate the
designs too.
• Other popular options are Adobe Illustrator, as many designers already have a copy installed and are familiar
with driving it.
• The best choice is the one you’re most comfortable working with, or failing that, either the one your laser cutter
HINGES AND JOINTS
• Lattice (or Living) Hinges
• To introduce some curves into your design.
• A series of closely laid-out cuts, perpendicular to the direction of the curve, allows the material
to be bent after it has been cut.
• Varying the number of cuts and their separation affects the resulting flexibility of the hinge.
• Integrated Elastic Clips
• This jointing technique is used in situations similar to a through mortise-and- tenon joint, when
joining two sheets of material at 90 degrees.
• The tenon is replaced with two hooks for holding the mortise sheet tight to the tenon sheet
without any need for glue or additional fixings.
• Bolted Tenon (or T-Slot) Joints
• It is a modified version of the standard mortise-and-tenon joint which adds a T- or
crossshaped slot to the tenon sheet, with the crossbar of the T or cross being just big enough
to hold a nut.
3D PRINTING
• The term additive manufacturing is used because all the various processes which
can be used to produce the output start with nothing and add material to build up the
resulting model.
• This is in contrast to subtractive manufacturing techniques such as laser cutting ,
where you start with more material and cut away the parts you don’t need.
• We have three-dimensional computer model as the input.
• The software slices the computer model into many layers, each a fraction of a
millimeter thick, and the physical version is built up layer by layer.
• It can produce items which wouldn’t be possible with traditional techniques.
• For example, because you can print interlocking rings without any joins, you are
able to use the metal 3D printers to print entire sheets of chain-mail which come out
of the printer already connected together
TYPES OF 3D PRINTING
• Fused filament fabrication (FFF): Also known as fused deposition
modeling (FDM).
• https://youtu.be/6lCIx33Uaz0 (Youtube link)
• It works by extruding (Plastics extrusion is a high-volume manufacturing process in
which raw plastic is melted and formed into a continuous profile. ) a fine filament of
material (usually plastic) from a heated nozzle.
• The nozzle can be moved horizontally and vertically by the controlling computer, as
can the flow of filament through the nozzle.
• The resulting models are quite robust, as they’re made from standard plastic.
TYPES OF 3D PRINTING
• Laser sintering
• This process is sometimes called selective laser sintering (SLS), electron beam
melting (EBM), or direct metal laser sintering (DMLS).
• It is used in more industrial machines but can print any material which comes in
powdered form and which can be melted by a laser.
• It provides a finer finish than FDM, but the models are just as robust, and they’re
even stronger when the printing medium is metal.
• This technique is used to print aluminium or titanium, although it can just as easily
print nylon.
TYPES OF 3D PRINTING
• Laminated object manufacturing (LOM)
• This is another method which can produce full-colour prints.
• LOM uses traditional paper printing as part of the process.
• Because it builds up the model by laminating many individual sheets of paper
together, it can print whatever colours are required onto each layer before cutting
them to shape and gluing them into place.
TYPES OF 3D PRINTING
• Stereo-lithography and digital light processing
• Both approaches build their models from a vat (tank) of liquid polymer resin
(adhesive) which is cured (refers to the toughening or hardening of a polymer
material by cross-linking of polymer chains, brought about by electron beams, heat,
or chemical additives.) by exposure to ultraviolet light.
• Stereolithography uses a UV laser to trace the pattern for each layer, whereas digital
light processing uses a DLP projector to cure an entire layer at a time.
• The resultant models are produced to a fine resolution.
SOFTWARE
• If you are already familiar with one 3D design program, see whether it can export files in the correct format for the machine you’ll use
to print.
• Working out how to design items in three dimensions through a two dimensional display isn’t trivial, so it’s more important
than usual to work through the tutorials for the software you choose.
• Tinkercad (http://tinkercad.com) and Autodesk’s 123D Design Online (http://www.123dapp.com/design) are two
options which just run in your web browser.
• Application takes an array of photos of an object and automatically converts them into a 3D model.
• SolidWorks (http://www.solidworks.com) and Rhino (http:// www.rhino3d.com) are the industry-standard
commercial offerings.
• In the open source camp, the main contenders are OpenSCAD (http://www.openscad.org) and FreeCAD
(http://free-cad.sourceforge.net).
• When you have your design ready, you need a further piece of software to convert it into a set of instructions which will be fed to the
printer.
• This is usually known as the slicing algorithm because its most important function is to carve the model into a series of
layers and work out how to instruct the printer to build up each layer.
• Skeinforge was the first slicing software used by the open source printers, but it has been largely overtaken by
CNC MILLING
• Computer Numerically Controlled (CNC) milling is similar to 3D printing but is a subtractive
manufacturing process rather than additive.
• A computer controls the movement of the milling head, much like it does the extruder in an FDM
3D printer.
• However, rather than building up the desired model layer by layer from nothing, it starts with a
block of material larger than the finished piece.
• It cuts away the parts which aren’t needed—much like a sculptor chips away at a block of stone to
reveal the statue, except that milling uses a rotating cutting bit (similar to an electric drill)
• Because cutting away material is easier, CNC mills can work with a much greater range of
materials than 3D printers can.
• CNC mills can also be used for more specialized (but useful when prototyping electronic devices)
tasks, such as creating custom printed circuit boards.
• The CNC mills away lines from the metal surface on the board, leaving the conductive paths.
WIDE RANGE OF CNC MILLS
• Sizes range from small mills which will fit onto your desktop through to much larger
machines with a bed size measured in meters.
• The challenges of accurately moving the carriage around increase with their size.
• Beyond size and accuracy, the other main attribute that varies among CNC mills is
the number of axes of movement they have:
• 2.5 axis: This type has three axes of movement—X, Y, and Z—it can move only any two at
one time.
• 3 axis: Like the 2.5-axis machine, this machine has a bed which can move in the X and Y
axes, and a milling head that can move in the Z. • However, it can move all three at the same
time
• 4 axis: This machine adds a rotary axis to the 3-axis mill to allow the piece being milled to be
rotated around an extra axis, usually the X (this is known as the A axis).
• 5 axis: This machine adds a second rotary axis—normally around the Y— which is known as
the B axis.
SOFTWARE
• As with 3D printing, the software you use
for CNC milling is split into two types:
• CAD (Computer-Aided Design) software
lets you design the model.
• CAM (Computer-Aided Manufacture)
software turns that into a suitable
toolpath—a list of co-ordinates for the CNC
machine to follow which will result in the
model being revealed from the block of
material.
REPURPOSING/RECYCLING
• As with the other elements of building your connected device, a complete continuum exists from
buying-in the item or design through to doing-it yourself.
• So, just as you wouldn’t think about making your own nuts and bolts from some iron ore,
sometimes you should consider reusing more complex mechanisms or components.
• One reason to reuse mechanisms or components would be to piggyback onto someone else’s
economies of scale.
• If sections or entire subassemblies that you need are available in an existing product, buying those
items can often be cheaper than making them inhouse.
• If the final design requires processes with massive up-front costs or the skills of a designer that you
don’t have the funds to hire right now, maybe a product already exists that is near enough to work
as a proxy.
• That lets you get on with taking the project forwards, ending up at a point.
• And, of course, it doesn’t have to be a finished item that you reuse.
CHAPTER 7:
PROTOTYPING ONLINE COMPONENTS
• API
• MASHING UP APIS
• SCRAPING
• LEGALITIES
• WRITING A NEW API
• CLOCKODILLO
• SECURITY
• IMPLEMENTING THE API
• GOING FURTHER
• REAL TIME REACTIONS
• POLLING AND CONNECT
• OTHER PROTOCOLS
• MQTT
• EXTENSIBLE MESSEGING AND PRESENCE PROTOCOL
• CONSTRAINED APPLICATIO PROTOCOL
API & MASHING UP APIS
• The most important part of a web service, with regards to an Internet of
Things device, is the Application Programming Interface, or API.
• An API is a way of accessing a service that is targeted at machines rather
than people.
• Perhaps the data you want is already available on the Internet but in a form
that doesn’t work for you?
• The idea of “mashing up” multiple APIs to get a result has taken off and can
be used to powerful effect.
API
• SCRAPING
• Screen scraping is the process of collecting screen display data from one
application and translating it so that another application can display it.
• In many cases, companies or institutions have access to fantastic data but don’t
want to or don’t have the resources or knowledge to make them available as an API.
• This is normally done to capture data from a legacy application in order to display it
using a more modern user interface.
• LEGALITIES
• Screen-scraping may break the terms and conditions of a website.
• For example, Google doesn’t allow you to screen-scrape.
• Alternative sources of information often are available.
• For example, you could use OpenStreetMap instead of Google Maps.
WRITING A NEW API: POMODORO
(CLOCODILLO)
• You plan to assemble the data from free or licensed material you have and process it.
• The process of building your own API is explained with an example project, Clockodillo.
• This is an Internet of Things device that Hakim (Author of Designing of Internet of Things) built to help
him use the Pomodoro time management technique
• The technique uses a timer to break down work into intervals, traditionally 25 minutes in length,
separated by short breaks.
• These intervals are named pomodoros, the plural in English of the Italian word pomodoro (tomato)
(the tomato-shaped kitchen timer).
• connecting the kitchen-timer to the Internet to make the tracking easier while keeping the simplicity of
the physical twist-to-set timer for starting the clock and showing progress as it ticks down.
• Clockodillo is an Internet-connected task timer.
• The user can set a dial to a number of minutes, and the timer ticks down until completed.
• It also sends messages to an API server to let it know that a task has been started, completed, or
SECURITY
• How important security is depends a lot on how sensitive the information being
passed is and whether it’s in anyone’s interest to compromise it.
• For Clockodillo, perhaps a boss might want to double-check that employees are
using the timer.
• Or a competitor might want to check the descriptions of tasks to spy what your
company is working on.
• Or a competitor might want to disrupt and discredit the service by entering fake
data.
• If the service deals with health or financial information, it may be an even more
attractive target.
• Location information is also sensitive; burglars might find it convenient to know
SECURITY: CLOCKODILLO CASE
• The request has to pass details to identify the
user, which is the problem of identity; that is,
the application needs to know for which user to
create the timer so that the user can retrieve
information about it later.
• But the application should also authenticate
that request.
• A password is “good enough” authentication for
something that isn’t hypersensitive.
• You have to consider the risks in sending the
identification or authentication data over the
Internet
• If the username and password are in “clear
text”, they can be read by anyone who is
SECURITY: TWO SCENARIOS
• Someone who is targeting a specific user and has access to that person’s wired or (unencrypted) wireless
network.
• This attacker could read the details and use them (to create fake timers or get information about the user).
• Someone who has access to one of the intermediate nodes.
• This person won’t be targeting a specific device but may be looking to see what unencrypted data passes by, to see what will
be a tempting target.
• If a software password is compromised, a website can easily provide a way of changing that password.
• But while a computer has a monitor and keyboard to make that task easy, an Internetconnected device may
not.
• So you would need a way to configure the device to change its password—for example, a web control panel
hosted on the server or on the device itself.
• This solution is trickier (and does require the machine to have local storage to write the new password to).
• One obvious solution to the problem of sending cleartext passwords would be to encrypt the whole request,
including the authentication details.
SECURITY: CLOCKODILLO CASE (REVISED)
STANDARDS TO CONSIDER FOR
IMPLEMENTING THE API
• An API defines the messages that are sent from client to server and from
server to client.
• You can send data in whatever format you want, but it is almost always
better to use an existing standard because convenient libraries will exist for
both client and server to produce and understand the required messages.
• Here are a few of the most common standards that you should consider:
• 1) Representational State Transfer (REST):
• Access a set of web URLs using HTTP methods such as GET and POST.
• The result is often XML or JSON but can often depend on the HTTP content-type
negotiation mechanisms.
STANDARDS TO CONSIDER FOR
IMPLEMENTING THE API
• 2) JSON-RPC:
• JavaScript Object Notation (JSON), is a way of formatting data so that it can be easily
exchanged between different systems.
• Remote Procedure Call (RPC) is a term to describe ways of calling programming code which
isn’t on the same computer as the code you are writing.
• Access a single web URL like http://timer. roomofthings.com/api/, passing a JSON string such
as
• {‘method’:’update’, ‘params’: [{‘timer-id’:1234,‘description’:’Writing API chapter for book’}], ‘id’:12 }.
• The return value would also be in JSON like {‘result’:’OK’, ‘error’:null, ‘id’:12}.
• 3) XML-RPC: This standard is just like JSON-RPC but uses XML instead of JSON.
• 4) Simple Object Access Protocol (SOAP):
• This standard uses XML for transport like XMLRPC but provides additional layers of
functionality, which may be useful for very complicated systems.
PARAMETERS TO CONSIDER ON A
PLATFORM FOR YOUR WEB BACK END
• What do you already know (if you are
planning to develop the code yourself)?
• What is the local/Internet recruiting market
like (if you are planning to outsource)?
• Is the language thriving? Is it actively
developed? Does it have a healthy
community (or commercial support)? Is
there a rich ecosystem of libraries
available?
• Ex: Back-end Code in Perl
PARAMETERS TO CONSIDER ON A
PLATFORM FOR YOUR WEB BACK END
• Ex: USING CURL TO TEST
• While you’re developing the API, and
afterwards, to test it and show it off,
you need to have a way to interact
with it.
• You could create the client to interface
with it at the same time.
• Curl simply makes an HTTP request
and prints out the result to a terminal.
GOING FURTHER : API RATE LIMITING
• If the service becomes popular, managing the number of connections to the site
becomes critical.
• Setting a maximum number of calls per day or per hour or per minute might be
useful.
• You could do this by setting a counter for each period that you want to limit.
• Then the authentication process could simply increment these counters and fail if
the count is above a defined threshold.
• The counters could be reset to 0 in a scheduled cron job.
• Software application can easily warn users that their usage limit has been exceeded
and they should try later.
GOING FURTHER : INTERACTION VIA HTML
• The API currently serializes the output only in JSON, XML, and Text formats.
• You might also want to connect from a web browser. Not every Internet of Things product needs a browser
application.
• Perhaps the API is all you need, with maybe a static home page containing some documentation about how to
call the API.
• Drawbacks:
• Although web browsers do speak HTTP, they don’t commonly communicate in all the methods.
• Web browsers don’t commonly support PUT and DELETE.
• They support only GET and POST.
• As a solution we can “tunnel” the requests through a POST.
• There is a convention in Perl to use a field called x-tunneled-method, which you could implement like this:
GOING FURTHER : DESIGNING A WEB APPLICATION
FOR HUMANS
• Figure shows a static login page.
• This page is entirely for the convenience of a
human.
• All the labels like “Your email address” and the
help text like “Remember your password is case
sensitive” are purely there to guide the user.
• The logo is there as a branding and visual look
and feel for the site.
REAL-TIME REACTIONS
• To establish an HTTP request requires several round-trips to the server.
• There is the TCP “three-step handshake” consisting of a SYN (synchronise) request
from the client, a SYN-ACK from the server to “acknowledge” the request, and finally an
ACK from the client.
• Although this process can be near instantaneous, it could also take a noticeable amount
of time.
• If you want to perform an action the instant that something happens on your board, you
may have to factor in the connection time.
• If the server has to perform an action immediately, that “immediately” could be nearly a
minute later, depending on the connection time.
• For example, with the task timer example, you might want to register the exact start time
from when the user released the dial, but you would actually register that time plus the
time of connection.
REAL-TIME REACTIONS: POLLING
• If you want the device or another client to respond immediately, how do you do that?
• You don’t know when the event you want to respond to will happen, so you can’t make the request to coincide with the data
becoming available.
• Consider these two cases:
• The WhereDial should start to turn to “Work” the moment that the user has checked into his office.
• The moment that the task timer starts, the client on the user’s computer should respond, offering the opportunity to type a
description of the task.
• The traditional way of handling this situation using HTTP API requests was to make requests at regular intervals. This is called
polling.
• You might make a call every minute to check whether new data is available for you.
• However, this means that you can’t start to respond until the poll returns.
• You could make this quicker, polling every 10 seconds, for example.
• But this would put load on the following:
• The server: If the device takes off, and there are thousands of devices, each of them polling regularly, you will have to scale
REAL-TIME REACTIONS: COMET
• Comet is an umbrella name for a set of technologies developed to get around the
inefficiencies of polling.
• Long Polling (Unidirectional)
• starts off with the client making a polling request as usual.
• However, unlike a normal poll request, in which the server immediately responds with an
answer, even if that answer is “nothing to report”, the long poll waits until there is
something to say.
• This means that the server must regularly send a keep-alive to the client to prevent the
Internet of Things device or web page from concluding that the server has simply timed
out.
• Long polling would be ideal for the case of WhereDial: the dial requests to know when
the next change of a user’s location will be.
OTHER PROTOCOLS: MQ TELEMETRY
TRANSPORT
• MQTT is a lightweight messaging protocol, designed specifically for
scenarios where network bandwidth is limited.
• It was developed initially by IBM but has since been published as an
open standard, and a number of implementations, both open and
closed source, are available, together with libraries for many different
languages.
• Rather than the client/server model of HTTP, MQTT uses a publish/
subscribe mechanism for exchanging messages via a message
broker.
• Rather than send messages to a pre-defined set of recipients,
senders publish messages to a specific topic on the message broker.
• Recipients subscribe to whichever topics interest them, and
whenever a new message is published on that topic, the message
broker delivers it to all interested recipients.
• This makes it much easier to do one-to-many messaging, and also
breaks the tight coupling between the client and server that exists in
HTTP.
EXTENSIBLE MESSAGING AND
PRESENCE PROTOCOL
• Another messaging solution is the Extensible Messaging and Presence
Protocol, or XMPP (http://xmpp.org).
• This is both a blessing and a curse: it is well understood and widely
deployed, but because it wasn’t designed explicitly for use in embedded
applications, it uses XML to format the messages.
• This choice of XML makes the messaging relatively verbose ("using more
words than necessary".) which could preclude (prevent from happening;
make impossible) it as an option for RAM-constrained microcontrollers.
CONSTRAINED APPLICATION PROTOCOL
• The Constrained Application Protocol (CoAP) is designed to solve the same classes of
problems as HTTP but, for networks without TCP.
• There are proposals for running CoAP over UDP, SMS mobile phone messaging.
• CoAP draws many of its design features from HTTP and has a defined mechanism to proxies
to allow mapping from one protocol to the other.
THANK YOU!
Ms. Arti Gavas
Assistant Professor,
Anna Leela College of Commerce & Eco., Shobha Jayaram Shetty College
for BMS, Kurla

More Related Content

PPTX
Internet of Things, TYBSC IT, Semester 5, Unit II
PPTX
Internet of Things, TYBSC IT, Semester 5, Unit IV
PDF
Prototyping the Physical Design_Internet of Things
PPTX
TYBSC IT PGIS Unit I Chapter I- Introduction to Geographic Information Systems
PDF
Business Models_Internet of Things (Part 02)
PDF
Prototyping Online Components(Part 02)_Internet of Things
PPTX
Associative memory network
PPTX
TYBSC IT PGIS Unit III Chapter II Data Entry and Preparation
Internet of Things, TYBSC IT, Semester 5, Unit II
Internet of Things, TYBSC IT, Semester 5, Unit IV
Prototyping the Physical Design_Internet of Things
TYBSC IT PGIS Unit I Chapter I- Introduction to Geographic Information Systems
Business Models_Internet of Things (Part 02)
Prototyping Online Components(Part 02)_Internet of Things
Associative memory network
TYBSC IT PGIS Unit III Chapter II Data Entry and Preparation

What's hot (20)

PPTX
Internet of Things, TYBSC IT, Semester 5, Unit V
PPTX
Calm technology
PDF
Business Models_Internet of Things (Part 01)
PDF
IoT Physical Servers and Cloud Offerings.pdf
PDF
Prototyping Embedded Devices_Internet of Things
PDF
Moving to Manufacture_Internet of Things (Part 02)
PPT
Smart note taker
PDF
Introduction to intel galileo board gen2
PDF
Moving to Manufacture_Internet of Things (Part 01)
PPTX
Zigbee Presentation
PDF
Unit 2 Smart Objects _IOT by Dr.M.K.Jayanthi.pdf
PDF
20 Latest Computer Science Seminar Topics on Emerging Technologies
PDF
Techiques for Writing Embedded Code_Internet of Things
PDF
Thinking About Prototyping_Internet of Things
PDF
Physical Design of IoT.pdf
PDF
Ethics_Internet of Things
PPTX
Neuromorphic computing
PDF
Prototyping Online Components(Part 01)_Internet of Things
PPTX
Positioning, pointing and drawing in Human computer Interaction
PDF
Fog Computing
Internet of Things, TYBSC IT, Semester 5, Unit V
Calm technology
Business Models_Internet of Things (Part 01)
IoT Physical Servers and Cloud Offerings.pdf
Prototyping Embedded Devices_Internet of Things
Moving to Manufacture_Internet of Things (Part 02)
Smart note taker
Introduction to intel galileo board gen2
Moving to Manufacture_Internet of Things (Part 01)
Zigbee Presentation
Unit 2 Smart Objects _IOT by Dr.M.K.Jayanthi.pdf
20 Latest Computer Science Seminar Topics on Emerging Technologies
Techiques for Writing Embedded Code_Internet of Things
Thinking About Prototyping_Internet of Things
Physical Design of IoT.pdf
Ethics_Internet of Things
Neuromorphic computing
Prototyping Online Components(Part 01)_Internet of Things
Positioning, pointing and drawing in Human computer Interaction
Fog Computing
Ad

Similar to Internet of Things, TYBSC IT, Semester 5, Unit III (20)

PDF
rapidprototyping-130214024311-phpapp01-140307000659-phpapp01.pdf
PPTX
3 D printing new 2015
PPTX
Rapid-prototyping ( mechanical )
PPTX
Rapid prototyping
PPTX
VINZOIOTDOFFEFEEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFFEEFFEC1.pptx
PPTX
DESIGN AND SIMULATION OF 3D PRINTING MACHINE IHP.pptx
PPTX
3d printing in prosthodontics K V G
PPTX
3D PRINTING
PPTX
3 d printing
PPTX
3d-printing-871-APjTyfn.pptx
PDF
3d Printing: History and Current Techniques
PPTX
3D printing ppt.pptx
PPTX
rapid prototyping ppt.pptx power point prsesntation
PPTX
3 d printing(lesson 1)
PPTX
Lect 2. Lean Manufacturing - 3d Printing.pptx
PPTX
3D Printing Concrete Building Constructions
PPTX
3D Printing Technology.pptx
PPTX
3D Printingg gtggtegggggggggggggggggggggggggggggggggggggg.pptx
PPTX
PPTX
Manufacturing
rapidprototyping-130214024311-phpapp01-140307000659-phpapp01.pdf
3 D printing new 2015
Rapid-prototyping ( mechanical )
Rapid prototyping
VINZOIOTDOFFEFEEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFFEEFFEC1.pptx
DESIGN AND SIMULATION OF 3D PRINTING MACHINE IHP.pptx
3d printing in prosthodontics K V G
3D PRINTING
3 d printing
3d-printing-871-APjTyfn.pptx
3d Printing: History and Current Techniques
3D printing ppt.pptx
rapid prototyping ppt.pptx power point prsesntation
3 d printing(lesson 1)
Lect 2. Lean Manufacturing - 3d Printing.pptx
3D Printing Concrete Building Constructions
3D Printing Technology.pptx
3D Printingg gtggtegggggggggggggggggggggggggggggggggggggg.pptx
Manufacturing
Ad

More from Arti Parab Academics (20)

PPTX
COMPUTER APPLICATIONS Module 4.pptx
PPTX
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
PPTX
COMPUTER APPLICATIONS Module 5.pptx
PPTX
COMPUTER APPLICATIONS Module 1 CAH.pptx
PPTX
COMPUTER APPLICATIONS Module 3.pptx
PPTX
COMPUTER APPLICATIONS Module 2.pptx
PPTX
Health Informatics- Module 5-Chapter 2.pptx
PPTX
Health Informatics- Module 5-Chapter 3.pptx
PPTX
Health Informatics- Module 4-Chapter 3.pptx
PPTX
Health Informatics- Module 3-Chapter 2.pptx
PPTX
Health Informatics- Module 4-Chapter 1.pptx
PPTX
Health Informatics- Module 4-Chapter 2.pptx
PPTX
Health Informatics- Module 3-Chapter 3.pptx
PPTX
Health Informatics- Module 5-Chapter 1.pptx
PPTX
Health Informatics- Module 3-Chapter 1.pptx
PPTX
Health Informatics- Module 2-Chapter 2.pptx
PPTX
Health Informatics- Module 1-Chapter 1.pptx
PPTX
Health Informatics- Module 2-Chapter 3.pptx
PPTX
Health Informatics- Module 2-Chapter 1.pptx
PPTX
Health Informatics- Module 1-Chapter 2.pptx
COMPUTER APPLICATIONS Module 4.pptx
COMPUTER APPLICATIONS Module 1 HPSY - Copy.pptx
COMPUTER APPLICATIONS Module 5.pptx
COMPUTER APPLICATIONS Module 1 CAH.pptx
COMPUTER APPLICATIONS Module 3.pptx
COMPUTER APPLICATIONS Module 2.pptx
Health Informatics- Module 5-Chapter 2.pptx
Health Informatics- Module 5-Chapter 3.pptx
Health Informatics- Module 4-Chapter 3.pptx
Health Informatics- Module 3-Chapter 2.pptx
Health Informatics- Module 4-Chapter 1.pptx
Health Informatics- Module 4-Chapter 2.pptx
Health Informatics- Module 3-Chapter 3.pptx
Health Informatics- Module 5-Chapter 1.pptx
Health Informatics- Module 3-Chapter 1.pptx
Health Informatics- Module 2-Chapter 2.pptx
Health Informatics- Module 1-Chapter 1.pptx
Health Informatics- Module 2-Chapter 3.pptx
Health Informatics- Module 2-Chapter 1.pptx
Health Informatics- Module 1-Chapter 2.pptx

Recently uploaded (20)

PDF
Empowerment Technology for Senior High School Guide
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
advance database management system book.pdf
PDF
Trump Administration's workforce development strategy
PPTX
Lesson notes of climatology university.
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Unit 4 Skeletal System.ppt.pptxopresentatiom
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Empowerment Technology for Senior High School Guide
Computing-Curriculum for Schools in Ghana
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Final Presentation General Medicine 03-08-2024.pptx
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Weekly quiz Compilation Jan -July 25.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
advance database management system book.pdf
Trump Administration's workforce development strategy
Lesson notes of climatology university.
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Unit 4 Skeletal System.ppt.pptxopresentatiom
Practical Manual AGRO-233 Principles and Practices of Natural Farming
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
A powerpoint presentation on the Revised K-10 Science Shaping Paper
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...

Internet of Things, TYBSC IT, Semester 5, Unit III

  • 1. INTERNET OF THINGS TYBSC IT- SEM V UNIT III Ms. Arti Gavas Assistant Professor, Anna Leela College of Commerce & Eco., Shobha Jayaram Shetty College for BMS, Kurla
  • 2. CHAPTER 6: PROTOTYPING THE PHYSICAL DESIGN • PREPARATION • SKETCH, ITERATE, AND EXPLORE • NONDIGITAL METHODS • LASER CUTTING • CHOOSING A LASER CUTTER • SOFTWARE • HINGES AND JOINTS • 3D PRINTING • TYPES OF 3D PRINTING • SOFTWARE • CNC MILLING • REPURPOSING/RECYCLING
  • 3. PREPARATION SKETCH, ITERATE, AND EXPLORE • All you need to do is develop an interest in the world around. • You and start paying attention to the wealth of objects and experiences that you encounter. • As you go, collect details about the items that inspire you. • Take photos, jot down things in your notebook, or sketch them out. • your first idea is unlikely to be the best, so you should be optimising for speed of iteration rather than quality of prototype. • You could iterate through designs with a 3D printer, but doing so with a pen and paper is much quicker. • Use whatever tools make most sense to help with the idea generation and exploration. • Over time you’ll build up an archive of good design that will help you spark your
  • 4. NONDIGITAL METHODS One of the key advantages that these techniques have over the newer digital fabrication methods is their immediacy. Three-dimensional printing times are often measured in hours. • Modeling clay • Epoxy putty • Sugru • Toy construction sets • Cardboard • Foamcore or foamboard • Extruded polystyrene
  • 5. LASER CUTTING • Laser cutters range from desktop models to industrial units which can take a full 8' by 4' sheet in one pass. • Most commonly, though, they are floor-standing and about the same size as a large photocopier. • Most of the laser cutter is given over to the bed; this is a flat area that holds the material to be cut. • The bed contains a two-axis mechanism with mirrors and a lens to direct the laser beam to the correct location and focus it onto the material being cut. • The computer controls the two-axis positioning mechanism and the power of the laser beam.
  • 6. CHOOSING A LASER CUTTER Two main features to consider: • The size of the bed: • This is the place where the sheet of material sits while it’s being cut, so a larger bed can cut larger items. • A larger bed allows you to buy material in bigger sheets (which is more cost effective), and if you move to small-scale production, it would let you cut multiple units in one pass. • The power of the laser: • More powerful lasers can cut through thicker material. • Depending on what you’re trying to create, you can cut all sorts of different materials in a laser cutter. • You are able to get laser cutters which can cut metal, they tend to be the more powerful and industrial units. • The lower-powered models don’t cut through the metal; and worse, as the shiny surface of many metals does an excellent job of reflecting the laser beam, you run a real risk of
  • 7. SOFTWARE • The file formats or software which you need to use to provide your design vary across machines and providers. • Although some laser-cutting software will let you define an engraving pattern with a bitmap, typically you use some type of vector graphics format. • Vector formats capture the drawing as a series of lines and curves, which translate much better into instructions for moving the laser cutter than the grid-like representation of a bitmap. • With a bitmap, as you might have seen if you’ve ever tried blowing up one small part of a digital photo, the details become jagged as you zoom in closely, whereas the vector format knows that it’s still a single line and can redraw it with more detail. • CorelDRAW is a common choice for driving the laser cutters themselves, and you can use it to generate the designs too. • Other popular options are Adobe Illustrator, as many designers already have a copy installed and are familiar with driving it. • The best choice is the one you’re most comfortable working with, or failing that, either the one your laser cutter
  • 8. HINGES AND JOINTS • Lattice (or Living) Hinges • To introduce some curves into your design. • A series of closely laid-out cuts, perpendicular to the direction of the curve, allows the material to be bent after it has been cut. • Varying the number of cuts and their separation affects the resulting flexibility of the hinge. • Integrated Elastic Clips • This jointing technique is used in situations similar to a through mortise-and- tenon joint, when joining two sheets of material at 90 degrees. • The tenon is replaced with two hooks for holding the mortise sheet tight to the tenon sheet without any need for glue or additional fixings. • Bolted Tenon (or T-Slot) Joints • It is a modified version of the standard mortise-and-tenon joint which adds a T- or crossshaped slot to the tenon sheet, with the crossbar of the T or cross being just big enough to hold a nut.
  • 9. 3D PRINTING • The term additive manufacturing is used because all the various processes which can be used to produce the output start with nothing and add material to build up the resulting model. • This is in contrast to subtractive manufacturing techniques such as laser cutting , where you start with more material and cut away the parts you don’t need. • We have three-dimensional computer model as the input. • The software slices the computer model into many layers, each a fraction of a millimeter thick, and the physical version is built up layer by layer. • It can produce items which wouldn’t be possible with traditional techniques. • For example, because you can print interlocking rings without any joins, you are able to use the metal 3D printers to print entire sheets of chain-mail which come out of the printer already connected together
  • 10. TYPES OF 3D PRINTING • Fused filament fabrication (FFF): Also known as fused deposition modeling (FDM). • https://youtu.be/6lCIx33Uaz0 (Youtube link) • It works by extruding (Plastics extrusion is a high-volume manufacturing process in which raw plastic is melted and formed into a continuous profile. ) a fine filament of material (usually plastic) from a heated nozzle. • The nozzle can be moved horizontally and vertically by the controlling computer, as can the flow of filament through the nozzle. • The resulting models are quite robust, as they’re made from standard plastic.
  • 11. TYPES OF 3D PRINTING • Laser sintering • This process is sometimes called selective laser sintering (SLS), electron beam melting (EBM), or direct metal laser sintering (DMLS). • It is used in more industrial machines but can print any material which comes in powdered form and which can be melted by a laser. • It provides a finer finish than FDM, but the models are just as robust, and they’re even stronger when the printing medium is metal. • This technique is used to print aluminium or titanium, although it can just as easily print nylon.
  • 12. TYPES OF 3D PRINTING • Laminated object manufacturing (LOM) • This is another method which can produce full-colour prints. • LOM uses traditional paper printing as part of the process. • Because it builds up the model by laminating many individual sheets of paper together, it can print whatever colours are required onto each layer before cutting them to shape and gluing them into place.
  • 13. TYPES OF 3D PRINTING • Stereo-lithography and digital light processing • Both approaches build their models from a vat (tank) of liquid polymer resin (adhesive) which is cured (refers to the toughening or hardening of a polymer material by cross-linking of polymer chains, brought about by electron beams, heat, or chemical additives.) by exposure to ultraviolet light. • Stereolithography uses a UV laser to trace the pattern for each layer, whereas digital light processing uses a DLP projector to cure an entire layer at a time. • The resultant models are produced to a fine resolution.
  • 14. SOFTWARE • If you are already familiar with one 3D design program, see whether it can export files in the correct format for the machine you’ll use to print. • Working out how to design items in three dimensions through a two dimensional display isn’t trivial, so it’s more important than usual to work through the tutorials for the software you choose. • Tinkercad (http://tinkercad.com) and Autodesk’s 123D Design Online (http://www.123dapp.com/design) are two options which just run in your web browser. • Application takes an array of photos of an object and automatically converts them into a 3D model. • SolidWorks (http://www.solidworks.com) and Rhino (http:// www.rhino3d.com) are the industry-standard commercial offerings. • In the open source camp, the main contenders are OpenSCAD (http://www.openscad.org) and FreeCAD (http://free-cad.sourceforge.net). • When you have your design ready, you need a further piece of software to convert it into a set of instructions which will be fed to the printer. • This is usually known as the slicing algorithm because its most important function is to carve the model into a series of layers and work out how to instruct the printer to build up each layer. • Skeinforge was the first slicing software used by the open source printers, but it has been largely overtaken by
  • 15. CNC MILLING • Computer Numerically Controlled (CNC) milling is similar to 3D printing but is a subtractive manufacturing process rather than additive. • A computer controls the movement of the milling head, much like it does the extruder in an FDM 3D printer. • However, rather than building up the desired model layer by layer from nothing, it starts with a block of material larger than the finished piece. • It cuts away the parts which aren’t needed—much like a sculptor chips away at a block of stone to reveal the statue, except that milling uses a rotating cutting bit (similar to an electric drill) • Because cutting away material is easier, CNC mills can work with a much greater range of materials than 3D printers can. • CNC mills can also be used for more specialized (but useful when prototyping electronic devices) tasks, such as creating custom printed circuit boards. • The CNC mills away lines from the metal surface on the board, leaving the conductive paths.
  • 16. WIDE RANGE OF CNC MILLS • Sizes range from small mills which will fit onto your desktop through to much larger machines with a bed size measured in meters. • The challenges of accurately moving the carriage around increase with their size. • Beyond size and accuracy, the other main attribute that varies among CNC mills is the number of axes of movement they have: • 2.5 axis: This type has three axes of movement—X, Y, and Z—it can move only any two at one time. • 3 axis: Like the 2.5-axis machine, this machine has a bed which can move in the X and Y axes, and a milling head that can move in the Z. • However, it can move all three at the same time • 4 axis: This machine adds a rotary axis to the 3-axis mill to allow the piece being milled to be rotated around an extra axis, usually the X (this is known as the A axis). • 5 axis: This machine adds a second rotary axis—normally around the Y— which is known as the B axis.
  • 17. SOFTWARE • As with 3D printing, the software you use for CNC milling is split into two types: • CAD (Computer-Aided Design) software lets you design the model. • CAM (Computer-Aided Manufacture) software turns that into a suitable toolpath—a list of co-ordinates for the CNC machine to follow which will result in the model being revealed from the block of material.
  • 18. REPURPOSING/RECYCLING • As with the other elements of building your connected device, a complete continuum exists from buying-in the item or design through to doing-it yourself. • So, just as you wouldn’t think about making your own nuts and bolts from some iron ore, sometimes you should consider reusing more complex mechanisms or components. • One reason to reuse mechanisms or components would be to piggyback onto someone else’s economies of scale. • If sections or entire subassemblies that you need are available in an existing product, buying those items can often be cheaper than making them inhouse. • If the final design requires processes with massive up-front costs or the skills of a designer that you don’t have the funds to hire right now, maybe a product already exists that is near enough to work as a proxy. • That lets you get on with taking the project forwards, ending up at a point. • And, of course, it doesn’t have to be a finished item that you reuse.
  • 19. CHAPTER 7: PROTOTYPING ONLINE COMPONENTS • API • MASHING UP APIS • SCRAPING • LEGALITIES • WRITING A NEW API • CLOCKODILLO • SECURITY • IMPLEMENTING THE API • GOING FURTHER • REAL TIME REACTIONS • POLLING AND CONNECT • OTHER PROTOCOLS • MQTT • EXTENSIBLE MESSEGING AND PRESENCE PROTOCOL • CONSTRAINED APPLICATIO PROTOCOL
  • 20. API & MASHING UP APIS • The most important part of a web service, with regards to an Internet of Things device, is the Application Programming Interface, or API. • An API is a way of accessing a service that is targeted at machines rather than people. • Perhaps the data you want is already available on the Internet but in a form that doesn’t work for you? • The idea of “mashing up” multiple APIs to get a result has taken off and can be used to powerful effect.
  • 21. API • SCRAPING • Screen scraping is the process of collecting screen display data from one application and translating it so that another application can display it. • In many cases, companies or institutions have access to fantastic data but don’t want to or don’t have the resources or knowledge to make them available as an API. • This is normally done to capture data from a legacy application in order to display it using a more modern user interface. • LEGALITIES • Screen-scraping may break the terms and conditions of a website. • For example, Google doesn’t allow you to screen-scrape. • Alternative sources of information often are available. • For example, you could use OpenStreetMap instead of Google Maps.
  • 22. WRITING A NEW API: POMODORO (CLOCODILLO) • You plan to assemble the data from free or licensed material you have and process it. • The process of building your own API is explained with an example project, Clockodillo. • This is an Internet of Things device that Hakim (Author of Designing of Internet of Things) built to help him use the Pomodoro time management technique • The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks. • These intervals are named pomodoros, the plural in English of the Italian word pomodoro (tomato) (the tomato-shaped kitchen timer). • connecting the kitchen-timer to the Internet to make the tracking easier while keeping the simplicity of the physical twist-to-set timer for starting the clock and showing progress as it ticks down. • Clockodillo is an Internet-connected task timer. • The user can set a dial to a number of minutes, and the timer ticks down until completed. • It also sends messages to an API server to let it know that a task has been started, completed, or
  • 23. SECURITY • How important security is depends a lot on how sensitive the information being passed is and whether it’s in anyone’s interest to compromise it. • For Clockodillo, perhaps a boss might want to double-check that employees are using the timer. • Or a competitor might want to check the descriptions of tasks to spy what your company is working on. • Or a competitor might want to disrupt and discredit the service by entering fake data. • If the service deals with health or financial information, it may be an even more attractive target. • Location information is also sensitive; burglars might find it convenient to know
  • 24. SECURITY: CLOCKODILLO CASE • The request has to pass details to identify the user, which is the problem of identity; that is, the application needs to know for which user to create the timer so that the user can retrieve information about it later. • But the application should also authenticate that request. • A password is “good enough” authentication for something that isn’t hypersensitive. • You have to consider the risks in sending the identification or authentication data over the Internet • If the username and password are in “clear text”, they can be read by anyone who is
  • 25. SECURITY: TWO SCENARIOS • Someone who is targeting a specific user and has access to that person’s wired or (unencrypted) wireless network. • This attacker could read the details and use them (to create fake timers or get information about the user). • Someone who has access to one of the intermediate nodes. • This person won’t be targeting a specific device but may be looking to see what unencrypted data passes by, to see what will be a tempting target. • If a software password is compromised, a website can easily provide a way of changing that password. • But while a computer has a monitor and keyboard to make that task easy, an Internetconnected device may not. • So you would need a way to configure the device to change its password—for example, a web control panel hosted on the server or on the device itself. • This solution is trickier (and does require the machine to have local storage to write the new password to). • One obvious solution to the problem of sending cleartext passwords would be to encrypt the whole request, including the authentication details.
  • 27. STANDARDS TO CONSIDER FOR IMPLEMENTING THE API • An API defines the messages that are sent from client to server and from server to client. • You can send data in whatever format you want, but it is almost always better to use an existing standard because convenient libraries will exist for both client and server to produce and understand the required messages. • Here are a few of the most common standards that you should consider: • 1) Representational State Transfer (REST): • Access a set of web URLs using HTTP methods such as GET and POST. • The result is often XML or JSON but can often depend on the HTTP content-type negotiation mechanisms.
  • 28. STANDARDS TO CONSIDER FOR IMPLEMENTING THE API • 2) JSON-RPC: • JavaScript Object Notation (JSON), is a way of formatting data so that it can be easily exchanged between different systems. • Remote Procedure Call (RPC) is a term to describe ways of calling programming code which isn’t on the same computer as the code you are writing. • Access a single web URL like http://timer. roomofthings.com/api/, passing a JSON string such as • {‘method’:’update’, ‘params’: [{‘timer-id’:1234,‘description’:’Writing API chapter for book’}], ‘id’:12 }. • The return value would also be in JSON like {‘result’:’OK’, ‘error’:null, ‘id’:12}. • 3) XML-RPC: This standard is just like JSON-RPC but uses XML instead of JSON. • 4) Simple Object Access Protocol (SOAP): • This standard uses XML for transport like XMLRPC but provides additional layers of functionality, which may be useful for very complicated systems.
  • 29. PARAMETERS TO CONSIDER ON A PLATFORM FOR YOUR WEB BACK END • What do you already know (if you are planning to develop the code yourself)? • What is the local/Internet recruiting market like (if you are planning to outsource)? • Is the language thriving? Is it actively developed? Does it have a healthy community (or commercial support)? Is there a rich ecosystem of libraries available? • Ex: Back-end Code in Perl
  • 30. PARAMETERS TO CONSIDER ON A PLATFORM FOR YOUR WEB BACK END • Ex: USING CURL TO TEST • While you’re developing the API, and afterwards, to test it and show it off, you need to have a way to interact with it. • You could create the client to interface with it at the same time. • Curl simply makes an HTTP request and prints out the result to a terminal.
  • 31. GOING FURTHER : API RATE LIMITING • If the service becomes popular, managing the number of connections to the site becomes critical. • Setting a maximum number of calls per day or per hour or per minute might be useful. • You could do this by setting a counter for each period that you want to limit. • Then the authentication process could simply increment these counters and fail if the count is above a defined threshold. • The counters could be reset to 0 in a scheduled cron job. • Software application can easily warn users that their usage limit has been exceeded and they should try later.
  • 32. GOING FURTHER : INTERACTION VIA HTML • The API currently serializes the output only in JSON, XML, and Text formats. • You might also want to connect from a web browser. Not every Internet of Things product needs a browser application. • Perhaps the API is all you need, with maybe a static home page containing some documentation about how to call the API. • Drawbacks: • Although web browsers do speak HTTP, they don’t commonly communicate in all the methods. • Web browsers don’t commonly support PUT and DELETE. • They support only GET and POST. • As a solution we can “tunnel” the requests through a POST. • There is a convention in Perl to use a field called x-tunneled-method, which you could implement like this:
  • 33. GOING FURTHER : DESIGNING A WEB APPLICATION FOR HUMANS • Figure shows a static login page. • This page is entirely for the convenience of a human. • All the labels like “Your email address” and the help text like “Remember your password is case sensitive” are purely there to guide the user. • The logo is there as a branding and visual look and feel for the site.
  • 34. REAL-TIME REACTIONS • To establish an HTTP request requires several round-trips to the server. • There is the TCP “three-step handshake” consisting of a SYN (synchronise) request from the client, a SYN-ACK from the server to “acknowledge” the request, and finally an ACK from the client. • Although this process can be near instantaneous, it could also take a noticeable amount of time. • If you want to perform an action the instant that something happens on your board, you may have to factor in the connection time. • If the server has to perform an action immediately, that “immediately” could be nearly a minute later, depending on the connection time. • For example, with the task timer example, you might want to register the exact start time from when the user released the dial, but you would actually register that time plus the time of connection.
  • 35. REAL-TIME REACTIONS: POLLING • If you want the device or another client to respond immediately, how do you do that? • You don’t know when the event you want to respond to will happen, so you can’t make the request to coincide with the data becoming available. • Consider these two cases: • The WhereDial should start to turn to “Work” the moment that the user has checked into his office. • The moment that the task timer starts, the client on the user’s computer should respond, offering the opportunity to type a description of the task. • The traditional way of handling this situation using HTTP API requests was to make requests at regular intervals. This is called polling. • You might make a call every minute to check whether new data is available for you. • However, this means that you can’t start to respond until the poll returns. • You could make this quicker, polling every 10 seconds, for example. • But this would put load on the following: • The server: If the device takes off, and there are thousands of devices, each of them polling regularly, you will have to scale
  • 36. REAL-TIME REACTIONS: COMET • Comet is an umbrella name for a set of technologies developed to get around the inefficiencies of polling. • Long Polling (Unidirectional) • starts off with the client making a polling request as usual. • However, unlike a normal poll request, in which the server immediately responds with an answer, even if that answer is “nothing to report”, the long poll waits until there is something to say. • This means that the server must regularly send a keep-alive to the client to prevent the Internet of Things device or web page from concluding that the server has simply timed out. • Long polling would be ideal for the case of WhereDial: the dial requests to know when the next change of a user’s location will be.
  • 37. OTHER PROTOCOLS: MQ TELEMETRY TRANSPORT • MQTT is a lightweight messaging protocol, designed specifically for scenarios where network bandwidth is limited. • It was developed initially by IBM but has since been published as an open standard, and a number of implementations, both open and closed source, are available, together with libraries for many different languages. • Rather than the client/server model of HTTP, MQTT uses a publish/ subscribe mechanism for exchanging messages via a message broker. • Rather than send messages to a pre-defined set of recipients, senders publish messages to a specific topic on the message broker. • Recipients subscribe to whichever topics interest them, and whenever a new message is published on that topic, the message broker delivers it to all interested recipients. • This makes it much easier to do one-to-many messaging, and also breaks the tight coupling between the client and server that exists in HTTP.
  • 38. EXTENSIBLE MESSAGING AND PRESENCE PROTOCOL • Another messaging solution is the Extensible Messaging and Presence Protocol, or XMPP (http://xmpp.org). • This is both a blessing and a curse: it is well understood and widely deployed, but because it wasn’t designed explicitly for use in embedded applications, it uses XML to format the messages. • This choice of XML makes the messaging relatively verbose ("using more words than necessary".) which could preclude (prevent from happening; make impossible) it as an option for RAM-constrained microcontrollers.
  • 39. CONSTRAINED APPLICATION PROTOCOL • The Constrained Application Protocol (CoAP) is designed to solve the same classes of problems as HTTP but, for networks without TCP. • There are proposals for running CoAP over UDP, SMS mobile phone messaging. • CoAP draws many of its design features from HTTP and has a defined mechanism to proxies to allow mapping from one protocol to the other.
  • 40. THANK YOU! Ms. Arti Gavas Assistant Professor, Anna Leela College of Commerce & Eco., Shobha Jayaram Shetty College for BMS, Kurla