Theory
Same Hostel, दो बार Drawn
पिछले lesson ने SmartHostel को physically drawn किया: यह sensor, वह cable, वे protocols।
अब brand names erase कीजिए और इसे फिर से draw कीजिए हर part क्या करता है इससे: कुछ sense करता है, कुछ carry करता है, कुछ serve करता है, कुछ guard करता है। वह दूसरी drawing logical design है: वह blueprint जो true रहता है भले ही कल हर physical part swap हो जाए।
इसके 2 halves हैं जिन्हें exam पसंद करता है: 6 functional blocks, और 4 shapes जो machines के बीच एक conversation ले सकता है।
At a glance
6 Functional Blocks
| Block | Job | SmartHostel Face |
|---|---|---|
| Device | Sense, actuate, monitor | Tank float, gas detector, gate motor |
| Communication | Blocks के बीच data carry करना | WiFi + MQTT machinery |
| Services | Monitoring, control, data publishing, discovery | Read-tank-level service; start-pump control |
| Management | System govern और configure करना | 20% threshold set करना; room 214 का sensor add करना |
| Security | Authentication, authorization, data protection | सिर्फ़ warden का login gate खोल सकता है |
| Application | User-facing interface | Dashboard और इसका red tank icon |
Theory
Machine Conversation के चार Shapes
Devices और servers 4 standard patterns में बात करते हैं, और सही एक pick करना एक design decision है जो syllabus directly test करता है:
- Request-Response: client पूछता है, server answer देता है, done: हर exchange independent है (stateless)
- Publish-Subscribe: senders एक broker पर topics को publish करते हैं; जो भी interested हो subscribe करता है: sender और receivers कभी नहीं मिलते
- Push-Pull: producers messages को queues में push करते हैं; consumers अपनी pace पर pull करते हैं: queue speed differences absorb करती है
- Exclusive Pair: exactly 2 parties के बीच ONE persistent, full-duplex, stateful connection, deliberately close होने तक open
Theory
चार तरीके Hostel पहले से बात करता है
Request-response warden के door पर एक question के साथ knock करना है: answered, door shut।
Publish-subscribe notice board है: mess menu pin करता है ("mess" topic को publish करता है); जिसे परवाह हो पढ़ता है: cook को कभी नहीं पता कौन देखता है।
Push-pull dhobi की basket है: residents कपड़े डालते हैं (push); dhobi इसे अपनी pace पर खाली करता है (pull): basket Monday के pile-up को absorb करता है।
Exclusive pair phone पर 2 friends हैं: line open held है, दोनों बात कर रहे हैं, जब तक कोई hang up न करे।
At a glance
4 Communication Models, Technically
| Model | Middleman | State | SmartHostel Use |
|---|---|---|---|
| Request-Response | कोई नहीं: direct ask-answer | हर exchange stateless | App server से पूछता है: current tank level? |
| Publish-Subscribe | Topics वाला BROKER | Broker subscriptions track करता है | Sensors hostel/tank publish करते हैं; dashboard + logger दोनों subscribe करते हैं |
| Push-Pull | Messages buffer करती QUEUE | Queue backlog hold करती है | Meter readings हर minute push होती हैं; analytics hourly pull करता है |
| Exclusive Pair | कोई नहीं: एक held line | पूरी तरह stateful connection | Guard की screen को live gate camera feed |
Quiz
Tank sensor की readings dashboard, data logger AND एक नई leak-detection service तक पहुँचनी चाहिए, बिना sensor को उनमें से किसी के exist करने का पता हुए। कौन सा communication model?
- Request-Response: हर service सीधे sensor से पूछती है
- Publish-Subscribe: sensor एक topic को publish करता है; सारे 3 broker पर subscribe करते हैं
- Exclusive Pair: sensor 3 permanent connections hold करता है
- Push-Pull: 3 services बारी-बारी pull करती हैं
Show the answer
Publish-Subscribe: sensor एक topic को publish करता है; सारे 3 broker पर subscribe करते हैं
एक source, कई independent listeners, mutual anonymity: यह exactly publish-subscribe का shape है: sensor hostel/tank/level को broker पर publish करता है और सो जाता है; broker इसे हर subscriber तक fan out करता है, और अगले महीने एक चौथा listener add करना sensor पर कुछ भी नहीं बदलता। Option A एक tiny device को 3 clients serve करने के लिए force करता है (और हर एक को poll करना पड़ता है)। Option C 3 held lines spend करता है जहाँ किसी की ज़रूरत नहीं: exclusive pair continuous 2-party streams के लिए है। Option D का queue हर message को ONE consumer को deliver करता है (workers jobs share करते हैं), सबको copies नहीं: pub-sub बनाम push-pull distinction जो exams probe करते हैं।
Think first
State पर कौन सा Model Odd One Out है?
4 models में से, एक end to end STATEFUL होने से defined है: connection खुद remember करता है। इसे name कीजिए, बताइए वहाँ stateful क्या खरीदता है, और इसे physical-design lesson के एक protocol से connect कीजिए। फिर tap कीजिए।
Show the answer
Exclusive pair: single held connection ही state है: दोनों ends जानते हैं line open है, कौन इस पर है, और क्या flow हुआ है: यही instant, no-handshake, full-duplex messaging BOTH directions में खरीदता है: live camera feed या एक real-time gate console के लिए perfect। इसका physical-design twin WebSocket है, exactly जैसे MQTT publish-subscribe embody करता है: logical models shapes हैं, protocols उनके implementations हैं। Request-response, इसके उलट, deliberately STATELESS है: हर exchange अकेला खड़ा है: cheap, simple, और design से forgetful।
Watch out
Logical-Design Slips
Blocks बनाम Layers: 6 functional blocks 4 architecture layers नहीं हैं: blocks FUNCTION से slice करते हैं, layers data की JOURNEY से: दो अलग diagrams, दोनों examinable।
Pub-Sub बनाम Push-Pull: topics copies को सारे subscribers तक fan out करते हैं; queues हर message को ONE puller को hand करती हैं: broadcast बनाम work-sharing।
Security को एक Block जो आप आख़िर में Mention करते हैं: यह सारे blocks (device से application तक) फैला है: cross-cutting कहिए और मानिए भी।
Theory
Unit 1 Close होती है: Frame बन गया
चार lessons में, आपके पास पूरा frame है: IoT क्या है (definition + 5 characteristics), एक reading कैसे travel करती है (4 layers), parts क्या हैं और क्या बोलते हैं (things + 3 protocol families), और conversations कैसे shaped हैं (6 blocks, 4 models)। बाकी हर unit इस frame पर details टाँगती है। Unit 2 IoT के older sibling से मिलकर शुरू होती है: M2M: और exam का favourite comparison पूछते हुए: internet ने exactly क्या add किया?
Summary
Key takeaways
- Logical design system को function से describe करता है, hardware choices से independent।
- Six functional blocks: device, communication, services, management, security (cross-cutting), application।
- Request-Response: stateless ask-answer, कोई middleman नहीं: web का shape।
- Publish-Subscribe: broker + topics; publisher और subscribers कभी नहीं मिलते: MQTT का shape: सारे subscribers को copies।
- Push-Pull: queues producer और consumer rates के बीच buffer करती हैं: हर message ONE puller को।
- Exclusive Pair: एक persistent, stateful, full-duplex line: WebSocket का shape।
- Memory hook: knock, notice board, dhobi basket, phone call।