Yonke imihla, umzuzu ngamnye ngexesha lomsebenzi wethu wobunjineli, sidibana neengxaki ezininzi ezahlukeneyo zobunzima kunye neemeko apho kufuneka senze isigqibo okanye sisihlehlise ngenxa yokunqongophala kwedatha. Nanini na xa sisakha iinkonzo ezintsha, sakha amaziko akhoyo, okanye sisenza iinkqubo zophuhliso, sichukumisa ihlabathi elikhulu lemingeni eyahlukahlukeneyo.
Kulucelomngeni, kwaye mhlawumbi akunakwenzeka, ukudwelisa zonke iingxaki. Uya kuhlangabezana neminye yale miba kuphela ukuba usebenza kwi-niche ethile. Kwelinye icala, zininzi ekufuneka sonke siziqonde ukuba zingazisombulula njani na, njengoko zibalulekile ekwakheni iinkqubo ze-IT. Ngamathuba aphezulu, uya kudibana nabo kuzo zonke iiprojekthi.
Kweli nqaku, ndiza kubelana ngamava am ngezinye zeengxaki endidibene nazo ngelixa ndisenza iinkqubo zesoftware.
Ukuba sijonga kwi-Wikipedia, siya kufumana inkcazo elandelayo
Kuphuhliso lwesoftware ejolise kwinkalo, iinkxalabo ezinqamlezileyo ziyimiba yenkqubo echaphazela iimodyuli ezininzi, ngaphandle kokuba kungenzeka ukuba zifakwe kuyo nayiphi na yazo. Ezi nkxalabo zihlala zingenako ukubola ngokucocekileyo ukusuka kuyo yonke inkqubo ekuyilweni nasekuphunyezweni, kwaye zinokubangela ukusasazeka (ukuphindaphinda kwekhowudi), ukudityaniswa (ukuxhomekeka okubalulekileyo phakathi kweenkqubo), okanye zombini.
Ichaza kakhulu into eyiyo, kodwa ndifuna ukuyandisa kwaye ndiyenze lula kancinci:
Inkxalabo enqamlezileyo yingcinga okanye inxalenye yenkqubo/umbutho echaphazela (okanye 'inqumle') amanye amalungu amaninzi.
Imizekelo emihle yenkxalabo enjalo yinkqubo yokwakha, ukugawulwa kwemithi, ukhuseleko, ulawulo lwentengiselwano, i-telemetry, uyilo lwedatha kwaye kukho ezinye ezininzi. Siza kucacisa uninzi lwazo kamva kweli nqaku.
Kwinqanaba lekhowudi, iinkxalabo ezinqamlekileyo zihlala ziphunyezwa kusetyenziswa ubuchule obufana ne -Aspect-Oriented Programming (AOP) , apho ezi nkxalabo zifakwe kwiimodyuli ezihlukeneyo ezinokuthi zisetyenziswe kulo lonke isicelo. Oku kugcina ingqiqo yezoshishino yodwa kwezi zinto zixhalabisayo, okwenza ikhowudi ifundeke ngakumbi kwaye igcinwe.
Zininzi iindlela ezinokwenzeka zokuhlela imiba ngokuyihlulahlula ngeepropathi ezahlukeneyo ezifana nomda, ubungakanani, ukusebenza, ukubaluleka, okujoliswe kuko, kunye nezinye, kodwa kweli nqaku, ndiza kusebenzisa ulwahlulo lomda olulula. Ngale nto, ndithetha apho lo mba uthile ujongwe khona nokuba ngumbutho uphela, inkqubo ethile, okanye into ethile yaloo nkqubo.
Ke, ndiza kwahlula imiba ibe yiMacro kunye neMicro .
Ngomba we - Macro ndithetha ubukhulu becala iingqwalasela esizilandelayo kwinkqubo yonke efana noyilo lwenkqubo ekhethiweyo kunye noyilo lwayo (i-monolithic, ii-microservices, i-architecture ejolise kwinkonzo), isitakhi sobugcisa, ubume bentlangano, njl. njl. izigqibo.
Okwangoku, i -Micro aspect isondele kakhulu kwinqanaba lekhowudi kunye nophuhliso. Umzekelo, sesiphi isakhelo esisetyenziselwa ukusebenzisana novimba weenkcukacha, ubume beprojekthi yeefolda kunye neeklasi, okanye iipateni zoyilo lwento ethile.
Ngelixa olu luhlu lungafanelekanga, lunceda ukucwangcisa ukuqonda iingxaki ezinokwenzeka kunye nokubaluleka kunye neempembelelo zezisombululo esizisebenzisa kuzo.
Kweli nqaku, eyona nto ndigxile kuyo iya kuba kwimiba ye-macro.
Xa ndandiqala ukufunda malunga noyilo lwesoftware, ndafunda amanqaku amaninzi anomdla malunga nomthetho kaConway kunye nefuthe lawo kubume bentlangano. Ingakumbi lo . Ngoko ke, lo mthetho uthi
Nawuphi na umbutho oyila inkqubo (echazwe ngokubanzi) uya kuvelisa uyilo olusakhiwo sayo siyikopi yolwakhiwo lonxibelelwano lombutho.
Bendisoloko ndikholelwa ukuba lo mbono ukho kwihlabathi liphela kwaye umele uMthetho Omkhulu.
Emva koko ndaqala ukufunda indlela ka-Eric Evans's Domain-Driven Design (DDD) kwiinkqubo zokumodela. U-Eric Evans ugxininisa ukubaluleka kokuchongwa kwe-Bounded Context. Le ngcamango ibandakanya ukwahlula imodeli yommandla ontsonkothileyo ube ngamacandelo amancinane, alawulekayo, ngalinye linoluhlu lwalo olulinganiselweyo lolwazi. Le ndlela inceda ekunxibelelaneni kweqela elisebenzayo, njengoko inciphisa imfuno yolwazi olubanzi lwe-domain yonke kwaye inciphisa ukuguqulwa komxholo, ngaloo ndlela yenza iingxoxo zisebenze ngakumbi. Ukutshintsha umxholo yeyona nto imbi kakhulu kwaye idla kakhulu izixhobo. Nkqu iikhompyutha ziyasokola. Nangona kungenakwenzeka ukuba sifezekise ukungabikho ngokupheleleyo kokutshintsha umxholo, ndicinga ukuba yeyona nto kufuneka sizabalazele yona.
Ukubuyela kuMthetho kaConway, ndifumene imiba emininzi ngayo.
Umba wokuqala endikhe ndadibana nawo noMthetho kaConway, ocebisa ukuba uyilo lwenkqubo lubonisa ubume bentlangano, sinakho ukwenza imixholo enzima nebanzi. Oku kuntsonkotha kuvela xa ubume bombutho ungahambelani nemida yommandla, okukhokelela kwimixholo eBounded exhomekeke enye kakhulu kwaye ilayishwe ngolwazi. Ikhokelela ekutshintsheni umxholo rhoqo kwiqela lophuhliso.
Omnye umba kukuba isigama sombutho sivuza kwinqanaba lekhowudi. Xa izakhiwo zombutho zitshintsha, oko kufuna uhlengahlengiso lwekhowudi, kudla izixhobo ezixabisekileyo.
Ke, ukulandela i-Inverse Conway Maneuver kunceda ekwakheni inkqubo kunye nombutho okhuthaza uyilo olunqwenelekayo lwesoftware. Nangona kunjalo, kuyaphawuleka ukuthetha ukuba le ndlela ayizukusebenza kakuhle kuyilo esele lwenziwe kunye nezakhiwo njengoko utshintsho kweli nqanaba luthatha ixesha elide, kodwa luqhuba ngokugqwesileyo kuqaliso kuba bayakhawuleza ukwazisa naluphi na utshintsho.
Le pateni okanye "i-anti-pattern" iqhuba ukwakha inkqubo ngaphandle kolwakhiwo. Akukho mithetho, akukho mida, kwaye akukho sicwangciso sendlela yokulawula ubunzima obungenakuphepheka obukhulayo. Ukuntsonkotha lolona tshaba loyikekayo kuhambo lokwakha iinkqubo zesoftware.
Ukuze siphephe ukwenza uhlobo olunjalo lwenkqubo, kufuneka silandele imigaqo ethile kunye nemiqobo.
Kukho iinkcazo ezininzi ze-Software Architecture. Ndiyabathanda abaninzi babo kuba bagubungela imiba eyahlukeneyo yayo. Nangona kunjalo, ukuze sikwazi ukuqiqa malunga noyilo, kufuneka ngokwemvelo senze ezinye zazo ezingqondweni zethu. Kwaye kuyaphawuleka ukuthetha ukuba le nkcazo inokuvela. Ke, okwangoku, ndinenkcazo elandelayo kum.
I-Software Architecture imalunga nezigqibo kunye nokukhetha okwenzayo yonke imihla okuchaphazela inkqubo eyakhelweyo.
Ukwenza izigqibo ekufuneka ubenazo “kwibhegi” yakho imigaqo kunye neepateni zokusombulula iingxaki ezivelayo, kukwabalulekile ukuxela ukuba ukuqonda iimfuno ngundoqo wokwakha okufunwa lishishini. Nangona kunjalo, ngamanye amaxesha iimfuno azibonakali okanye zingachazwanga, kulo mzekelo, kungcono ukulinda ukuze ufumane ingcaciso engaphezulu okanye uthembele kumava akho kwaye uthembele intuition yakho. Kodwa nangona kunjalo, awukwazi ukwenza izigqibo ngokufanelekileyo ukuba awunayo imigaqo kunye neepateni onokuthi uthembele kuzo. Kulapho ndiza khona kwinkcazo yeSitayile soYilo lweSoftware.
Isimbo soYilo lweSoftware yiseti yemigaqo kunye neepateni ezichaza indlela yokwakha isoftware.
Zininzi izitayile zokwakha ezahlukeneyo ezigxile kumacala ahlukeneyo oyilo olucwangcisiweyo, kwaye ukusebenzisa uninzi lwazo ngaxeshanye yimeko eqhelekileyo.
Umzekelo, njengale:
Uyilo lweMonolithic
Uyilo oluqhutywa yisizinda
Icandelwana-based
Iinkonzo ezincinci
Umbhobho kunye nezihluzi
Iqhutywa sisiganeko
Microkernel
Ijolise kwinkonzo
kwaye nangokunjalo…
Ewe kunjalo, banezibonelelo zabo kunye nezingeloncedo zabo, kodwa eyona nto ibalulekileyo endiyifundileyo yeyokuba uyilo lukhula ngokuthe ngcembe ngelixa kuxhomekeke kwiingxaki zokwenyani. Ukuqala ngolwakhiwo lwe-monolithic lukhetho olukhulu lokunciphisa ukuntsonkotha kokusebenza, kusenokwenzeka ukuba olu lwakhiwo luya kulungela iimfuno zakho nasemva kokufikelela kwinqanaba leMveliso-yentengiso yeFit (PMI) yokwakha imveliso. Kwinqanaba, unokucinga ngokufudukela kwindlela eqhutywa ngumnyhadala kunye nee-microservices zokuphumeza ukusasazwa okuzimeleyo, ubume bendawo yogcino lwetekhnoloji, kunye nolwakhiwo oludityanisiweyo oluncinci (kunye nokungafihli nto okwangoku ngenxa yobume beendlela eziqhutywa ngumnyhadala kunye ne-pub-sub ukuba ezi zamkelwe). Ukulula kunye nokusebenza kakuhle kusondele kwaye kunempembelelo enkulu komnye nomnye. Ngokwesiqhelo, ulwakhiwo oluntsonkothileyo luchaphazela isantya sophuhliso lweempawu ezintsha, ukuxhasa kunye nokugcina esele zikhona, kunye nokucela umngeni kwindaleko yendalo yenkqubo.
Nangona kunjalo, iinkqubo ezintsonkothileyo zihlala zifuna ulwakhiwo oluntsonkothileyo nolubanzi, olungenakuphepheka.
Ngokufanelekileyo, esi sisihloko esibanzi kakhulu, kwaye zininzi izimvo ezintle malunga nendlela yokumisa kunye nokwakha iinkqubo zokuzivelela kwendalo. Ngokusekelwe kumava am, ndenze le ndlela ilandelayo:
Kukwabalulekile ukuqonda amanani kunye neemetrics ezifana ne -DAU (Abasebenzisi abaSebenzisayo bemihla ngemihla), i-MAU (Abasebenzisi abaSebenzisayo ngeNyanga), i-RPC (isicelo ngeSibini), kunye ne -TPC (iTransaction ngeSibini) kuba inokukunceda wenze ukhetho ngenxa yoyilo lwezakhiwo. Abasebenzisi be-100 abasebenzayo kunye ne-100 yezigidi zabasebenzisi abasebenzayo bahlukile.
Njengenqaku lokugqibela, ndingatsho ukuba i-architecture inempembelelo ebalulekileyo kwimpumelelo yemveliso. Uyilo oluyilwe kakubi lweemveliso luyafuneka ekulinganiseni, okunokuthi kukhokhelele ekusileleni kuba abathengi bengayi kulinda ngelixa ulinganisa inkqubo, baya kukhetha umntu okhuphisana naye, ngoko ke kufuneka sibe ngaphambi kokwenza umlinganiselo. Nangona ndivuma ukuba ngamanye amaxesha ayinakuba yindlela ebhityileyo, imbono kukuba nenkqubo ehlasimlisiweyo kodwa engekakalwa. Kwelinye icala, ukuba nenkqubo entsonkothileyo kwaye esele inesikali engenabathengi okanye izicwangciso zokufumana uninzi lwabo kuya kukubiza imali kwishishini lakho simahla.
Ukukhetha isitakhi setekhnoloji sisigqibo esikwinqanaba elikhulu kuba sinefuthe ekuqeshweni, kwindlela yokubona indalo yendalo, i-scalability, kunye nokusebenza kwenkqubo.
Olu luluhlu lweengqwalasela ezisisiseko zokukhetha istaki setekhnoloji:
Ukuba nezixhobo ezininzi zetekhnoloji kunokuchaphazela njani ukukhula kweshishini?
Ngokombono omnye, ukwazisa isitakhi esinye kunokunyusa ukuqeshwa kwakho, kodwa kwelinye icala, kuzisa iindleko ezongezelelweyo zokulungisa kuba kufuneka uzixhase zombini izitaki. Ke, njengoko benditshilo ngaphambili, kwimbono yam, kuphela imfuno eyongezelelweyo ekufuneka ibe yingxoxo yokubandakanya izitaki ezininzi zetekhnoloji.
Kodwa kuthekani ngomgaqo wokukhetha esona sixhobo sifanelekileyo kwingxaki ethile?
Ngamanye amaxesha awunalo olunye ukhetho ngaphandle kokuzisa izixhobo ezitsha zokusombulula ingxaki ethile esekelwe kwiingqwalasela ezifanayo ezikhankanywe ngasentla, kwiimeko ezinjalo, kuyavakala ukukhetha esona sisombululo.
Ukudalwa kweenkqubo ngaphandle kokudibanisa okuphezulu kwithekhnoloji ethile kunokuba ngumngeni. Sekunjalo, kuyanceda ukulwela imeko apho inkqubo ingadityaniswanga ngokuqinileyo kwitekhnoloji, kwaye ayiyi kufa ukuba ngomso, isakhelo esithile okanye isixhobo siba sesichengeni okanye sithotywe.
Olunye uqwalaselo olubalulekileyo lunxulumene nokuxhomekeka kumthombo ovulekileyo kunye nokuxhomekeka kwesoftware. Isoftware yobunini ikunika ukuguquguquka okuncinci kunye nokuba nokwenzeka kokwenziwa ngokwezifiso. Nangona kunjalo, eyona nto iyingozi kukutshixa komthengisi, apho uye uxhomekeke kwiimveliso zomthengisi, amaxabiso, imigaqo, kunye nemephu yendlela. Oku kunokuba yingozi ukuba umthengisi utshintsha indlela, anyuse amaxabiso, okanye ayiyeke imveliso. Isoftware yomthombo ovulekileyo iyawunciphisa lo mngcipheko, njengoko iqumrhu elinye lingawulawuli. Ukuphelisa inqaku elinye lokungaphumeleli kuwo onke amanqanaba ngundoqo wokwakha iinkqubo ezithembekileyo zokukhula.
Inqaku elinye lokusilela (SPOF) libhekisa kuyo nayiphi na inxalenye yenkqubo ethi, ukuba iyasilela, iya kubangela ukuba yonke inkqubo iyeke ukusebenza. Ukuphelisa ii-SPOF kuwo onke amanqanaba kubalulekile kuyo nayiphi na inkqubo efuna ukufumaneka okuphezulu. Yonke into, kubandakanywa nolwazi, abasebenzi, amacandelo enkqubo, ababoneleli befu, kunye neentambo ze-intanethi, zinokungaphumeleli.
Kukho iindlela ezininzi ezisisiseko esinokuzisebenzisa ukuphelisa indawo enye yokusilela:
Kweli nqaku, sigubungele imiba ephambili yeMacro kunye nendlela esinokujongana ngayo nobunzima bazo.
Enkosi ngokufunda! Mandikubobe kwixesha elizayo!