Yadda tsarin dandalin Facebook yake (4)
Ga karashen takaitattun bayanai kan gina shafukan intanet da ake wa lakabi da LAMP: PHPCikakken lafazin PHP shi ne: Hypertedt Preprocessor, kuma daya ne daga cikin dabarun gina shafukan Intanet masu sauki da inganci. Duk wanda ya saba mu’amala da fasahar Intanet shekaru masu yawa, zai ga da bambanci tsakanin shafukan Intanet da ya saba […]
Ga karashen takaitattun bayanai kan gina shafukan intanet da ake wa lakabi da LAMP:
PHP
Cikakken lafazin PHP shi ne: Hypertedt Preprocessor, kuma daya ne daga cikin dabarun gina shafukan Intanet masu sauki da inganci. Duk wanda ya saba mu’amala da fasahar Intanet shekaru masu yawa, zai ga da bambanci tsakanin shafukan Intanet da ya saba gani da kuma shafukan Facebook da yake mu’amala da su a kullum. Domin shafukan Facebook suna da dabi’u masu dimbin yawa na iya mu’amala da mai ziyara a shafin. Idan ba ka sani ba, sai ka dauka kamar wani ne ke zaune, musamman, don yin mu’amala da masu ziyara a shafin facebook, a duk sadda suka nemi bayanai, ko suka bukaci shiga ko fita daga shafinsu. Domin shafukan Facebook suna sauyawa a dukkan kowace dakika guda, muddin wani canji ko sauyi ya samu a cikinsu, ba sa jiran sai wani mutum ya sarrafa su kafin su sauya. Kamar yadda suke iya fahimtar da wace irin na’urar kake shiga shafinka, ko a ina kake, ko kuma da wane lokaci kake shiga; duk shafukan facebook na lura da kai ta hanyar dabarun da ke dauke a cikinsu. Haka idan kana da wata dabi’a ta musamman wajen mu’amala da mutane, misali kana yawan aika musu sakonni, ko kana yawan neman abokai barkatai ba tare da ka’ida ba, ko kana yawan shiga shafukan mutane da leke-leke, duk suna lura da kai, kuma suna aikawa da bayanai gamsassu kan dabi’unka. Daga lokacin da suka fahimci ka cika wasu sharudda na mutumin da aka ce musu su tuhume shi, to nan take sai su hana ka shiga, sai ka gaya musu waye kai. Ire-iren wadannan abubuwa ba wani ba ne ke zaune yake yinsu, a’a, shafukan ne ke aiwatar da su, sanadiyyar tsarin gini da aka yi musu. To, wannan gini kuwa ya samu ne ta sanadiyyar dabarun gina shafukan Intanet mai suna PHP.
Wadannan su ne muhimman manhajoji ko masarrafai da hukumar Facebook ta fara amfani da su a karon farko wajen alkinta bayanan masu ziyara da masu shafuka a dandalinsu. To amma kamar yadda bayanai suka gabata a baya, a yanzu an samu ci gaba wajen yawa da tsari da kuma hanyoyin da masu ziyara ke bi wajen ziyarta ko mu’amala da juna a wannan dandali nasu. Samuwar haka ne ya sake samar da wani yanayi mai cike da kalubale ga hukumar wannan dandali. Saboda yawaitar masu ziyara, da yawaitar masu bude shafi a dukkan dakika ko minti na duniya, da kuma yawaitar masu neman bayanai a wannan dandali.
Taruwar wadannan abubuwa ko al’amura, ya sa wannan tsari nasu na farko mai dauke da hadakar manhajoji masu inganci da ake kira da suna LAMP (LINUd, da APACHE, da MYSkL, da kuma PHP) ya fara gazawa. Domin kariya da tsaron bayanai ya fara ta’azzara gare su. Inganci da tsari wajen samar da bayanai ga masu ziyara ya fara wahala gare su. Sannan an fara samun tsaiko mai girman gaske wajen tsawaitar lokaci ko tazarar lokacin da shafi ke budowa ko bayanai ke samuwa idan mai ziyara ya tambaya. Wadannan abubuwa ba karamar barazana ba ne ga hukumar Facebook, musamman ganin cewa akwai kamfanoni da dama da suke da kwantiragin tallace-tallace tsakaninsu da su. Don haka hukumar Facebook ta fara neman wasu hanyoyi don ninka tsarin tsaro da kariya ga bayanai, da kuma sawwake tazarar lokacin bukatar samuwar bayanai ga masu ziyara. Daga cikin hanyoyin da suka samar akwai:
MEMCACHE
A baya, bayani ya gabata cewa hukumar Facebook na amfani ne da manyan kwamfutoci masu damfara-damfaran mizani ko ma’adana, daga ciki har da masu dauke da ma’adanar wucin-gadi (RAM). Sannan mun sanar da cewa akwai kwamfutocin da ke dauke da kwafaffun bayanai, wadanda masu ziyara ke yawan bukatarsu. Idan suka neme su a karon farko, manhajar da suka yi amfani da ita kan je zuwa babbar ma’adanar kwamfutar da ke dauke da bayanan ne kai tsaye, kamar yadda muka bayar da misali da ma’adanar banki a baya. To amma da zarar sun sake bukatar wadannan bayanai a karo na biyu, akwai wata kwamfuta da aka ajiye ta, mai lura da mu’amalar jama’a wajen neman bayanai, sai nan take ta kwafi wadannan bayanai ta adana su a ma’adanarta. Amma asalinsu na can babbar ma’adana. Idan ka sake bukatarsu sai kawai ta mika maka su, saboda rage doguwar tafiya daga inda kake zuwa babbar ma’adana. Ita a tsakiya take. Wannan tsari shi ake kira “Caching” a ilmin fannin kwamfuta. Hakan kuwa ba ya yiwuwa sai da samuwar wata masarrafa ko manhaja ta musamman (Special Software/Application) wacce za ta rika kwafo wadannan bayanai da ka bukata a karon farko, da fahimtar alakar da ke tsakanin masu bayanan da ta kwafo da su kansu, sannan ta iya mika maka su a duk sadda ka bukace su. Wannan masarrafa ita ake kira “MEMCACHE”, daga kalmomin “Memory” ne da “Caching.”
Hukumar Facebook ta samar da wannan tsari ne don rage tazarar lokacin bukatar bayanai, da sawwake tsarin taskance bayanai, da rage wa babbar ma’adanar kwamfutocin da ke kauke da asalin bayanai lodi, don samun inganci da kariya ga bayanan su karan kansu. Daga wannan tsari na “Memory Caching” ne ta samar da wata manhajar Tambaya (Search Application) mai suna “Graph Search.” Ga duk wanda yake shiga shafin Facebook ta kwamfuta, da zarar ya shiga shafinsa, daga sama kadan zai ga wata ’yar kafar neman bayanai, wadda a cikinta aka rubuta: “Search people, places and things.” Wannan ita ce masarrafar da ake kira “Graph Search.” Cikakken bayani kanta na nan tafe, in Allah Ya so.
Bayan wannan masarrafa ta musamman, akwai kokari da hukumar Facebook ke yi, a halin yanzu ko suka yi, wajen kara wa wannan rumbun bayanai nasu tagomashi da armashi da kuma saukin mu’amala ga masu ziyara. Suna hakan ne ta amfani da wasu shahararrun dabarun gina manhajar kwamfuta da suka yi fice a duniyar fannin kimiyyar kwamfuta. Wadannan dabarun gina manhajar kwamfuta kuwa su ne: C++ (C Plus Plus), da Jaba, da Python, da kuma Ruby. Wadannan su ake kira “Programming Langugaes” ko in ce wasu daga cikinsu. Suna amfani da wadannan dabaru ne wajen gina wasu manhajoji da za su taimaka wajen aiwatar da wadancan ayyuka da bayaninsu ya gabata.
Mahjaja ta farko mai suna “Thrift,” babbar manhaja ce, wacce za ta maye gurbin manhajar ka’idar sadarwar Intanet da bayaninta ya gabata, wato manhajar APACHE ke nan. Suna amfani da wadannan dabarun gina manhaja don kayatar da wannan masarrafa ta Thrift, don ta kara inganta tsarin ka’idar sadar da bayanai na Intanet.
Manhaja ta biyu mai suna “Scribe,” masarrafa ce da ke aikin taskance bayanai don taimaka wa mai ziyara samunsu ta hanyar kwamfutar da ke dauke da su ba tare da ya koma babbar ma’adanar da aka dauko su ba, kamar yadda bayani ya gabata. Wannan tana cikin tsarin MEMCACHE da bayaninsa ya gabata a baya.
Manhaja ta uku mai suna “Cassandra,” babban aikinta shi ne taskance bayanan masu ziyara ko masu shafi a Facebook a rumbun adana bayanai. Ita ce za ta maye gurbin manhajar MYSkL da bayaninta ya gabata a baya. Babbar manhaja ce da galibin manyan kamfanonin duniya ke amfani da ita don aiwatar da wannan aiki na taskance bayanai da nemo su cikin sauki. Kamar yadda kuka sani, dandalin Facebook wata duniya ce mai zaman kanta. Tana dauke da mambobi sama da biliyan daya da miliyan dari biyu a halin yanzu.
Sai manhaja ta karshe mai suna “HipHop,” wacce suke amfani da ita wajen kayatar da manhajar PHP da bayani ya gabata a kanta. Idan mai karatu bai mance ba, wannan manhaja ta PHP ana amfani da ita ne wajen ginawa da tsara shafukan Intanet masu inganci kuma masu dauke da kariya ko tsaro.
Wadannan, a takaice, su ne tanade-tanaden da hukumar Facebook ke yi wajen samar da shafuka masu inganci, da hanyoyin taskance bayanai masu dauke da kariya, da kuma sawwake hanyoyin neman bayanai don hada alaka a tsakanin mutane, wanda shi ne babbar manufar samar da wannan dandali.