Projekat

Općenito

Profil

Akcije

Prijedlozi #7708

Zatvoren

Smrt korupciji Fmk/DOS => xHarbour/MySQL-mediator RDD

Dodano od Ernad Husremović prije skoro 19 godina. Izmjenjeno prije skoro 17 godina.

Status:
Zatvoreno
Prioritet:
Urgentno
Odgovorna osoba:
Početak:
Završetak:
% završeno:

0%

Procjena vremena:

Akcije #1

Izmjenjeno od Ernad Husremović prije skoro 19 godina

danas sam čitav dan proveo u proučavanju ove varijante

Akcije #2

Izmjenjeno od Ernad Husremović prije skoro 19 godina

na xharbour newsima od 04.05.2005

ANN: Free unlimited Mediator SQL RDD for MySQL!
--------------------------------------------------------

Dear xBase developers and users!

As announced some time ago, OTC has an exceptional
offer for you. The offer which opens the easy migration
path to SQL for all xHarbour and Harbour developers!

Now we offer full version, unlimited Mediator MySQL RDD
for xHarbour and Harbour for free! Not only for
development and testing but for commercial
installations too!

Mediator SQL RDD is a real RDD driver which allows
your applications to work with SQL databases in exactly
the same way as they work with DBF/NTX and DBF/CDX files.
Consequently, using Mediator, you can quickly adapt your
application to work with SQL databases.

You can download  version 4.2.2.1 of Mediator SQL RDD
for MySQL from www.otc.pl. Compared to previous versions,
this version has huge performance optimizations exploiting
new features of MySQL 4.1

Unique Mediator features:
-------------------------

- 100% Clipper/xHarbour-compatible network logic.
All your record, file and exclusive locks work
as expected, being visible even through database
transaction boundaries.

- 100% Clipper/xharbour-compatible transaction logic.
Your changes are immediately visible for other
applications. When required your application can use
extended database transactions as well.

- 100% Clipper/xHarbour-compatible cache logic.
When you perform operations which refresh current record
value (such as GO TOP) you can be sure you get a fresh
copy. No need to rewrite algorithms waiting for changes
introduced to database by other applications.

- 100% Clipper/xHarbour compatible record numbering.
By default, no holes in record numbering are allowed.
Thanks to this feature all RECNO-dependent algorithms
run unchanged. When required, application can also be
switched to perforated record numbering mode.

- Only one database connection required for each
application

- Compatible with both Harbour and xHarbour

- Compatible with free www.xharbour.org version
of xHarbour and with commercial xHarbour as well.

- Compatible with Visual C++, Borland C++ and
Pelles C compilers.

- Dedicated Mediator Delphi components allow for
efficient and easy access to your Mediator-managed
SQL data. More dedicated interfaces under development.

- Enterprise version of Mediator server is also
compatible with 16-bit Clipper applications

- Very efficient and easy to use architecture. Mediator
SQL RDD consists of the client libraries (RDD) which you
link into your application, and Mediator server which
you usually install on the same machine where SQL
database is running. This architecture has many
advantages:

a) No need for ODBC drivers, Oracle OCI or other custom
client software to be installed on the client machines.
All you need to run your application is TCP/IP stack.

b) Very efficient operation. All database operations
are performed locally between Mediator server and SQL
database. Application communicates with Mediator server
using the optimal, specially designed protocol, consuming
as small amount of network resources as possible.

c) Easy monitoring and managing of Mediator server
through local or remote interface. You have access
to all sessions, tables and locks information.

d) Ability to optimize your (x)Harbour/Mediator
applications and installations  by analyzing global
profiling information gathered by Mediator server
for each connected session.

More information about Mediator is available from
http://www.otc.pl/index.asp?s=21&l=2

Enjoy your way to SQL!

Jacek Potempa
OTC S.A.

Akcije #3

Izmjenjeno od Ernad Husremović prije skoro 19 godina

rezime mog današnjeg dana je taj da stvar radi

ono što mi nije drago jeste da se radi o zatvorenom proizvodu, ali mi izgleda da je stvar više nego zrela - koristi se od 1996 ( i to ponajviše za oracle baze podataka koliko sam primjetio)

Akcije #4

Izmjenjeno od Ernad Husremović prije skoro 19 godina

e kako stvar radi ....

iOdbc

postavi se iodbc (varijanta odbc-a za unix)

hernad@desk-hernad:~$ aptitude show iodbc

Paket: iodbc
New: yes
State: installed
Automatically installed: no
Verzija: 3.52.3-1
Prioritet: opcionalno
Sekcija: universe/misc
Održavatelj: Christian Hammers <ch@debian.org>
Dekompresovana veličina: 717k
Zavisi: libc6 (>= 2.3.4-1), libglib1.2 (>= 1.2.0), libgtk1.2 (>= 1.2.10-4),
        libiodbc2 (>= 3.52.3), libx11-6, libxext6, libxi6
