paint-brush
Nigute Wakemura Ikibazo Mugihe Utegura Sisitemuna@fairday
64,488 gusoma
64,488 gusoma

Nigute Wakemura Ikibazo Mugihe Utegura Sisitemu

na Aleksei23m2024/02/05
Read on Terminal Reader
Read this story w/o Javascript

Birebire cyane; Gusoma

Ingorabahizi ni umwanzi! Reka twige uko twabyitwaramo!
featured image - Nigute Wakemura Ikibazo Mugihe Utegura Sisitemu
Aleksei HackerNoon profile picture

Bivuga iki?

Buri munsi, buri mwanya mugihe cyumwuga wubwubatsi, duhura nibibazo byinshi bitandukanye byingorabahizi nibihe bitandukanye aho dukeneye gufata icyemezo cyangwa kubisubika kubera kubura amakuru. Igihe cyose twubatse serivisi nshya, twubaka ibikorwa remezo, cyangwa tunashiraho inzira ziterambere, dukora ku isi nini yibibazo bitandukanye.


Biragoye, kandi birashoboka ko bidashoboka, gutondeka ibibazo byose. Uzahura na bimwe muribi bibazo gusa niba ukora muri niche runaka. Ku rundi ruhande, hari byinshi twese tugomba kumva uburyo byakemuka, kuko ari ingenzi mu kubaka sisitemu ya IT. Hamwe nibishoboka byinshi, uzahura nabo mumishinga yose.


Muri iki kiganiro, nzabagezaho ibyambayeho hamwe nibibazo nahuye nabyo mugihe cyo gukora progaramu ya software.

Ikibazo cyo Kwambukiranya ni iki?

Niba turebye muri Wikipedia, tuzabona ibisobanuro bikurikira


Mu iterambere rya porogaramu igamije iterambere, impungenge zambukiranya ni ibintu bigize porogaramu igira ingaruka ku buryo butandukanye, bitashoboka ko byakirwa muri kimwe muri byo. Izi mpungenge akenshi ntizishobora kubora neza mubindi bisigaye bya sisitemu haba mubishushanyo mbonera no kubishyira mubikorwa, kandi bishobora kuvamo gutatanya (kode yo kwigana), gutitirana (biterwa cyane na sisitemu), cyangwa byombi.


Irasobanura cyane icyo aricyo, ariko ndashaka kwagura no koroshya gato:

Impungenge zambukiranya ni igitekerezo cyangwa ibice bya sisitemu / ishyirahamwe bigira ingaruka (cyangwa 'guca hejuru') ibindi bice byinshi.


Ingero nziza zibyo bibazo ni sisitemu yububiko, gutema ibiti, umutekano, gucunga ibikorwa, telemetrie, igishushanyo mbonera kandi hariho nibindi byinshi. Tugiye gusobanura byinshi muribyinshi nyuma yiki kiganiro.


Kurwego rwa kode, impungenge zambukiranya akenshi zishyirwa mubikorwa hakoreshejwe tekinoroji nka Aspect-Orient Programming (AOP) , aho izo mpungenge zahinduwe mubice bitandukanye bishobora gukoreshwa mubisabwa byose. Ibi bituma logique yubucuruzi itandukana nizi mpungenge, bigatuma kode isomeka kandi ikagumaho.

Ibyiciro

Hariho inzira nyinshi zishoboka uburyo bwo gutondekanya ibintu mubitandukanya nibintu bitandukanye nkubunini, ingano, imikorere, akamaro, intego, nabandi, ariko muriki kiganiro, ngiye gukoresha urwego rworoshye rwashyizwe mubikorwa. Ibi, ndashaka kuvuga aho iyi ngingo yihariye yerekanwe niba ari organisation yose, sisitemu runaka, cyangwa ikintu cyihariye cya sisitemu.


Noneho, ngiye kugabanya ibice muri Macro na Micro .


