asterroc: (xkcd - Binary Heart)
[personal profile] asterroc
I want to set up a webcam to remotely watch my bird. (Kappa's a camera whore.) I don't have a computer located near the cage so I want this to either wirelessly connect to my Mac, or wirelessly connect to my router. I want it to automatically upload one photo every five minutes (or some other interval) to some host or other (I'm looking for recommendations there too).

Is this possible? If so, how?

Date: 2008-05-27 04:46 pm (UTC)
From: [identity profile] sirroxton.livejournal.com
It uses TCP/IP.

There are four common protocols for sending files to another computer. The most common one is SMB. Windows Explorer (explorer.exe - your Windows GUI, not to be confused with Internet Explorer) uses SMB natively to save files to your network drive (H:). Whenever you browse \\computername\sharename, that's SMB. SMB runs on top of TCP/IP.

The other three are FTP, which you may be familiar with, SFTP which is file transfer over SSH, and HTTP POST, which is how you put images on flickr. All of these go over TCP/IP too.

FrontPage doesn't use any of these four methods. Now, there's probably some toolkit available on SourceForge.net that you can use to talk to a FrontPage Server without using FrontPage, but at that point we're really flexing our geek muscles. Probably doable, though.

Date: 2008-05-27 05:20 pm (UTC)
From: [identity profile] zandperl.livejournal.com
Oh! I get it now. Didn't realize the hierarchy of "languages". Of course every new thing I learn always makes me learn more. :)

* What if I'm using a Mac over a network in Finder, is that also SMB or is it another thing?
* Is reading files the same as writing them, for example how iTunes can read .mp3's on any computer on the network, whether Mac of Windows?

Date: 2008-05-27 05:51 pm (UTC)
From: [identity profile] sirroxton.livejournal.com
SMB is generally a Windows thing. OS X's Finder can use the SMB protocol to connect to Windows shares.

As for creating file shares on a Mac, I have to confess some degree of ignorance. OS X may create a SMB share for compatibility with Windows, but I imagine it would also expose the share using either AppleShare or AFP (Apple File Protocol). The BSD operating system on which OS X is based traditionally uses NFS, the Network File System protocol.

Most protocols for file handling let you read and write. A lot of service protocols do not. For example, HTTP lets you download files (web pages), but does not let you write files. (Actually, HTTP defines a "PUT" method, but it never works.) Likewise, iTunes lets you share your library over DAAP (Digital Audio Access Protocol), which will serve up MP3s, but it doesn't let you write. But yeah, DAAP is exactly the same whether it runs on a Mac or a PC.

Of course, you can also have iTunes grab music off of networked file shares.

You're right to put "language" in quotes, I was speaking colloquially. The proper term is "protocol." Pretty much every network protocol sits on top of TCP or UDP, which in turn sit on top of IP.

Date: 2008-05-27 07:08 pm (UTC)
From: [identity profile] zandperl.livejournal.com
Yep, you called it protocol which I did gather is the correct term. When I learn new concepts, especially ones as abstract as this conversation is turning out to be filled with, it helps me to rephrase it in more colloquial terms such as "language" or maybe "encryption" - I do this when I teach too, and I often get comments from students that it helps their understanding of the material.

But of course every model has flaws, and recognizing the flaws of your analogy is just as crucial to good understanding in the end as picking a decent analogy was in the first place. I'm thinking that calling a protocol a "language" may be implying more complexity to protocols than they really have; perhaps comparing different protocols to different encryption schemes would be more analogous?

But I hadn't realized that there were different protocols in the first place - I thought everything just used FTP. I even thought SSH/SFTP and HTML were subsets of FTP.

Date: 2008-05-27 08:33 pm (UTC)
From: [identity profile] sirroxton.livejournal.com
I love this stuff. I like explaining things because I learn how to communicate better. Plus it's nice to be helpful. :)

I think the word you're looking for is "encoding" not "encryption". "Encryption" implies that the data has been protected from prying eyes by a cryptographic algorithm. Encoding implies that information has been stored in some kind of predictable way.

You may have heard of ASCII, for example, which is a 7-bit encoding for Latin characters. (It's largely considered a bad encoding because it's an obstacle to internationalization, but that's neither here nor there.)

You usually wouldn't use the word "encoding" for more complicated file formats such as Word's doc format -- you'd use the word format. JPEG files are in JPEG format and contain JPEG-encoded image information.

The difference between an "encoding" and a "protocol" is that the protocol actually contains instructions that a service implementing that protocol must perform. For example, if a web server receives an HTTP message with a "GET" request in it, the web server is required to either deliver the document or give a 404 error. An encoding is just a way of storing and reading data -- it doesn't require you to *do* anything with that data.

I'll try to communicate the intuition of layered protocols.

IP is pretty dumb.

The header is basically an encoding of the following information:

"I'm version 4 of IP."
"My header is xx bytes long"
"If I travel through more than xx routers, please kill me because I'm lost!"
"The sum of all bytes in this packet modulus 2^16 should be 3F2B. Pretend I'm 0000 while doing the calculation. (checksum)"
"My data is xx bytes long"
"I'm coming from 64.1.2.3."
"Send me to 83.7.3.5."
"Oh, and here's some DATA. I have no idea what it is, but you can have it!"

That's pretty much it. No guarantees of delivery. No port number.

The TCP packet goes inside the data of the IP packet.

"I'm going to port 80"
"I'm coming from port 10837."
"I'm part of a larger message. I'm sequence number 3. If you get sequence number 4 before you get me, be sure to look at me first."
"My header is xx bytes long"
"Here's my checksum."
"My data is this long"
"Here's mah data. I don't know what it is, but here you go!"

There's other stuff in TCP, like, "Hey, can you chat?" "Yup, I can chat. Did you hear me?" "Yes, I heard you." "Could you resend sequence #2? I didn't get it."

An HTTP request goes inside the data segment of the TCP packet.

HTTP 1.1
GET /browse/product?id=93847
\n\n

The TCP packet will specify Port 80. A program on the web server has asked the operating system to hand over the data of every TCP packet that was received with a port 80 designation. The program will treat all TCP packets as if they contained HTTP requests, rejecting anything it doesn't understand.

Date: 2008-05-27 10:06 pm (UTC)
From: [identity profile] seekingferret.livejournal.com
This is interesting. When I learn something and when I teach something, I am very careful to use proper terminology. I don't want to learn something 'wrong' and then have to relearn it when I have a higher understanding. And I don't want people I'm teaching using colloquial terminology because it tends to lead to mistakes as concepts bleed together.

Actually, that's the thing I was most frustrated about with Number Theory at CTY. I learned the methodologies very well, and became good at thinking creatively about proofs and about mathematics in general. I did get a lot out of the course. But I don't know what the Chinese Remainder Theorem is, even though I'm fairly sure we learned it, because they had an in-joke name for it.

I mean, they had a reason for it- to show that the names were arbitrary and the mathematics were true no matter what you called it. But the fact is, there is a right name and in communicating with others you need to use the same terminology as them.

Date: 2008-05-27 10:59 pm (UTC)
From: [identity profile] zandperl.livejournal.com
In physics I use correct terminology by default and by default I do not use any analogies. These are good students, and in their future careers I agree it is important that they know the correct terminology.

In my gen ed science classes (astro, earth and space, physical science), if it's a concept that I feel is key to the subject matter (such as isotopes or inertia) I will start with the proper terminology and the scientific explanation, and then follow up with an analogy (such as car paint jobs for isotopes, or the Couch Potato Law for the law of inertia). Students in those classes have a hard time understanding the basic concepts w/o being able to relate it to something more familiar to their every day lives. The concepts may be important to them in later life, but the *names* of the concepts will likely not be.
Edited Date: 2008-05-27 11:00 pm (UTC)

Date: 2008-05-28 01:35 pm (UTC)
From: [identity profile] seekingferret.livejournal.com
Wait... you compare isotopes to car paint jobs? So students mentally categorize isotopes as things that are functionally the same but look a little different?

It's an analogy that will only take you so far. Consider Carbon-14, for example. If your student hears that Carbon-14 is radioactive, will they assume that all other Carbons are radioactive, too? Adding a neutron to an element does more to it than adding a new paint job.

Profile

asterroc

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425 26272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 9th, 2025 04:08 am
Powered by Dreamwidth Studios