Description: GTK config frontend for the iODBC Driver Manager
 The iODBC (intrinsic Open Database Connectivity) driver manager is compatible
 with ODBC 2.x and 3.x specification and performs exact the jobs of a ODBC
 driver manager (i.e. driver loading, Parameters and function sequence checking, driver's function invoking, etc). Any ODBC driver works with ODBC 2.0 and 3.x
 driver manager will also work with iODBC driver manager and vice versa.

 Applications (using ODBC function calls) linked with iODBC driver manager will
 be able to simultaneously access different type of data sources within one
 process through suitable iODBC drivers.

 This package contains the configuration binaries.

hernad@desk-hernad:~$ aptitude show libmyodbc

Paket: libmyodbc
New: yes
State: installed
Automatically installed: no
Verzija: 3.51.11-5
Prioritet: opcionalno
Sekcija: universe/libs
Održavatelj: Steve Langasek <vorlon@debian.org>
Dekompresovana veličina: 250k
Zavisi: libc6 (>= 2.3.4-1), libltdl3 (>= 1.5.2-2), libmysqlclient12,
        odbcinst1debian1 (>= 2.2.11-3), zlib1g (>= 1:1.2.1), debconf (>= 0.5) |
        debconf-2.0
Preporučuje: unixodbc | libiodbc2
Sukobljava se sa: libmyodbc2.50.26, libmyodbc2.50.28, libmyodbc2.50.32,
                  libmyodbc2.50.37, unixodbc (< 2.1.1-2)
Zamjenjuje: libmyodbc2.50.26, libmyodbc2.50.28, libmyodbc2.50.32,
            libmyodbc2.50.37
Description: the MySQL ODBC driver
 This package allows you to connect to MySQL database servers using ODBC, the
 Open Database Connectivity abstraction layer which is understood by a variety
 of database tools that cannot talk to MySQL databases directly.

Akcije #5

Izmjenjeno od Ernad Husremović prije skoro 19 godina

mysql-server 4.1

hernad@desk-hernad:~$ aptitude show mysql-server-4.1
Paket: mysql-server-4.1
New: yes
State: installed
Automatically installed: no
Verzija: 4.1.15-1ubuntu5
Prioritet: opcionalno
Sekcija: universe/misc
Održavatelj: Christian Hammers <ch@debian.org>
Dekompresovana veličina: 38,1M
Zavisi: mysql-common (>= 4.1.15-1ubuntu5), mysql-client-4.1 (>= 4.1.15-1ubuntu5)        | mysql-client (>= 4.1.15-1ubuntu5), libdbi-perl, perl (>= 5.6), libc6
        (>= 2.3.4-1), libgcc1 (>= 1:4.0.2), libmysqlclient14, libncurses5 (>=
        5.4-5), libreadline5 (>= 5.1), libstdc++6 (>= 4.0.2-4), libwrap0, zlib1g        (>= 1:1.2.1), adduser (>= 3.40), psmisc, passwd, mailx, debconf (>= 0.5)        | debconf-2.0
Sukobljava se sa: mysql-server (< 4.1.15-1ubuntu5)
Zamjenjuje: mysql-server
Provides: virtual-mysql-server, mysql-server
Provided by: mysql-server-5.0
Description: mysql database server binaries
 MySQL is a fast, stable and true multi-user, multi-threaded SQL database
 server. SQL (Structured Query Language) is the most popular database query
 language in the world. The main goals of MySQL are speed, robustness and ease
 of use.

 This package includes the server binaries.

mediator server

ovaj server prima tcp/ip upite i prosljeđuje ih mysql-u, evo skripte

hernad@desk-hernad:~/repos/office$ cat /etc/init.d/medinit

#!/bin/sh
# Set MED_HOME to the directory from which you
# execute MEDIATOR server.
# Set MED_OWNER to the user name of the owner of
# MYSQL database (typically: mysql)
MED_HOME=/opt/mediator
MED_OWNER=mysql
ODBCINI=/opt/mediator/odbc.ini

if [ ! -f $MED_HOME/mediator ]
then
echo "Cannot start MEDIATOR server" 
exit
fi

su - $MED_OWNER -c $MED_HOME/mediator &

ovdje je sam server /opt/mediator

hernad@desk-hernad:/opt/mediator$ ls -l
total 664
-rw-rw-rw- 1 mysql mysql       93 2006-05-05 14:13 medactiv.log
-rw-rw-rw- 1 mysql mysql     4884 2006-05-05 15:39 mederror.log
-r-xrwxr-x 1 mysql mysql   439836 2006-03-17 10:35 mediator
-rw-rw-rw- 1 mysql mysql      139 2006-05-05 14:13 mediator.ver
-rwxrwxrwx 1 mysql mysql      330 2004-03-26 12:36 medinit
-rw-rw-rw- 1 mysql mysql    39894 2006-05-05 15:50 medlogin.lic
-rw-rw-rw- 1 mysql mysql      550 2006-05-05 14:13 medusers.lic
-rwxrwxrwx 1 root  nogroup   2062 2004-03-26 12:36 msvmsqlxen.txt
-rw-r--r-- 1 root  root    147856 2006-05-05 06:24 msvmsqlx_free.tgz
-rw-r--r-- 1 mysql mysql     1079 2006-05-05 14:12 odbc.ini
-rw-rw-rw- 1 mysql mysql       58 2006-05-05 14:13 rddexcpt.log
hernad@desk-hernad:/opt/mediator$

Akcije #6

Izmjenjeno od Ernad Husremović prije skoro 19 godina

kako se builda - pozove se ova skripta
hernad@desk-hernad:~$ cat /usr/local/bin/xmbld.sh

#
# Build script for single file xharbour (PRG) programs using
# Mediator with implicit start procedure declaration
#
# Usage:  xmbld.sh file
#
# Do not specify PRG extension!
# Remember to define PROCEDURE MAIN in yor program!
# Remember to customize MEDDIR and XHBBUILD variables!
#

# Default asumptions:
# ===================
# xHarbour is installed in
# /ur/bin - binaries
# /usr/include/xharbour - includes
# /usr/lib/xharbour - libraries
#
# Mediator client is installed in medcl
# subdirectory of your working directory
#
export XHBDIR=/usr
# set MEDDIR to the directory where Mediator client is installed
export MEDDIR=~/medcl
# set XHBBUILD to the name of the xHarbour build (for ex. build92)
export XHBBUILD=build996
rm $1
rm $1.c
rm $1.o

export HB_ARCHITECTURE=linux
export HB_BIN_INSTALL=/usr/bin
export HB_COMPILER=gcc
export HB_GT_LIB=gtcrs
export HB_INC_INSTALL=/usr/include/xharbour
export HB_LIB_INSTALL=/usr/lib/xharbour
export HB_MULTI_GT=yes
export HB_GPM_MOUSE = yes

# Compile and link the program

echo $XHBDIR/bin/harbour /b -i$XHBDIR/include/xharbour -i$MEDDIR/xhb/include $1.prg
$XHBDIR/bin/harbour -i$XHBDIR/include/xharbour -i$MEDDIR/xhb/include $1.prg

gcc $1.c -g -o $1 -I$XHBDIR/include/xharbour -L$XHBDIR/lib/xharbour \
    $MEDDIR/xhb/lib/$XHBBUILD/medntx.a \
    $MEDDIR/xhb/lib/$XHBBUILD/cmnnet32.a \
    -ldebug -lvm  -lrtl -llang -lrdd -lrtl -lvm  -lmacro  -lpp  -lcommon  -lnulsys -lrdd  -ldbfntx  -ldbfcdx  -ldbffpt  -lhbsix  -lhsx -lpcrepos -lgtnul -lgtcrs -lncurses -lpcrepos -lm -lgpm -lpthread

#-lm -ldebug -lvm -lrtl -lcodepage -llang -lrdd -lrtl -lvm -lmacro -lpp -ldbffpt -ldbfntx -ldbfcdx -lcommon -lgtcrs -lncurses -lpthread -lgpm -lpcrepos -lhbsix

#--start-group   -ldebug  -lvm  -lrtl  -llang  -lrdd  -lrtl  -lvm  -lmacro  -lpp  -lcommon  -lnulsys  -ldbfntx  -ldbfcdx  -ldbffpt  -lhbsix  -lhsx -lpcrepos -lgtnul -lgtcrs -lncurses -lpcrepos -lm -Wl,--end-group

strip $1

Akcije #7

Izmjenjeno od Ernad Husremović prije skoro 19 godina

Primjeri, prvi testovi

nalazi se par primjera koje sam uspješno pokrenuo, koliko primjeti rade sasvim brzo

Što se tiče utroška resursa, radi se (na prvi pogled) o malom utrošku

primjera radi mediator server uzima 8MB ram-a, mysql nekih 20-tak mb-a

to znači da ova rješenja definitivno ne bi trebala biti sporna ni za rješenja kao što su pc kase (iako ne znam kako se mysql ponaša u slučajevima drndanja - paljenja gašenja računara ...)

Akcije #10

Izmjenjeno od Ernad Husremović prije skoro 19 godina

kako se stvar pokreće

uzeću ovaj primjer
run first - kreiranje tabela

ako nemam nikakvog inija
onda me dočeka login screen
  • Username:
  • password:
  • data source:
  • mediator ip:
  • mediator port:

ako imam medapp.ini sa ovim sadržajem

# active after setting MEDCONN to mysql_test
#
test:mednodeaddr=127.0.0.1
test:medsocket=19c8
test:medcs=test
test:meduser=root
test:medpasswd=*****

onda me ništa ne pita nego se bez login prozora prijavi na bazu

Akcije #11

Izmjenjeno od Ernad Husremović prije skoro 19 godina

što se tiče postavki odbca (koje su potrebne opet mediator serveru da se zakači, one su ovakve

/opt/mediator/odbc.ini

[test]
Driver       = /usr/lib/odbc/libmyodbc.so
Description  = MySQL ODBC 3.51 Driver DSN
SERVER       = localhost
PORT         = 3306
USER         = root
Password     =
Database     = test
OPTION       = 3
SOCKET       = /var/run/mysqld/mysqld.sock

ODBCINI varijabla mora biti setovana za korisnika mysql

su hernad@desk-hernad:~$ sudo su - mysql
Password:
mysql@desk-hernad:~$ echo $ODBCINI
/opt/mediator/odbc.ini
mysql@desk-hernad:~$

da bi se mediator znao zakačiti preko odbc-a

Akcije #12

Izmjenjeno od Ernad Husremović prije skoro 19 godina

iOdbc testovi

iodbctest je koristan da vidimo da li je sve podešeno:

mysql@desk-hernad:~$ iodbctest
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0305.1107

Enter ODBC connect string (? shows list): ?

DSN                              | Driver
------------------------------------------------------------------------------
myodbc                           | MySQL ODBC 2.50 Driver DSN
myodbc3                          | MySQL ODBC 3.51 Driver DSN
test                             | mysql test

Enter ODBC connect string (? shows list): dsn=test
Driver: 03.51.11 (libmyodbc3.so)

SQL>show tables;

Tables_in_test
----------------------------------------------------------------
CLPDB
CLPDB_MEMO
CLP_TABLES
CLP_TAB_COLS
CLP_TYPES
DDBBUUUU_EXT
DEPT
EMP
TEST101

 result set 1 returned 9 rows.

SQL>select * emp limit 1
1: SQLExec = [MySQL][ODBC 3.51 Driver][mysqld-4.1.15-Debian_1ubuntu5-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'emp limit 1' at line 1 (1064) SQLSTATE=23000

SQL>select * from emp limit 1
1: SQLExec = [MySQL][ODBC 3.51 Driver][mysqld-4.1.15-Debian_1ubuntu5-log]Table 'test.emp' doesn't exist (1146) SQLSTATE=42S01

SQL>select * from EMP limit 1

RECNO       |IS_DELETED|EMPNO |ENAME     |JOB      |HIREDATE  |SAL      |DEPTNO
------------+----------+------+----------+---------+----------+---------+------
1           |N         |7839  |KING      |PRESIDENT|1000-01-01|5000.00  |10

 result set 1 returned 1 rows.

SQL>

Akcije #13

Izmjenjeno od Ernad Husremović prije skoro 19 godina

ostala zapažanja, rezime

nisam naveo outpute pojedinih demo aplikacija jer nisam skontao kako da uzmem xterminal screen (u character režimu)

Međutim ono što sam skontao čitajuči uputstvo i na osnovu dosadašnjih testova jeste:

Xharbour/mediator rdd/mysql je kombinacija koja bi za nekih dvije sedmice dana trebala obezbjediti fmk verzije koje sve vrte na mysql-u

Mislim da je ovo dobar i optimalan pristup za brzu realizaciju Linux 100% zadatka

Akcije #14

Izmjenjeno od Ernad Husremović prije skoro 19 godina

nakon ubijanja dos-a/dbf-a imamo mysql baze koje možemo napadati odakle nam volja

iz ruby/rails, iz jave (iz eclipse/BIRT-a), iz mono-a, ...

a to je super stvarka

Akcije #15

Izmjenjeno od Ernad Husremović prije skoro 19 godina

aktivnosti na upoznavanju xharbour/mediator/mysql nastavljam na #365

Akcije #16

Izmjenjeno od Saša Vranić prije oko 18 godina

  • Status promijenjeno iz Novo u Zatvoreno
  • Resolution postavljeno na fixed
Akcije

Također dostupno kao Atom PDF