Bindings for Amazon S3

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

Bindings for Amazon S3

Alexander Gladysh
Hi, list!

Are there any bindings to the Amazon S3 API for Lua?

Or are there any libraries I could bind (if they are in C/C++) or copy
(if they are in some other language)?

Thanks,
Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Matthew Wild
On 9 November 2010 12:50, Alexander Gladysh <[hidden email]> wrote:
> Hi, list!
>
> Are there any bindings to the Amazon S3 API for Lua?
>
> Or are there any libraries I could bind (if they are in C/C++) or copy
> (if they are in some other language)?
>

Not that I'm aware of, though I was looking at this only yesterday (as
a possible storage backend for Prosody). In fact S3 is just simple
HTTP requests, with some additional headers. So there's not much to
create a library out of - but if anyone does, please make it possible
to work with any (including asynchronous) HTTP API :)

Matthew

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

steve donovan
In reply to this post by Alexander Gladysh
On Tue, Nov 9, 2010 at 2:50 PM, Alexander Gladysh <[hidden email]> wrote:
> Or are there any libraries I could bind (if they are in C/C++) or copy
> (if they are in some other language)?

http://aws.amazon.com/code  - there's Java bindings, which are usually
pretty easy to use from LuaJava.

Lots of PHP (of course) and Python stuff:

http://aws.amazon.com/code/Python

Since it's all SOAP and REST it should be straightforward - all the
parts are available.

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
On Tue, Nov 9, 2010 at 16:13, steve donovan <[hidden email]> wrote:
> On Tue, Nov 9, 2010 at 2:50 PM, Alexander Gladysh <[hidden email]> wrote:
>> Or are there any libraries I could bind (if they are in C/C++) or copy
>> (if they are in some other language)?

> http://aws.amazon.com/code  - there's Java bindings, which are usually
> pretty easy to use from LuaJava.

I would like to avoid bringing Java as a dependency for my project. :-)

> Lots of PHP (of course) and Python stuff:

> http://aws.amazon.com/code/Python

> Since it's all SOAP and REST it should be straightforward - all the
> parts are available.

I see. Well, looks like I will have to write my own Lua code, based on these.

I think I'll be able make it independent from any private code and
publish it under a MIT license. Any suggestions on the API?

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

François Perrad


2010/11/9 Alexander Gladysh <[hidden email]>
On Tue, Nov 9, 2010 at 16:13, steve donovan <[hidden email]> wrote:
> On Tue, Nov 9, 2010 at 2:50 PM, Alexander Gladysh <[hidden email]> wrote:
>> Or are there any libraries I could bind (if they are in C/C++) or copy
>> (if they are in some other language)?

> http://aws.amazon.com/code  - there's Java bindings, which are usually
> pretty easy to use from LuaJava.

I would like to avoid bringing Java as a dependency for my project. :-)

> Lots of PHP (of course) and Python stuff:

> http://aws.amazon.com/code/Python

> Since it's all SOAP and REST it should be straightforward - all the
> parts are available.

I see. Well, looks like I will have to write my own Lua code, based on these.

 
Currently, I work on a generic ReST client, where the API is described by a JSON file.
See http://github.com/fperrad/lua-Spore & http://lumberjaph.net/misc/2010/09/17/spore.html

François.
 
I think I'll be able make it independent from any private code and
publish it under a MIT license. Any suggestions on the API?

Alexander.


Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

steve donovan
In reply to this post by Alexander Gladysh
On Tue, Nov 9, 2010 at 3:33 PM, Alexander Gladysh <[hidden email]> wrote:
> I would like to avoid bringing Java as a dependency for my project. :-)

Yes, using just a little Java is like being just a little pregnant...

steve d.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Javier Guerra Giraldez
On Tue, Nov 9, 2010 at 11:10 AM, steve donovan
<[hidden email]> wrote:
> Yes, using just a little Java is like being just a little pregnant...

(lots of bloat, painful to deliver, and a project on its own that will
need to be supported for the rest of your life)

--
Javier

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
In reply to this post by François Perrad
On Tue, Nov 9, 2010 at 18:58, François Perrad <[hidden email]> wrote:
> 2010/11/9 Alexander Gladysh <[hidden email]>
>> On Tue, Nov 9, 2010 at 16:13, steve donovan <[hidden email]>
>> wrote:
>> > On Tue, Nov 9, 2010 at 2:50 PM, Alexander Gladysh <[hidden email]>
>> > wrote:
>> > Lots of PHP (of course) and Python stuff:

>> > http://aws.amazon.com/code/Python

