Author Topic: Seperate MySQL Server  (Read 5974 times)

wrotruck

  • Newbie
  • *
  • Posts: 11
    • View Profile
Seperate MySQL Server
« on: December 24, 2008, 05:31:03 pm »
Hi there:

I'm not sure where to post this so, I'll try posting the question here.  I have started working through my first installation and it seems that no matter how well I think I have have it planned it always seems like there is some new wrinkle that I think of.

In that vein, I have a MySQL server that handles my CMS (drupal), Gallery2 and team speak servers.  Is it possible to have Linux MCE use the MySQL Server that already exists on my network and shut down the MYSQL server that would run on the core?  My assertion is that this would free up some processor & RAM overhead on the core and help the network as a whole run a bit more effeciently.

This question was discussed about a year ago here:
http://forum.linuxmce.org/index.php?topic=1610.0

but there was really not published resolution.  Does anyone know if this is possible and what the process would be?

Thanks...

-Wil

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Seperate MySQL Server
« Reply #1 on: December 24, 2008, 05:40:57 pm »
No. It is currently not possible, and would be very difficult to implement, as not only the database abstraction libraries, but also the various scripts underneath make the assumption that the database is running on localhost.

If you would like this functionality, we do accept patches.

-Thom

wrotruck

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Seperate MySQL Server
« Reply #2 on: December 24, 2008, 06:24:29 pm »
Thom:

Thanks for the quick reply.  If that's the case would it be easier to backup the other databases and move them to the Linux MCE Core?

I wouldn't mind helping out with a patch if there is interest in it beyond my own.  Beyond picking through all the past work done, is there a place to find out what scripts, abstration libs, etc. would need to be altered?

Thanks...

-Wil

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Seperate MySQL Server
« Reply #3 on: December 25, 2008, 02:10:46 am »
1. Yes.

2. Yes. grep is your friend. look for RunSQL declarations in the shell and awk scripts, look for DBI calls in PERL scripts.

now, beware, there be dragons everywhere. I mean it. So you'll probably need to just do a lot of sifting with grep.

-Thom

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Seperate MySQL Server
« Reply #4 on: December 26, 2008, 02:47:53 am »
1. Yes.

2. Yes. grep is your friend. look for RunSQL declarations in the shell and awk scripts, look for DBI calls in PERL scripts.

now, beware, there be dragons everywhere. I mean it. So you'll probably need to just do a lot of sifting with grep.

-Thom

This may be a silly point, Thom, but shouldn't the SQL database also be implemented as a DCE device, and queries wrapped and passed through that? Or is that going too far?

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Seperate MySQL Server
« Reply #5 on: December 26, 2008, 08:51:23 am »
No.

-Thom

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Seperate MySQL Server
« Reply #6 on: December 26, 2008, 10:41:04 am »
1. Yes.

2. Yes. grep is your friend. look for RunSQL declarations in the shell and awk scripts, look for DBI calls in PERL scripts.

now, beware, there be dragons everywhere. I mean it. So you'll probably need to just do a lot of sifting with grep.

-Thom

This may be a silly point, Thom, but shouldn't the SQL database also be implemented as a DCE device, and queries wrapped and passed through that? Or is that going too far?
Hi,

AFAIK General Info plugin is slowly progressing toward your description. It's getting intermediate info server for user queries. Haven't tried yet, but I think that this will be the right answer in the future. But it will probably never give you all information from database...

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Seperate MySQL Server
« Reply #7 on: December 26, 2008, 10:01:02 pm »
Basically,

Any house-wide logic and query should be handled by their respective plugins.

Plugins have access to not only their own internal states, but also the internal states of all of the other plugins.

It would be a tragic mistake to do a thin wrapper as a database plugin, and instead the relevant commands should be added to the appropriate plugins to do the work.

The exception to this, is for data provider plugins which expressly provide stuff like data grids etc in other forms (XML, etc.) THESE SHOULD ONLY BE CREATED AND USED TO BRIDGE TO EXISTING INFRASTRUCTURES, AND SHOULD NOT BE USED AS A CRUTCH FOR NEW DEVELOPMENT.

-Thom

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Seperate MySQL Server
« Reply #8 on: December 27, 2008, 11:11:25 pm »
I recently got around to cleaning up the scripts (as you can see here) might not be all but it's a good start I reckon.
"Change is inevitable. Progress is optional."
-- Anonymous


hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Seperate MySQL Server
« Reply #9 on: December 28, 2008, 12:24:00 am »
cool zaerc, nice work!

br, Hari
rock your home - http://www.agocontrol.com home automation

wrotruck

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Seperate MySQL Server
« Reply #10 on: January 19, 2009, 10:04:54 pm »
UGH!  Dragons is a bit of an understatement!  This is sort of like a very dangerous mine field!

With the holidays over, I spent the last week using about a 1/2 hour a day to try and run the database calls back to their base applications and pick though the respective scripts.  To do this, I put tracked where the database queries were coming from.  The first thing I noticed was that each individual application was making its own queries.  This made sense as, fundamentally, LMCE is a collection of applications bolted together.

As I was blowing up a few installs trying to make the setting changes, I started to consider middleware.  If there was a small application to proxy, prioritize and redirect the querys as well as put schema into the database at creation/install that should solve the problem without requiring a hunt ans rewrite.

Thoughts?

-Wil

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2428
    • View Profile
    • ago control
Re: Seperate MySQL Server
« Reply #11 on: January 19, 2009, 10:32:06 pm »
like... a local database? :-p
rock your home - http://www.agocontrol.com home automation

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Seperate MySQL Server
« Reply #12 on: January 20, 2009, 03:51:03 am »
You're welcome.
"Change is inevitable. Progress is optional."
-- Anonymous


wrotruck

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Seperate MySQL Server
« Reply #13 on: January 20, 2009, 01:29:37 pm »
Lol.. guess I deserved that!  :D

As I am still a bit new to Linux MCE, I'm wondering how large the installations are and if it makes sense to worry about application priority in database queries.  That would be the big advantage to a proxy.  The nice side effect is that the application could direct the queries to either a localhost database or another database server.

I'll ask the question again, is this a community need or just something that only a few people are interested in?  I'm willing to try and do this but, I am not a great coder and this would be some work.

Thoughts?

-Wil


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Seperate MySQL Server
« Reply #14 on: January 20, 2009, 08:18:22 pm »
Very much a "nice to have" not a "need to have". Any work that takes the modularity and actually allows you to distribute the computing can't hurt and in some cases would be useful. However, in terms of load it really doesn't seem to be that necessary, and it doesn't resolve any single points of failure because the core is both the gateway and the DCE Router still.