Mubisobanuro bya Macro ndashaka kuvuga cyane cyane kubitekerezo dukurikiza kuri sisitemu yose nkuburyo bwa sisitemu yubatswe hamwe nigishushanyo cyayo (monolithic, microservices, serivisi zishingiye kuri serivise), tekinoroji yikoranabuhanga, imiterere yimiryango, nibindi. ibyemezo.


Hagati aho, icyerekezo cya Micro cyegereye cyane urwego rwimikorere niterambere. Kurugero, ni ubuhe buryo bukoreshwa muguhuza nububikoshingiro, imiterere yumushinga wububiko namasomo, cyangwa nuburyo bwihariye bwo gushushanya.


Mugihe ibi byiciro bitari byiza, bifasha muburyo bwo gusobanukirwa ibibazo bishoboka n'akamaro n'ingaruka z'ibisubizo tubikoresha.


Muri iyi ngingo, intego yanjye yibanze izaba yibanze kuri macro.

Ibice bya Macro

Imiterere yumuteguro

Mugihe natangiye kwiga ibijyanye nubwubatsi bwa software, nasomye ingingo nyinshi zishimishije zerekeye amategeko ya Conway n'ingaruka zayo mumiterere yubuyobozi. Cyane cyane iyi . Iri tegeko rero rivuga ko


Ishirahamwe iryo ariryo ryose rishushanya sisitemu (risobanuwe muri rusange) rizatanga igishushanyo mbonera cyacyo ni kopi yimiterere yitumanaho ryumuryango.


Nahoraga nizera ko iki gitekerezo rwose ari rusange kandi kigereranya Itegeko rya Zahabu.


Hanyuma natangiye kwiga Eric Evans's Domain-Driven Design (DDD) uburyo bwo kwerekana imiterere. Eric Evans ashimangira akamaro ko kumenyekanisha imipaka. Iki gitekerezo gikubiyemo kugabana imiterere igoye mubice bito, byacungwa cyane, buri kimwe gifite ubumenyi buke. Ubu buryo bufasha mu itumanaho ryiza ryitsinda, kuko rigabanya gukenera ubumenyi bwimbitse kuri domaine yose kandi bikagabanya guhinduranya imiterere, bityo ibiganiro bikagenda neza. Guhindura imiterere ni ikintu kibi kandi gikoresha umutungo cyane. Ndetse na mudasobwa zirarwana nayo. Nubwo bidashoboka kugera kubintu byuzuye byo guhinduranya imiterere, ndibwira ko aribyo tugomba guharanira.


Fantasy about keeping in mind a lot of bounded contexts

Tugarutse ku Mategeko ya Conway, Nabonye ibibazo byinshi hamwe nayo.


Ikibazo cya mbere nahuye n amategeko ya Conway, yerekana ko igishushanyo mbonera cya sisitemu cyerekana imiterere yubuyobozi, nubushobozi bwo gukora ibintu bigoye kandi byuzuye. Ibi bigoye bivuka mugihe imiterere yubuyobozi idahujwe nimbibi za domaine, biganisha kuri Bounded Contexts ihuza cyane kandi yuzuye amakuru. Biganisha kumurongo-uhinduranya itsinda ryiterambere.


Ikindi kibazo nuko imvugo yubuyobozi isohoka kurwego rwimikorere. Iyo inzego zinzego zihindutse, bisaba guhindura codebase, ikoresha umutungo wingenzi.


Rero, gukurikira Inverse Conway Maneuver ifasha kubaka sisitemu numuryango utera inkunga software yububiko. Ariko, birashimishije kuvuga ko ubu buryo butazakora neza muburyo bwubatswe bwubatswe hamwe nuburyo kuva impinduka muriki cyiciro zimara igihe kirekire, ariko irakora cyane mubitangira kuko bihutira kumenyekanisha impinduka zose.

Umupira munini w'ibyondo

Iyi shusho cyangwa "anti-pattern" itera kubaka sisitemu idafite ubwubatsi. Nta mategeko, nta mipaka, nta n'ingamba zuburyo bwo kugenzura byanze bikunze gukura gukomeye. Ingorabahizi numwanzi uteye ubwoba murugendo rwo kubaka sisitemu ya software.


