C:\spell> server.py
"Spell Suggestion Server Started"
C:\spell> client.py
>>> ကခ်ြာေကခြွတ်
%%% ကခ်ာေျကခွျတ်
>>>
>>> အကြပ်အတည်း
%%% အကျပ်အတည်း
>>>
Spell Correction is same as my other posts, but Main Point of doing as Client/Server Program is the speed of data load.
for eg., ဥပမာ စာလံုး ၃ သာေင်းရိတယ်ဆိုပါစို့။ အဲဒီစာလံုးတွေကို disk ကနေ memory ပ်ါေကိုဖတ်တင်ဖို့ အျခိန်လိုမယ်။ စာလံုးတိုင်းကို တဈခါ ပြန် load လုပ်ရတယ်ဆိုမဟုတ်သးေဘူး။ ဥပမာ web page ဆိုရင် user request တိုင်းမာ ဒေတာတွေ ပြန်ပြန်ဖတ်နေရင် ဆာဗာအတွက်ရာေ ကြာတဲ့အျခိန်အတွက်ရာေ မကာေင်းဘူး။ အကယ်၍ စာလံုး ၃သိန်းဆိုရင် ပိုနးေသွားမာပါ့ေ။
Spell Server အနေနဲ့ Run ထားရင် တဈခါတည်း memory ပ်ါေမာ တင်ထားပြီးသားဖြဈတဲ့ အတွက်ကြာေင့် လိုတာလးေရာလိုက်ရံုပဲ။
Web Server ပ်ါေမာ Spell Server ကို Run ထားပြီး Web Server ပ်ါေက script ကနေပြီး spell server ကို client အနေနဲ့ လမ်းျခိတ် ပြီး စာလံုးပါေင်းတွေ ပြန်ထုတ်ပးေတဲ့နည်းပါ။
Web Server နဲ့ Spell Server စက်တဈလံုးတည်း ဖြဈဖို့လိုပါတယ်။ မတူရင် ဘာမ အဓိပ္ပါယ်မရိပါဘူး။
Cheers,
Soe Min
0 comments:
Post a Comment