Archive for the ‘download’ Category

MySQL 5.0 and 5.1 available on Solaris 11

Январь 18th, 2012

The installation through the Solaris repository is as simple as typing:

$ pkg install mysql-50

to obtain MySQL 5.0.91 (status Jan 18, 2012) or click on this link to launch the interactive installer.

$ pkg install mysql-51

to obtain MySQL 5.1.37 (status Jan. 18, 2012) or click on this link to launch the interactive installer.


PlanetMySQL Voting: Vote UP / Vote DOWN

Nginx-Fu: X-Accel-Redirect From Remote Servers

Июнь 24th, 2010

We use nginx and its features a lot in Scribd. Many times in the last year we needed some pretty interesting, but not supported feature – we wanted nginx X-Accel-Redirect functionality to work with remote URLs. Our of the box nginx supports this functionality for local URIs only. In this short post I want to explain how did we make nginx serve remote content via X-Accel-Redirect.

First of all, here is what you may need this feature. Let’s imagine you have a file storage on Amazon S3 where you store tons of content. And you have an application where you have some content downloading functionality that you want to be available for logged-in/paying/premium users and/or you want to keep track of downloads your users perform on your site. If your content was on your web server, you could have used simple controlled downloads functionality built-in to nginx out of the box. But the problem is that your content is remote.

Here is what we do to solve this problem.

First, we create a special location on our nginx server. This location will be used as a proxy for all our accelerated file downloads:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Proxy download
location ~* ^/internal_redirect/(.*?)/(.*) {
    # Do not allow people to mess with this location directly
    # Only internal redirects are allowed
    internal;

    # Location-specific logging
    access_log logs/internal_redirect.access.log main;
    error_log logs/internal_redirect.error.log warn;

    # Extract download url from the request
    set $download_uri $2;
    set $download_host $1;

    # Compose download url
    set $download_url http://$download_host/$download_uri;

    # Set download request headers
    proxy_set_header Host $download_host;
    proxy_set_header Authorization '';

    # The next two lines could be used if your storage
    # backend does not support Content-Disposition
    # headers used to specify file name browsers use
    # when save content to the disk
    proxy_hide_header Content-Disposition;
    add_header Content-Disposition 'attachment; filename="$args"';

    # Do not touch local disks when proxying
    # content to clients
    proxy_max_temp_file_size 0;

    # Download the file and send it to client
    proxy_pass $download_url;
}

After adding this location to our nginx config we could start sending responses with headers like the following:

1
2
3
4
5
6
7
# This header will ask nginx to download a file
# from http://some.site.com/secret/url.ext and send it to user
X-Accel-Redirect: /internal_redirect/some.site.com/secret/url.ext

# This header will ask nginx to download a file
# from http://blah.com/secret/url and send it to user as cool.pdf
X-Accel-Redirect: /internal_redirect/blah.com/secret/url?cool.pdf

Here is an example code you could use in a Rails application to use our internal redirect location:

1
2
3
4
5
6
7
8
9
10
def x_accel_url(url, file_name = nil)
  uri = "/internal_redirect/#{url.gsub('http://', '')}"
  uri << "?#{file_name}" if file_name
  return uri
end

def download
  headers['X-Accel-Redirect'] = x_accel_url(some_secret_url, pretty_name)
  render :nothing => true
end

As you can see, nginx is really powerful tool and when you turn your creativity on you can make it even more powerful. Stay tuned for more Nginx-Fu posts.



PlanetMySQL Voting: Vote UP / Vote DOWN

GRAPH Engine Linux binaries in MySQL 5.0.86-d10 available now

Октябрь 23rd, 2009

At this point we have a 32-bit and a 64-bit Linux binary tarball, should work on most Ubuntu and CentOS and the like (I tested a few). Possibly OSX coming. Not sure on Windows right now.

For further details and download links, see yesterday’s release post.


PlanetMySQL Voting: Vote UP / Vote DOWN

GRAPH Engine source in MySQL 5.0.86-d10 available now

Октябрь 22nd, 2009

It’s time to play! A special thanks particularly to Antony Curtis for the excellent smart and actually very speedy coding, and for just being a great guy to work with. If you would like to utilise his ace MySQL knowledge and coding skills, do talk to me!

Right now, we have a source tarball available for you, patching OQGRAPH on top of a MySQL 5.0.86-d9-Sail (OurDelta) source. As you know MySQL 5.0 does not have engine plugins so patching is the only way we can put it in. This OQGRAPH codebase is licensed under GPLv2+.

Even though we’ve successfully built it on several platforms and architectures, since this is the first public release we’d like you to try it first, as we’re sure that there might be problems on some platforms. When we catch and fix those, we can do proper package builds.

You will find the link to the source tarball, and other necessarily instruction and configuration, on the documentation page. It’s tempting to skim through it and just start playing, but I recommend you really read through first: this engine is quite different. Please explore, and tell us what you think!

To contact Open Query directly about the GRAPH engine, email g r a p h (at) o p e n q u e r y (dot) c o m


PlanetMySQL Voting: Vote UP / Vote DOWN

MySQL Labs : server snapshots available for download

Август 18th, 2009

Users familiar with the MySQL development process will remember that our developers use a tool called pushbuild, which builds the server code with the latest changes, using several operating systems, and runs the test suite.

MySQL Labs

This tool produces one binary package for each platform where the test runs, and every day there are a few dozen of such packages, waiting to be deleted and replaced by the ones created with the next build.

For long time, several people suggested publishing these binaries for the community. Each time, there was some minor or major impediment, such as getting together different teams and requesting resources from a third one. But the community team persisted and kept banging at the door until, at last, we can announce that the binaries are available for download at labs.mysql.com.

These binaries are temporary. You will find online for a few days, and they will eventually be replaced by newer ones. The exact dates of updates are not known. We build every day, but not all the builds are successful. Builds that fail to compile don't produce any binary, and builds that fail the test suite are not exported to the snapshot pages either.

But the binaries will be available fairly often, allowing the community to do early testing on bug fixes or new features.

A word of caution. These binaries have passed a test suite, but they have not been tested extensively like the monthly releases. Therefore, these binaries are for testing only, not for production. To make things clear, the package names include the word "snapshot" and the build date. And the files are not in the same page as the official releases.

Currently (2009-08-18) there are two branches: the latest 5.1 builds and the 5.1 GIS. For each branch, we plan to keep online at least the latest two builds before purging the oldest ones, but we may increase this number if we see that storage is not a problem.

Further releases will be introduced next month.

Notice that, unlike the normal releases, only a few platforms are included, and there are no dedicated packages (.dmg, .pkg, .deb, .rpm) but only tarballs (tar.gz, or zip for Windows). These packages are supposed to be used for testing only. In every Unix system, you can install them using MySQL Sandbox or, if it suits you, a manual installation.

I would like to thank the web and build teams who have worked together to provide this feature, and especially Daniel Fischer and Markus Popp, who delivered the ultimate goods.

Your feedback is valuable. Please let us know what you did with the snapshots.


PlanetMySQL Voting: Vote UP / Vote DOWN