Entertaining illustration made by ChatGPT

Kugira ngo twirinde kubaka ubwoko bwa sisitemu, dukeneye gukurikiza amategeko n'imbogamizi.

Sisitemu yububiko

Hano haribisobanuro byinshi kububiko bwa software. Nkunda benshi muribo kuva bakubiyemo ibintu bitandukanye. Ariko, kugirango tubashe gutekereza kubijyanye nubwubatsi, dukeneye mubisanzwe gushiraho bimwe muribi mubitekerezo byacu. Kandi birashimishije kuvuga ko iki gisobanuro gishobora guhinduka. Nibura rero kuri ubu, mfite ibisobanuro bikurikira kubwanjye.


Software Architecture yerekeye ibyemezo no guhitamo ufata burimunsi bigira ingaruka kuri sisitemu yubatswe.


Kugira ngo ufate ibyemezo ukeneye kugira mu mahame n '“umufuka” wawe hamwe nuburyo bwo gukemura ibibazo bivuka, ni ngombwa kandi kuvuga ko gusobanukirwa ibisabwa ari urufunguzo rwo kubaka ibyo umushinga ukeneye. Ariko, rimwe na rimwe ibisabwa ntabwo bisobanutse cyangwa ntibisobanuwe, muriki gihe, nibyiza gutegereza kugirango ubone ibisobanuro byinshi cyangwa wishingikirije kuburambe bwawe kandi wizere ubushishozi bwawe. Ariko uko byagenda kwose, ntushobora gufata ibyemezo neza niba udafite amahame nuburyo bwo kwishingikiriza. Nibwo ndaje mubisobanuro byuburyo bwa Software Architecture.


Imiterere yububiko bwa software ni amahame nuburyo bugena uburyo bwo kubaka software.


Hano haribintu byinshi byububiko byubatswe byibanze kumpande zitandukanye zububiko bwateganijwe, kandi gukoresha byinshi murimwe icyarimwe nikintu gisanzwe.


Kurugero, nka:

  1. Ubwubatsi bwa Monolithic

  2. Igishushanyo mbonera

  3. Ibigize

  4. Microservices

  5. Umuyoboro

  6. Ibyabaye

  7. Microkernel

  8. Serivisi


n'ibindi…


Nibyo, bafite ibyiza nibibi, ariko icyingenzi namenye nuko ubwubatsi bugenda buhoro buhoro mugihe bitewe nibibazo bifatika. Uhereye ku bwubatsi bwa monolithic ni amahitamo meza yo kugabanya ibikorwa bigoye, birashoboka cyane ko iyi nyubako izahuza ibyo ukeneye nubwo nyuma yo kugera ku bicuruzwa-isoko Fit (PMI) yo kubaka ibicuruzwa. Ku gipimo, urashobora gutekereza kugana inzira-yayobowe na microservices kugirango ugere kubikorwa byigenga, ibidukikije bya tekinoroji itandukanye, hamwe nubwubatsi buke bufatanije (kandi ntibigaragara neza hagati aho bitewe nuburyo bwibikorwa biterwa na pub-sub niba niba byemewe). Ubworoherane nubushobozi biri hafi kandi bigira ingaruka zikomeye kuri buriwese. Mubisanzwe, inyubako zigoye zigira ingaruka kumuvuduko witerambere ryibintu bishya, gushyigikira no kubungabunga ibihari, no guhangana nihindagurika ryimiterere.


Nyamara, sisitemu igoye akenshi isaba ubwubatsi bugoye kandi bwuzuye, byanze bikunze.


