Peb yog lub chaw tsim khoom siv thev naus laus zis ntawm lub khw muag khoom network. Muaj ib hnub, kev tswj hwm tau teeb tsa txoj haujlwm ntawm kev ua kom cov kev suav loj loj los ntawm kev siv Apache Ignite ua ke nrog MSSQL, thiab pom lub vev xaib nrog cov duab zoo nkauj thiab cov piv txwv ntawm Java code. Kuv tam sim ntawd nyiam qhov chaw
1. Nqe lus hais txog qhov teeb meem
Lub ntsiab ntawm txoj hauj lwm yog raws li nram no. Muaj SalesPoint cov chaw muag khoom thiab Sku (Stock Keeping Unit) cov npe khoom. Lub ntsiab lus ntawm kev muag khoom muaj "Khoom hom" tus cwj pwm nrog cov txiaj ntsig "me" thiab "loj". Ib qho assortment (daim ntawv teev cov khoom ntawm qhov chaw muag khoom) yog txuas nrog txhua qhov chaw muag khoom (loaded los ntawm DBMS) thiab cov ntaub ntawv tau muab los ntawm hnub teev cov khoom teev.
cais tawm ntawm assortment lossis ntxiv rau assortment.
Nws yog ib qho tsim nyog los npaj ib qho kev faib tawm ntawm cov ntsiab lus ntawm kev muag khoom thiab khaws cia rau hauv nws cov ntaub ntawv hais txog cov khoom sib txuas rau ib hlis ua ntej. Kev sib raug zoo nrog cov kev sib ntaus sib tua yuav tsum muaj Ignite tus neeg siv khoom thauj cov ntaub ntawv, suav ib qho kev sib sau ntawm daim ntawv (khoom hom, Cov khoom lag luam, hnub, naj npawb_of_sales_points) thiab xa rov qab mus rau DBMS.
2. Kawm tej ntaub ntawv
Kuv tseem tsis tau muaj kev paub, yog li kuv pib seev cev los ntawm qhov cub. Ntawd yog, los ntawm kev tshuaj xyuas cov ntawv tshaj tawm.
Tshooj 2016
optimistically cog lus tias "Koj yuav sawv thiab khiav hauv jiffy!" Kuv tab tom txheeb xyuas qhov chaw hloov pauv ib puag ncig, saib ob Apache Ignite Essentials cov yeeb yaj kiab, tab sis lawv tsis muaj txiaj ntsig zoo rau kuv txoj haujlwm tshwj xeeb. Kuv ua tiav Ignite los ntawm kab hais kom ua nrog cov ntaub ntawv txheem "example-ignite.xml", tsim thawj daim ntawv thov
Kuv nyeem ntxiv, thiab muaj qhov piv txwv tam sim ntawd siv affinityKey (tsim ua ntej los ntawm SQL query), thiab txawm siv qhov tsis meej BinaryObject:
IgniteCache<BinaryObject, BinaryObject> people
= ignite.cache("Person").withKeepBinary();
kuv nyeem nws
Kuv tabtom remaking daim ntawv thov Compute kom haum kuv rooj plaub. Lub ntsiab tseem ceeb ntawm cov npe ntawm cov ntsiab lus ntawm kev muag khoom hauv MSSQL txhais tau tias yog [id] [int] TSIS NULL, Kuv tsim lub cache los ntawm kev sib piv
IgniteCache<Integer, SalesPoint> salesPointCache=ignite.cache("spCache")
Hauv xml config kuv qhia tias cache tau muab faib
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="spCache"/>
<property name="cacheMode" value="PARTITIONED"/>
</bean>
Kev faib tawm los ntawm kev muag khoom xav tias qhov xav tau sib sau ua ke yuav raug tsim los ntawm txhua pawg ntawm cov khoom muagPointCache cov ntaub ntawv muaj nyob rau ntawd, tom qab ntawd tus neeg siv khoom yuav ua qhov kawg qhov kawg.
Kuv nyeem cov lus qhia
@Override
public void run() {
SalesPoint sp=salesPointCache.get(spId);
sp.calculateSalesPointCount();
..
}
Kuv ntxiv aggregation thiab uploading logic thiab khiav nws ntawm cov ntaub ntawv xeem. Txhua yam ua haujlwm hauv zos ntawm kev txhim kho server.
Kuv tso ob lub CentOs xeem servers, qhia qhov chaw nyob IP hauv default-config.xml, ua rau txhua tus
./bin/ignite.sh config/default-config.xml
Ob lub Ignite nodes khiav thiab tuaj yeem pom ib leeg. Kuv qhia meej qhov chaw nyob xav tau hauv xml config ntawm daim ntawv thov tus neeg siv khoom, nws pib, ntxiv ib qho thib peb ntawm lub topology thiab tam sim ntawd muaj ob qhov ntxiv. Lub cav qhia "ClassNotFoundException: model.SalesPoint" nyob rau hauv kab
SalesPoint sp=salesPointCache.get(spId);
StackOverflow hais tias yog vim li cas rau qhov yuam kev yog tias tsis muaj kev cai SalesPoint chav kawm ntawm CentOs servers. Peb twb tuaj txog lawm. Yuav ua li cas hais txog "koj tsis tas yuav siv koj tus lej Java ntawm txhua qhov" thiab lwm yam? Los yog "koj Java code" tsis hais txog SalesPoint?
Tej zaum kuv tsis nco ib yam dab tsi - Kuv pib tshawb nrhiav dua, nyeem thiab tshawb nrhiav dua. Tom qab ib pliag, kuv tau txais kev xav tias kuv tau nyeem txhua yam ntawm lub ncauj lus, tsis muaj dab tsi tshiab ntxiv lawm. Thaum kuv tab tom nrhiav, kuv pom qee cov lus nthuav tawm.
Model classes are not peer deployed, but you can use withKeepBinary() flag
on the cache and query BinaryObjects. This way you will avoid deserialization
on the server side and will not get ClassNotFoundException.
Lwm qhov kev xav pom zoo:
Kab lus ntawm Habre
That's it. Start (..) node using MaintenanceServiceNodeStartup file or pass
maintenance-service-node-config.xml to Apache Ignite's ignite.sh/bat scripts.
If you prefer the latter then make sure to build a jar file that will contain
all the classes from java/app/common and java/services/maintenance directories.
The jar has to be added to the classpath of every node where the service
might be deployed.
Tseeb, yog nws. Ntawm no nws hloov tawm, yog vim li cas, qhov no mysterious binary hom!
3.SingleJar
Denis yog thawj qhov chaw hauv kuv tus kheej kev ntaus nqi, IMHO qhov kev qhia tseem ceeb tshaj plaws ntawm txhua yam muaj. Hauv nws
Kuv ua nws ib yam nkaus thiab tau txais ib lub thawv ntawv uas tso tawm "cov ntaub ntawv node" lossis "tus neeg siv khoom" nyob ntawm cov kab lus hais kom ua. Kev sib dhos pib thiab ua haujlwm. Zero Deployment tau swb lawm.
Kev hloov ntawm megabytes ntawm cov ntaub ntawv xeem mus rau kaum tawm gigabytes ntawm kev sib ntaus sib tua cov ntaub ntawv tau pom tias hom ntawv binary tshwm sim vim li cas. Nws yog ib qho tsim nyog los ua kom zoo dua kev nco txog ntawm cov nodes, thiab qhov no yog qhov twg BinaryObject tau ua kom muaj txiaj ntsig zoo.
4. Cov lus xaus
Thawj qhov kev thuam tau ntsib txog qhov tsis meej pem ntawm Apache Ignite cov ntaub ntawv qhov project tau ua kom ncaj ncees; me me tau hloov txij li xyoo 2016. Nws tsis yog ib qho yooj yim rau tus pib los sau cov qauv ua haujlwm raws li lub vev xaib thiab / lossis chaw cia khoom.
Raws li cov txiaj ntsig ntawm kev ua haujlwm tau ua tiav, lub tswv yim yog tias Zero Deployment ua haujlwm, tab sis tsuas yog nyob rau theem system. Tej yam zoo li no: BinaryObject yog siv los qhia tej thaj chaw deb pawg los ua haujlwm nrog cov chav kawm kev cai; Zero Deployment - internal mechanism
Apache Ignite nws tus kheej thiab faib cov khoom siv thoob plaws hauv pawg.
Kuv vam tias kuv qhov kev paub dhau los yuav muaj txiaj ntsig zoo rau cov neeg siv Apache Ignite tshiab.
Tau qhov twg los: www.hab.com