Title: Practical usage of DataBlades and XML in IDS 11
1Practical usage of DataBlades and XML in IDS 11
- Stanislav Ondác
- IT Consultant Dignitas s.r.o.
2DataBlades
- MQ DataBlade
- Binary Data Types DataBlade
- Basic Text Search DataBlade
- Node DataBlade
3MQ DataBlade
- IDS
- Add user informix to the mqm group
- Create a new virtual processor class mq
- Review the mqi tables
- WMQ
- Create queue manager
- Create queues
4Basic Text Search Datablade
- Registering the BTS module
- Defining the bts virtaul processor class
- creating an extspace for bts index
- creating the index for using bts module
- Support BLOB, CHAR, CLOB, LVARCHAR, NCHAR,
NVARCHAR, or VARCHAR
5Binary Data Types DataBlade
- Use BladeManager to register the module
- Data types
- binary18 - 18 bytes
- binaryvar - up to 255 bytes
- Can be indexed
6Node DataBlade
- Use BladeManager to register the module
- Data type
- node - up to 256 bytes
- Support for ER replication
7XML
- Defining the virtual processor class
- XML Publishing
- genxml functions
- extract functions using XPath
-
8Registrácie DataBlades
- ONCONFIG
- VPCLASS mq,noyield,num1
- VPCLASS idsxmlvp,num1
- VPCLASS bts,noyield,num1
- mkdir /opt/ids11/data/demoserver/extspace
- onspaces -c -x extspace -l /some/dir/
- BladeManager
9Hierarchy of employees
create table person(id node,name varchar(10),ip
binaryvar,address lvarchar)
10Franks superior
select name from person where id(select
getparent(id) from person where name"Frank")
11Lanas underlings
select name from person where ischild(id,'1.2')
12Claras superiors
select name from person where isancestor(id,'1.3.1
')
13Johns underlings
select name from person where isdescendant(id,'1.0
')
14Basic text search
- Fuzzy search (searches for text that matches
closely instead of exactly) - select name,address from person where
bts_contains(address,'Dallas') - Proximity search (allows to specify the number of
nonsearch words that can occur between search
terms) - select name,address from person where
bts_contains(address,'"Boston 36"3')
15Binary types
- create table person(id node,name varchar(10),ip
binaryvar,address lvarchar) - Each 2-byte increment of the input string is
stored as a single byte - select length(ip) from person
16XML support
- create table temp(xml lvarchar)
- create procedure temp()DEFINE a lvarchar
- let a genxmlquery('osoba','select name,address
from person where isdescendant(id,"1.3")') - insert into temp values(a)
- end procedure
- execute procedure temp()
- select extract(xml,'/osoba/row/name') from temp
- delete from temp
- insert into temp values('ltrowgtltnamegtClaralt/namegt
ltaddressgtDallas Wear Place 61lt/addressgtlt/rowgt ') - insert into temp values('ltrowgtltnamegtDianalt/namegt
ltaddressgtDallas Wear Place 62lt/addressgtlt/rowgt ') - insert into temp values('ltrowgtltnamegtMaxlt/namegt
ltaddressgtDallas Wear Place 63lt/addressgtlt/rowgt ') - select extractvalue(xml,'row/name') meno from
temp
17MQ
- Server side
- begin work
- execute function mqsend(Message from IDS11')
- commit work
- Client side
- amqsgetc IDS.DEFAULT.QUEUE saturn.queue.manager
- Prerequisite(on WMQ server)
- Created saturn.queue.manager queue manager
- Created IDS.DEFAULT.QUEUE queue
- Created Listener and Channel
18QUESTIONS ?