Theory
Tank માં float થી pocket માં phone સુધી
SmartHostel નું પહેલું real installation: rooftop tank માં level sensor. Promise એ છે કે પાણી 20% કરતાં નીચે જાય ત્યારે warden ના phone પર ping આવે અને pump પોતે શરૂ થાય.
Tank માં float bobbing અને તેના pocket માં ping વચ્ચે એક JOURNEY છે: measurement, transmission, storage, judgement અને display. દરેક IoT system આ journey ને એકસરખી રીતે organize કરે છે, અને આ organization નું નામ છે જે દરેક exam પૂછે છે: IoT architecture.
Theory
Hostel mess, architecture તરીકે
Mess 200 students ને કેવી રીતે ખવડાવે છે તે વિચારો: FARM raw vegetables ઉગાડે છે; TEMPO એને kitchen સુધી લાવે છે; KITCHEN એને meals માં cook કરે છે; COUNTER દરેક student ને તેની plate serve કરે છે.
IoT એ જ રીતે stack થાય છે: sensors raw data ઉગાડે છે, network એને transport કરે છે, processing એને decisions માં cook કરે છે અને application એને humans ને serve કરે છે. કોઈ tempo માંથી raw brinjal ખાતું નથી; કોઈ wire પરના raw sensor voltages વાંચતું નથી.
At a glance
4-layer IoT architecture
| Layer | Job | SmartHostel example |
|---|---|---|
| 4. Application | User-facing services: dashboards, alerts, domain apps | 18% દેખાડતી અને ping કરતી warden ની app |
| 3. Data processing | Store, filter, analyse, decide (middleware/cloud) | એક અઠવાડિયાના readings; 20% નીચે એટલે alert + pump rule |
| 2. Network | Devices અને processing વચ્ચે data carry કરવો | Readings ને server સુધી લઈ જતું hostel WiFi |
| 1. Sensing / perception | Sensors measure કરે છે, actuators act કરે છે: raw data અહીં જન્મે છે | Tank માં float sensor; pump નો starter |
Theory
એક reading ઉપર trace કરો, એક command નીચે
Upward (data): float 18% measure કરે છે (sensing) → reading WiFi દ્વારા server સુધી જાય છે (network) → rule engine 18 ને 20 threshold સામે compare કરીને decide કરે છે: alert + refill (processing) → app red tank icon બતાવે છે અને ping કરે છે (application).
Downward (commands): warden Start pump tap કરે છે, અથવા rule આપમેળે fire થાય છે → command એ જ layers માં reverse direction માં નીચે જાય છે → sensing layer પરનો actuator pump switch on કરે છે.
Data ઉપર ચડે છે, commands નીચે ઉતરે છે: two-way traffic એ motion માં architecture છે.
Quiz
4-layer model માં "18% એ 20% થી નીચે છે, pump શરૂ કરો" એવો decision ખરેખર WHERE લેવાય છે?
- Sensing layer: float sensor decision લે છે
- Network layer: WiFi routers values compare કરે છે
- Data processing layer: stored readings અને rule logic અહીં મળે છે
- Application layer: phone app બધું thinking કરે છે
Show the answer
Data processing layer: stored readings અને rule logic અહીં મળે છે
Thinking એ processing layer નું મુખ્ય job છે: history, thresholds અને rules ત્યાં હોય છે, જે raw 18 ને refill decision માં ફેરવે છે. Sensor (option A) ફક્ત measure કરે છે; એને 20 special છે એની ખબર નથી. Network (option B) courier છે: એ carry કરે છે, વાંચતું નથી. App (option D) serving counter છે: decision DISPLAY કરે છે અને warden ના taps forward કરે છે. બધું logic phone માં મૂકો તો phone ન હોય ત્યારે pump પણ નહીં ચાલે. One-line exam answer: sensing measures, network carries, processing decides, application presents.
Think first
બીજા textbook નું 3-layer version
એક classmate ની guidebook માં માત્ર 3 layers છે: perception, network, application. શું તમારામાંથી કોઈ wrong છે? બંને models એકબીજા સાથે કેવી રીતે map થાય છે તે tap કરતાં પહેલાં work out કરો.
Show the answer
બંને standard છે: 3-layer model ફક્ત data processing ને application layer માં fold કરે છે, અથવા એને network અને application વચ્ચે middleware તરીકે ગણે છે. Perception = આપણું sensing layer; network = network; application = processing + presentation together. Exams બંને accept કરે છે IF તમે consistent હો અને mapping કહી શકો. Safest move: 4-layer model present કરો અને એક line ઉમેરો: કેટલાક texts processing ને application layer માં merge કરે છે, એટલે 3-layer view મળે છે. Models શા માટે અલગ છે, એટલે કે thinking boundary ક્યાં દોરવી, એ સમજવું કોઈ પણ diagram કરતાં વધારે કિંમતી છે.
Watch out
Architecture-answer slips
Layers ને parts list માનવી: Diagram JOURNEY વિશે છે: exam answer માં હંમેશાં એક reading ને upward trace કરો; examiners trace માટે marks આપે છે.
Downward direction ભૂલી જવી: Actuators માટે commands એ જ stack માં નીચે આવે છે; ફક્ત report કરતું architecture અડધું architecture છે.
Protocols ને wrong lesson માં મૂકવા: WiFi, MQTT અને friends network layer માં LIVE કરે છે, પરંતુ એનો family tour NEXT topic છે. અહીં layer નું job કહો, તેનો zoo નહીં.
Theory
Layered thinking transferable habit છે
તમે પહેલાં પણ layer-stacks મળ્યા છો અને ફરી મળશે: BCA103 નું hardware-OS-application stack, અને BCA502 (Networks) OSI model આપશે, જે આ જ idea ના 7 floors છે. Engineering payoff હંમેશાં એક જ છે: દરેક layer માત્ર neighbours સાથે વાત કરે છે, એટલે કોઈ પણ layer swap કરી શકાય (WiFi ને 4G થી, એક cloud ને બીજાથી) અને બાકીનું rebuild કરવું ન પડે. Next lesson layer 2 નું toolbox ખોલે છે: IoT નું physical design અને protocol families.
Summary
Key takeaways
- IoT architecture: sensing/perception, network, data processing, application: bottom થી top.
- Sensing measure અને act કરે છે; network carry કરે છે; processing store અને decide કરે છે; application present કરે છે.
- Data stack ઉપર ચડે છે, commands નીચે ઉતરે છે: answers માં બંને directions trace કરો.
- 3-layer variant processing ને application માં merge કરે છે: પૂછાય તો mapping કહો.
- Decisions processing layer માં રહે છે, sensor અથવા courier માં ક્યારેય નહીં.
- Layer independence થી tower rebuild કર્યા વગર કોઈપણ floor swap કરી શકાય છે.
- Memory hook: farm, tempo, kitchen, counter.