Example: HTTP Client Server

I can use an HTTP client running on a PC to control the lights at home. This example shows an HTTP client running on a home lighting control board has been configured to monitor a lighting control website running on an Internet web server to determine if lights should be on or off.

I browse to the same lighting control webpage being monitored by the lighting control board, enter my username and password, and now have the ability to change the webpage. The next time the control board checks this webpage it will see the change and control the lights appropriately.

http_example.JPG

Example: HTTP Client and Server in the Same Local Host

A network host is usually either a client or a server but it is possible for a host to be both. Let’s see an example of this.

My control board may also have an HTTP Server running concurrently with the client. This could be used to serve a simple setup and configuration web page which would allow me to change the website and log-in information the HTTP client uses to check for lighting control updates.

http_cs.JPG

Example: Local Network HTTP Server

If you do have an HTTP server running on your embedded device, it could also be used to actually control the device.
This would allow you to eliminate the HTTP client application and Internet web server. At first this may appear to be the best solution, but looks can be deceiving.

This is probably the easiest solution if the HTTP client is running on the same local network as the lighting control board. Unfortunately, this is not very common.

http_s.JPG

The ability to control the lights, or anything else from a remote location over the internet is a more likely and useful scenario. Accessing a web server on a local network from the Internet can be done, but it’s not a trivial task. Deciding where to locate a web server must be carefully considered.

20th Annual
Microchip MASTERs Conference 2016
Register now - Deadline: July 29

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.