Nibyiza, iyi ni ingingo yagutse cyane, kandi hariho ibitekerezo byinshi byiza byuburyo bwo kubaka no kubaka sisitemu yubwihindurize. Nkurikije uburambe bwanjye, nakoze uburyo bukurikira:

  1. Hafi buri gihe itangirana nuburyo bwububiko bwa monolithic kuva ikuraho ibibazo byinshi bivuka kubera imiterere ya sisitemu yagabanijwe. Nibyumvikana kandi gukurikiza modular monolith kugirango twibande kubice byubaka bifite imipaka isobanutse. Gukoresha uburyo bushingiye kubintu bishobora kubafasha kuvugana hagati yabo ukoresheje ibyabaye, ariko kugira guhamagara bitaziguye (bita RPC) byoroshya ibintu mugitangira. Ariko, ni ngombwa gukurikirana ibintu biterwa hagati yibigize kuva niba igice A kizi byinshi kubice B, ahari, birumvikana kubihuza murimwe.
  2. Iyo ugeze hafi yikibazo mugihe ukeneye gupima iterambere rya sisitemu na sisitemu, ushobora gutekereza gukurikiza icyitegererezo cya Stangler kugirango ukuremo buhoro buhoro ibice bigomba koherezwa mu bwigenge cyangwa no gupimwa hamwe nibisabwa byihariye.
  3. Noneho, niba ufite icyerekezo gisobanutse cy'ejo hazaza, ni amahirwe make adasanzwe, ushobora guhitamo kubwubatsi bwifuzwa. Muri kano kanya, urashobora gufata umwanzuro wo kwerekeza kuri microservices yubatswe ukoresheje uburyo bwa Orchestre na Choreografiya, ushizemo uburyo bwa CQRS kubipimo byigenga byandika no gusoma ibikorwa, cyangwa ugahitamo gukomera hamwe nubwubatsi bwa monolithic niba bihuye nibyo ukeneye.


Ni ngombwa kandi gusobanukirwa imibare n'ibipimo nka DAU (Abakoresha buri munsi), MAU (Ukoresha Ukwezi Ukoresha), RPC (Gusaba Isegonda), na TPC (Transaction Per Second) kuko ishobora kugufasha guhitamo kuko ubwubatsi bwa Abakoresha 100 bakorana na miliyoni 100 bakoresha bakoresha baratandukanye.


Nkibisobanuro byanyuma, navuga ko ubwubatsi bugira ingaruka zikomeye kubicuruzwa byatsinze. Ubwubatsi bwateguwe nabi kubicuruzwa birasabwa mugupima, ibyo birashoboka cyane ko biganisha ku gutsindwa kuva abakiriya batazategereza mugihe wapimye sisitemu, bazahitamo umunywanyi, bityo rero dukeneye kuba imbere yubunini bushobora gupimwa. Nubwo nemera ko rimwe na rimwe bidashobora kuba inzira yoroheje, igitekerezo ni ukugira sisitemu nini ariko itaragera. Kurundi ruhande, kugira sisitemu igoye cyane kandi yamaze gupimwa idafite abakiriya cyangwa gahunda yo kubona byinshi muribyo bizagutwara amafaranga kubucuruzi bwawe kubusa.

Guhitamo tekinoroji

Guhitamo ikorana buhanga kandi nicyemezo cya macro kurwego kuva bigira ingaruka kumurimo, sisitemu yubwihindurize karemano, ubunini, nibikorwa bya sisitemu.


