Cassandra Db in windows 7 xampp - windows

I need to store stock market data and stock graph datas for my site . so i am selecting two db's mongo and cassandra and i finalize cassandra db, i am using windows 7 , Xampp and i need to use this in yii. i am installing data stack it is working in cli and its also working in (localhost:8888) . so now how can i connect it in yii site .
Is this requirement solvable? I need the steps to connect. Because diffrent site tells the different solution.
Thanks in advance

You need to connect a client to your php framework
PDO driver - https://code.google.com/a/apache-extras.org/p/cassandra-pdo/
A popular php driver - https://github.com/thobbs/phpcassa
The pdo driver also supports CQL, which is good if you are just getting started.
note The project appears to be dead, but there is a github fork of it with recent updates: https://github.com/Orange-OpenSource/YACassandraPDO
phpcassa has lots of examples on how to get started in the github page. One thing to be aware of is that the example lists super columns, try to stay away from supper columns as they are somewhat deprecated.
The final option is to set up your cassandra server and host it inside of a webserver which can be queried (for example via rest) and this will give you access to more powerful java drivers, although the php drivers above should do the job.

Related

Nifi docker installation

I'm just new to Nifi. I was able to install Nifi and see it in webbrowser. Now as next step i want to connect to sql server, nevertheless it seems i have to install jdbc as well and here is my issue when i look at tutorials all referencing to something called "docker" and advising to install jdbc from there. When i go into cmd and type docker cmd not recognize it. Can anyone tell me how to install it and what it is?
There is no need of docker for this use case.
All you have to do is download and install SQL server from official downloads page, if you don't have server setup.
Installation guide - https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server?view=sql-server-2017
You also need to download jar file which has JDBC driver stuff - https://learn.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server?view=sql-server-2017
In NiFi, you can use PutDatabaseRecord processor to insert/update/delete rows from table. This processor internally uses DBCPConnectionPool controller services to get database connections.
DBCPConnectionPool controller service requires below properties to be set.
Database connection url - jdbc:sqlserver://localhost:1433;databaseName=dbname
Driver class name -
com.microsoft.sqlserver.jdbc.SQLServerDriver
Driver (jar) location -
/tmp/sqlserver.jar (Example only)
PutDatabaseRecord Processor
DBCPConnectionPool controller service
I think you may want to google how to install Docker and what it is, it's already explained in many places.

mongo shell not showing all dbs