>> > Since it's all SOAP and REST it should be straightforward - all the
>> > parts are available.

>> I see. Well, looks like I will have to write my own Lua code, based on
>> these.

> Currently, I work on a generic ReST client, where the API is described by a
> JSON file.
> See http://github.com/fperrad/lua-Spore &
> http://lumberjaph.net/misc/2010/09/17/spore.html

Why JSON when you can use Lua tables?

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alex Bradbury
On 9 November 2010 16:25, Alexander Gladysh <[hidden email]> wrote:
> On Tue, Nov 9, 2010 at 18:58, François Perrad <[hidden email]> wrote:
>> Currently, I work on a generic ReST client, where the API is described by a
>> JSON file.
>> See http://github.com/fperrad/lua-Spore &
>> http://lumberjaph.net/misc/2010/09/17/spore.html
>
> Why JSON when you can use Lua tables?

So you can have a single spec.json which can easily be interpreted by
similar generic REST libraries for Perl, Python, Ruby etc.

Alex

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
On Tue, Nov 9, 2010 at 20:35, A.S. Bradbury <[hidden email]> wrote:
> On 9 November 2010 16:25, Alexander Gladysh <[hidden email]> wrote:
>> On Tue, Nov 9, 2010 at 18:58, François Perrad <[hidden email]> wrote:
>>> Currently, I work on a generic ReST client, where the API is described by a
>>> JSON file.
>>> See http://github.com/fperrad/lua-Spore &
>>> http://lumberjaph.net/misc/2010/09/17/spore.html

>> Why JSON when you can use Lua tables?

> So you can have a single spec.json which can easily be interpreted by
> similar generic REST libraries for Perl, Python, Ruby etc.

Cool, but what's happened with "you don't pay for what you don't use"?

I'd prefer to have pure Lua initialization interface and then some
adaptor to understand standard JSON format.

But, anyway, sorry for ranting. François, thank you for making this
library for the community!

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Pierre Chapuis
In reply to this post by Alexander Gladysh


"Alexander Gladysh" <[hidden email]> a écrit :

>Why JSON when you can use Lua tables?

Because SPORE is a cross-language format: the same API description can be used with another client. I know there are implementations in Perl, Ruby, Clojure and Python. There is probably one in JS, too.
--
Pierre 'catwell' Chapuis

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

François Perrad
In reply to this post by Alexander Gladysh


2010/11/9 Alexander Gladysh <[hidden email]>
On Tue, Nov 9, 2010 at 20:35, A.S. Bradbury <[hidden email]> wrote:
> On 9 November 2010 16:25, Alexander Gladysh <[hidden email]> wrote:
>> On Tue, Nov 9, 2010 at 18:58, François Perrad <[hidden email]> wrote:
>>> Currently, I work on a generic ReST client, where the API is described by a
>>> JSON file.
>>> See http://github.com/fperrad/lua-Spore &
>>> http://lumberjaph.net/misc/2010/09/17/spore.html

>> Why JSON when you can use Lua tables?

> So you can have a single spec.json which can easily be interpreted by
> similar generic REST libraries for Perl, Python, Ruby etc.

Cool, but what's happened with "you don't pay for what you don't use"?

I'd prefer to have pure Lua initialization interface and then some
adaptor to understand standard JSON format.


Good idea.
I added a 3rd constructor which uses a single Lua table.

François
 
But, anyway, sorry for ranting. François, thank you for making this
library for the community!

Alexander.


Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
On Wed, Nov 10, 2010 at 01:28, François Perrad <[hidden email]> wrote:

> 2010/11/9 Alexander Gladysh <[hidden email]>
>> On Tue, Nov 9, 2010 at 20:35, A.S. Bradbury <[hidden email]> wrote:
>> > On 9 November 2010 16:25, Alexander Gladysh <[hidden email]> wrote:
>> >> On Tue, Nov 9, 2010 at 18:58, François Perrad
>> >> <[hidden email]> wrote:
>> >>> Currently, I work on a generic ReST client, where the API is described
>> >>> by a
>> >>> JSON file.
>> >>> See http://github.com/fperrad/lua-Spore &
>> >>> http://lumberjaph.net/misc/2010/09/17/spore.html

>> >> Why JSON when you can use Lua tables?

>> > So you can have a single spec.json which can easily be interpreted by
>> > similar generic REST libraries for Perl, Python, Ruby etc.

>> Cool, but what's happened with "you don't pay for what you don't use"?

>> I'd prefer to have pure Lua initialization interface and then some
>> adaptor to understand standard JSON format.