Uru nurutonde rwibitekerezo byibanze byo guhitamo tekinoroji:

  • Ibisabwa byumushinga kandi bigoye. Kurugero, porogaramu yoroshye y'urubuga irashobora kubakwa hamwe na Blazor murwego niba abaterankunga bawe bafite uburambe hamwe nayo, ariko kubera kubura gukura kwa WebAssemble, guhitamo React na Typescript kugirango utsinde igihe kirekire bishobora kuba icyemezo cyiza
  • Ubunini n'ibikenewe. Niba uteganya kwakira umubare munini wimodoka, guhitamo ASP.NET Core hejuru ya Django birashobora kuba amahitamo meza kubera imikorere yayo myiza mugukemura ibyifuzo hamwe. Ariko, iki cyemezo giterwa nubunini bwimodoka utegereje. Niba ukeneye gucunga ibishoboka miriyari zisabwa hamwe nubukererwe buke, kuba hari imyanda ishobora kuba ikibazo.
  • Guha akazi, Igihe cyiterambere, nigiciro. Mubihe byinshi, ibi nibintu dukeneye kwitaho. Igihe cyo Kwisoko, Igiciro cyo gufata neza, hamwe no Guha akazi gutezimbere ubucuruzi bwawe bukeneye nta mbogamizi.
  • Ubuhanga bwitsinda hamwe nibikoresho. Ubuhanga bwitsinda ryitsinda ryanyu ryiterambere nikintu gikomeye. Mubisanzwe nibyiza gukoresha tekinoroji ikipe yawe isanzwe imenyereye keretse niba hari impamvu ikomeye yo gushora imari mukwiga stack nshya.
  • Gukura. Umuryango ukomeye hamwe nibidukikije bikungahaye byibitabo nibikoresho birashobora koroshya inzira yiterambere. Ikoranabuhanga rizwi cyane rifite ubufasha bwiza bwabaturage, bushobora kuba ingirakamaro mugukemura ibibazo no gushaka ibikoresho. Rero, urashobora kuzigama umutungo kandi ukibanda cyane kubicuruzwa.
  • Kubungabunga igihe kirekire no gushyigikirwa. Reba igihe kirekire kirambye cyikoranabuhanga. Tekinoroji ikoreshwa cyane kandi igashyigikirwa ntabwo ishobora kuba ishaje kandi muri rusange yakira ibishya kandi bitezimbere.


Nigute kugira ibice byinshi byikoranabuhanga bishobora kugira ingaruka mubucuruzi?

Urebye kimwe, kumenyekanisha ikindi gice gishobora gupima akazi kawe, ariko kurundi ruhande, bizana amafaranga yinyongera yo kubungabunga kuva ukeneye gushyigikira ibice byombi. Nkuko nabivuze mbere, uko mbibona, gusa ibikenewe byongeweho bigomba kuba impaka zo gushiramo ibikoresho byinshi byikoranabuhanga.


Ariko tuvuge iki ku ihame ryo guhitamo igikoresho cyiza kubibazo runaka?

Rimwe na rimwe, nta bundi buryo ufite uretse kuzana ibikoresho bishya byo gukemura ikibazo runaka ukurikije ibitekerezo bimwe bimaze kuvugwa, mu bihe nk'ibi, birumvikana guhitamo igisubizo cyiza.


Gushiraho sisitemu idafite guhuza cyane n'ikoranabuhanga runaka bishobora kuba ikibazo. Biracyaza, nibyiza guharanira imiterere aho sisitemu idahujwe cyane nikoranabuhanga, kandi ntizipfa niba ejo, urwego runaka cyangwa igikoresho cyoroshye cyangwa kigatakaza agaciro.


Ikindi gitekerezo cyingenzi kijyanye no gufungura-isoko hamwe na software yihariye. Porogaramu yihariye iguha guhinduka gake hamwe nibishoboka kugirango uhindurwe. Nubwo bimeze bityo, ikintu giteye akaga cyane ni ugucuruza ibicuruzwa, aho uhinduka bitewe nibicuruzwa byabacuruzi, ibiciro, amagambo, hamwe ninzira nyabagendwa. Ibi birashobora guteza akaga niba umucuruzi ahinduye icyerekezo, yongera ibiciro, cyangwa ahagarika ibicuruzwa. Porogaramu ifunguye-isoko igabanya ibi byago, nkikintu kimwe kitagenzura. Kurandura ingingo imwe yo gutsindwa kurwego rwose nurufunguzo rwo kubaka sisitemu yizewe yo gukura.

Ingingo imwe yo gutsindwa (SPOF)

Ingingo imwe yo gutsindwa (SPOF) bivuga igice icyo aricyo cyose cya sisitemu, niba binaniwe, bizatera sisitemu yose guhagarika imikorere. Kurandura SPOF mu nzego zose ningirakamaro kuri sisitemu iyo ariyo yose isaba kuboneka cyane. Ibintu byose, harimo ubumenyi, abakozi, ibice bya sisitemu, abatanga ibicu, ninsinga za interineti, birashobora kunanirwa.