Good Day.
I've been developing with meteorJS which uses mongodb. No problems there. I've been using the mongo shell to access the database on my dev machine (osx 10.11). This is my first project with mongo and when the shell would load, it would connect to db.test and I'd always show dbs and get the list of database, then use myApp.
Yesterday whenever I go into the shell and I type show dbs the only one shown is local 0.078GB. However my app is still working and pulling and pushing data to the database.
I've checked the dbpath in the mongod.conf and that seems ok. I'm not entirely sure about the exact order of things, but two things where different (I'm not sure if these happened prior to the show dbs not showing everything or after, and I'm not sure which came first):
when loading the mongo shell I was getting this error:
WARNING: soft rlimits too low. Number of files is 256, should be at least 1000"
I followed these directions which seemed to stop that error from appearing (https://github.com/basho/basho_docs/issues/1402 )
I use Meteor Toys and for the first time I update user.profile.companyName (which is a custom field within the standard profile from within the Meteor Toys widget.
Just odd that the app can still access the database and collections, but that the mongo shell doesn't show. I've update mongod via brew upgrade mongodb from 3.0.2 to 3.0.7 to no avail.
Any ideas?
If you want to use the regular mongo console you have to specify the port to be 3001 for meteor apps instead of the default 27017. Otherwise it's much simpler to just type meteor mongo and connect that way. Then you can type 'show collections' and it will show them all just like normal.
MongoDB do not show the database unless if there is minimum of one collection with a document in it.
Refer to this link

migrating mod_plsql application to Oracle REST Data Services

I read on MOS Doc ID 1945619.1 that starting with the 12.1.3 Oracle HTTP Server (OHS), the mod_plsql feature has been deprecated and will not be included with the 12.2 Oracle HTTP Server.
For the future, Oracle recommends moving to Oracle REST Data Services (formerly known as Oracle APEX Listener) as an alternative to mod_plsql.
Our shop have a lot of mod_plsql applications (i.e. applications written usinjg HTP/HTF packages) in production. Since I don't know anything about Oracle REST Data Services I'm asking you if we can migrate the old applications to this new product without changing the code.
Thank you.
Kind regards, Cristian
Doug McMahon (Oracle employee) has a great open source module for Apache.
Apache PL/SQL Gateway Module
(mod_owa)
https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm
I am using it in a production environment and I highly recommend it. It's really fast and rock solid.
You need to do some compiling but it's worth it being able to use Apache 2.4 and mod_plsql.
Steps:
download httpd 2.4.? from apache.org + extract
If Centos 6 or less download apr and apr-util
configure with enable-so, make and make install
./configure --enable-so --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
Download mod_owa + unzip
create empty directory. Copy all files from "apache24" into new folder. Copy all files from "src" to new folder
enter new folder and edit modowa.mk <-- important add $ORACLE_HOME, edit APACHE_TOP
Copy mod_owa.so to apache's modules
Add a modowa.conf in Apache's conf/ dir.
Example modowa.conf:
loadModule owa_module modules/mod_owa.so
<Location /pls>
Options None
SetHandler owa_handler
OwaUserid user/pass
OwaNLS AMERICAN_AMERICA.AL32UTF8
OwaPool 100
OwaStart "package.procedure"
OwaDocProc "wwv_flow_file_mgr.process_download"
OwaDocTable photos_upload BLOB_CONTENT
OwaUploadMax 50M
OwaCharset "utf8"
order deny,allow
allow from all
OwaReset LAZY
OwaCharsize 4
OwaFlex package.procedure
OwaHttp REST
</Location>
Before starting httpd ORACLE_HOME, NLS_LANG needs to be set (ORACLE_SID also if local). It needs access to an Oracle Home with libclntsh.so. (Oracle client will do).
I simply added oracle.conf (one line full path to oracle home/lib) under /etc/ld.so.conf.d (+ ldconfig)
Really scalable and a much cleaner setup then OHS.
My shop is pretty much in the same situation as you are.
We also have some very large mod_plsql/htp based applications and will have to migrate to the Oracle REST Data Services at some point.
We have already spend quite some time in testing different ORDS configuration and our overall conclusions are:
only APEX applications are fully supported
key functionality is still available
harder to configure and maintain
slight performance degradation
some mod_plsql configuration options do no longer exist or have changed
The biggest problems we are currently facing (and actually preventing us from switching to ORDS) are some restrictions when using non-APEX (pure HTF/HTP) applications.
We already filed some SR's because some functionality in ORDS (for example the file upload and download API) is only available when running an APEX application.
The biggest hurdle to get over is setting up Oracle Rest Services (ORS) and securing it. Once this is done, your web toolkit apps will work the same. The url may slightly change, so if you've referenced URLs using full paths as opposed to relative paths you might need modify code.
I am not sure if ORS is as powerful as Apache in areas like mod_rewrite, mod_proxy, virtual hosts with multiple ip addresses, etc...
Another open source alternative is tox.

How Will Joomla work with MariaDB?

I am already have WAMP stack in my system and I am using Joomla based system. To test MariaDB before using, I installed MariaDB also in my system with Port number 3305. Now, when I try to install Joomla 2.5, there is only option to choose MySQL or MySQLi. Also, there is no option to choose port. Also, there is no such variable in configuration file to add port number and use MariaDB.I think, MariaDB is similar to MySQL so no additional driver required for it.
I am able to connect MariaDB through SQL client as well as from command prompt by just adding port number. So, How can I use MariaDB in Joomla application?
I think it will work if you use the 5.x version. They should act the same as 'normal' mysql. See https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/ to read more about the compatibility betweet MySQL and MariaDB.
Joomla works with MariaDB seamlessly.
You need to make sure you have pdo_mysql available by installing the php-mysql module (may be called php5-mysql depending on your OS and repo).
If its installed properly MariaDB will show up under the mysql heading in phpinfo();
The term "Drop in replacement for MySQL" is being thrown around a lot and MariaDB is far from that. Many things about it are not compatible with MySQL including one major whoopsie: -
MariaDB does not know the variable name default-character-set and if you try to set it in your /etc/my.conf like default-character-set = utf8 the service will not start.
I havent found a way run MariaDB on a server running MySQL or visa versa (not that youd usually want to) since the supporting libs clash. So if you wanna replace one with the other you have to be sure to clean up all dependencies.
The name also makes me uneasy, placing all of my information in a database named Maria feels akin to passing my credit cards to my wives and daughters, just nerve wracking.
But, it does "Drop In" to Joomla just fine.
Enter localhost:3305 as hostname.

Can you connect to a MS Access database from Ruby running on a Mac?

I'm pretty sure the answer is "no" but I thought I'd check.
Background:
I have some legacy data in Access, need to get it into MySQL, which will be the DB server for a Ruby application that uses this legacy data.
Data has to be processed and transformed. Access and MySQL schemas are totally different. I want to write a rake task in Ruby to do the migration.
I'm planning to use the techniques outlined in this blog post: Using Ruby and ADO to Work with Access Databases. But I could use a different technique if it solves the problem.
I'm comfortable working on Unix-like computers, such as Macs. I avoid working in Windows because it fills me with deep existential horror.
Is there a practical way that I can write and run my rake task on my Mac and have it reach across the network to the grunting Mordor that is my Windows box and delicately pluck the data out like a team of commandos rescuing a group of hostages? Or do I have to just write this and run it on Windows?
Why don't you export it from MS-Access into Excel or CSV files and then import it into a separate MySQL database? Then you can rake the new one to your heart's content.
Mac ODBC drivers that open Access databases are available for about $30.00
http://www.actualtechnologies.com/product_access.php is one. I just run access inside vmware on my mac and expore to csv/excel as CodeSlave mentioned.
ODBC might be handy in case you want to use the access database to do a more direct transfer.
Hope that helps.
I had a similar issue where I wanted to use ruby with sql server. The best solution I found was using jruby with the java jdbc drivers. I'm guessing this will work with access as well, but I don't know anything about access

Resources