> Good idea.
> I added a 3rd constructor which uses a single Lua table.

Great, thanks!

Does any one know about SPORE specs for Amazon S3 :-)

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Valerio
In reply to this post by Alexander Gladysh
Hello,

On Tue, Nov 9, 2010 at 1:50 PM, Alexander Gladysh <[hidden email]> wrote:
Hi, list!

Are there any bindings to the Amazon S3 API for Lua?

did you finally find such bindings ? 

thanks,
valerio 
Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
On Thu, Jan 6, 2011 at 16:49, Valerio Schiavoni
<[hidden email]> wrote:
> On Tue, Nov 9, 2010 at 1:50 PM, Alexander Gladysh <[hidden email]>
> wrote:

>> Are there any bindings to the Amazon S3 API for Lua?

> did you finally find such bindings ?

No, but then it is not time when I would need them yet. It creeps
closer though, I'll need them soon enough. :-)

My current plan is to code something in Lua-Spore when the time comes...

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
On Thu, Jan 6, 2011 at 21:24, Alexander Gladysh <[hidden email]> wrote:
> On Thu, Jan 6, 2011 at 16:49, Valerio Schiavoni
> <[hidden email]> wrote:
>> On Tue, Nov 9, 2010 at 1:50 PM, Alexander Gladysh <[hidden email]>
>> wrote:

>>> Are there any bindings to the Amazon S3 API for Lua?

>> did you finally find such bindings ?

> No, but then it is not time when I would need them yet. It creeps
> closer though, I'll need them soon enough. :-)

> My current plan is to code something in Lua-Spore when the time comes...

Um. Did anyone implement Amazon S3 API support for Lua yet?

Is there, maybe, some way I can motivate interested parties to scratch
their itch and write a decent open-source (MIT) implementation? I
believe that Amazon S3 technology, while being commercial, is popular
enough to be useful for the Lua community.

I'll need this API "real soon now" (a month?), and I do not have
enough man/hours free to do this on my side. As a backup plan, I'll
have to code it on my side when time comes, of course, but I'd rather
spend this effort on something more urgent.

Note that I can't officially hire non-Russian resident for a project
this small, too much hassle.

I'm open to suggestions.

Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alex Bradbury
On 31 January 2011 13:42, Alexander Gladysh <[hidden email]> wrote:
> Um. Did anyone implement Amazon S3 API support for Lua yet?
>
> Is there, maybe, some way I can motivate interested parties to scratch
> their itch and write a decent open-source (MIT) implementation? I
> believe that Amazon S3 technology, while being commercial, is popular
> enough to be useful for the Lua community.

Have you evaluated using LunaticPyton or Lupa to access a Python S3
library? http://pypi.python.org/pypi/lupa/0.18

Alex

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
On Mon, Jan 31, 2011 at 17:02, Alex Bradbury <[hidden email]> wrote:
> On 31 January 2011 13:42, Alexander Gladysh <[hidden email]> wrote:
>> Um. Did anyone implement Amazon S3 API support for Lua yet?

>> Is there, maybe, some way I can motivate interested parties to scratch
>> their itch and write a decent open-source (MIT) implementation? I
>> believe that Amazon S3 technology, while being commercial, is popular
>> enough to be useful for the Lua community.

> Have you evaluated using LunaticPyton or Lupa to access a Python S3
> library? http://pypi.python.org/pypi/lupa/0.18

Well, I did.

But if it will come to that, I think that I'd rather use s3cmd
command-line tool than care to bring a Lua-Python bridge as a
dependency in this project... Too many unknown variables. :-)

Thank you,
Alexander.

Reply | Threaded
Open this post in threaded view
|

Re: Bindings for Amazon S3

Alexander Gladysh
In reply to this post by Alexander Gladysh
On Thu, Jan 6, 2011 at 21:24, Alexander Gladysh <[hidden email]> wrote:
> On Thu, Jan 6, 2011 at 16:49, Valerio Schiavoni
> <[hidden email]> wrote:
>> On Tue, Nov 9, 2010 at 1:50 PM, Alexander Gladysh <[hidden email]>
>> wrote:

>>> Are there any bindings to the Amazon S3 API for Lua?

>> did you finally find such bindings ?

> No, but then it is not time when I would need them yet. It creeps
> closer though, I'll need them soon enough. :-)

> My current plan is to code something in Lua-Spore when the time comes...

Well, here is the preliminary version:

https://github.com/fperrad/lua-Spore/pull/6

You can see the set of use cases here:

https://gist.github.com/832118

Comments and critique are welcome.

Alexander.