Hariho uburyo bwinshi bwibanze dushobora gukoresha kugirango dukureho ingingo imwe yo gutsindwa:

  1. Kugabanuka. Shyira mu bikorwa ibirenze ibice byingenzi. Ibi bivuze kugira ibice byabigenewe bishobora gufata niba ibice byibanze binaniwe. Ubucucike burashobora gukoreshwa mubice bitandukanye bya sisitemu, harimo ibyuma (seriveri, disiki), guhuza (guhuza, guhinduranya), hamwe na software (data base, seriveri ya porogaramu). Niba wakiriye ibintu byose muri Cloud Provider ndetse ukaba ufite na backup aho, tekereza kubaka ubundi buryo busanzwe bwongeye kubindi kugirango ugabanye igiciro cyatakaye mugihe cyibiza.
  2. Ibigo. Gukwirakwiza sisitemu yawe ahantu henshi hagaragara, nkibigo byamakuru cyangwa uturere twibicu. Ubu buryo burinda sisitemu yawe kunanirwa byihariye nko kubura amashanyarazi cyangwa ibiza.
  3. Kunanirwa. Koresha uburyo bwo kunanirwa kubice byose (DNS, CDN, Kuringaniza imizigo, Kubernetes, API Gateways, na Data base). Kubera ko ibibazo bishobora kuvuka muburyo butunguranye, ni ngombwa kugira gahunda yo gusubira inyuma yo gusimbuza ibice byose hamwe na clone yayo nkuko bikenewe byihuse.
  4. Serivisi ziboneka cyane. Menya neza ko serivisi zawe zubatswe kugirango zipime neza kandi ziboneka cyane guhera mu ntangiriro ukurikiza amahame akurikira:
    • Witoze serivisi idafite ubwenegihugu kandi wirinde kubika abakoresha mukwibuka. Ahubwo, koresha cache yagabanijwe, nka Redis.
    • Irinde kwishingikiriza kuri gahunda ikurikirana yo gukoresha ubutumwa mugihe utezimbere logique.
    • Mugabanye impinduka kugirango wirinde guhungabanya abakoresha API. Aho bishoboka, hitamo impinduka zisubira inyuma. Kandi, tekereza kubiciro kuva rimwe na rimwe, gushyira mubikorwa impinduka zirashobora kubahenze cyane.
    • Shyiramo kwimuka kwimuka muburyo bwo kohereza.
    • Gushiraho ingamba zo gukemura ibyifuzo icyarimwe.
    • Shyira mubikorwa kuvumbura serivisi, kugenzura, no kwandikisha kugirango wongere kwizerwa no kugaragara.
    • Teza imbere ibitekerezo byubucuruzi kugirango ube udafite imbaraga, wemera ko kunanirwa kwurusobe byanze bikunze.
  5. Isubiramo. Buri gihe usubiremo kandi ugabanye ibyo ushingiye hanze. Buri kwishingikiriza hanze birashobora kumenyekanisha SPOFs, ni ngombwa rero gusobanukirwa no kugabanya izo ngaruka.
  6. Gusangira ubumenyi buri gihe. Ntuzigere wibagirwa akamaro ko gukwirakwiza ubumenyi mumuryango wawe. Abantu barashobora kuba batateganijwe, kandi kwishingikiriza kumuntu umwe birashobora guteza akaga. Shishikariza abagize itsinda kubara ubumenyi bwabo binyuze mu nyandiko. Ariko rero, uzirikane kurenza inyandiko. Koresha ibikoresho bitandukanye bya AI kugirango woroshye iyi nzira.

Umwanzuro

Muri iki kiganiro, twasuzumye ibintu byinshi byingenzi bya Macro nuburyo dushobora guhangana ningorabahizi.


Urakoze gusoma! Reba ubutaha!