GAWK as an Alchemy client.

1 view
Skip to first unread message

minkymorgan

unread,
Dec 4, 2010, 11:06:27 AM12/4/10
to redisql-dev
Hi Jak

I have a question/idea for you.

Well, more it's an idea to kick around, so I don't mean push you in
directions you're not meaning to go....

I'm curious as the mechanics behind how a client accesses your lua/
alchemy server, and whether it's possible to mess with that API you
expose. For example, would it be possible to hack Alchemy's client
interface to mimic the MySql one closely enough to spoof a client
application into believing it was talking to mysql, even though it was
Alchemy it was conversing with?

The reason I ask is this. Writing a gawk extension wouldn't be easy
for me as my C is not great, but one already exists and runs very well
called SPAWK . I'd like to hook it up to Alchemy. SPAWK details are
here: http://sites.google.com/site/spawkinfo/Home/manual

It occurred to me that if Alchemy exposed it's client interface
according to the same API definition as the MySql one, SPAWK could be
fooled into connecting to Alchemy, and then used to construct and
submit Alchemy specific Alsoql queries and get responses. In my eyes
something like SPAWK would be an incredible client for your Alchemy
database, especially if GAWK could also hacked to run off data it
polled from a Redis Queue on a blockable-event basis, rather than
reading data just from STDIN.

Obviously, the other approach is to open up the SPAWK extension and to
modify it to connect to Alchemy ... which is probably much more
sensible, only I'm not sure I can judge the complexity of that work
not knowing the code behind it very well.

Just a thought.

Andrew


Jak Sprats

unread,
Dec 4, 2010, 5:51:53 PM12/4/10
to redisql-dev
Hi Andrew,

Mysql uses a binary protocol on the line. Mapping Mysql's binary
protocol to Alchemy's binary-safe ascii protocol is more likely more
work than just overriding the mysql calls in GAWK/SPAWK to call
Alchemy.

I dont think there is a trivial way to do this

- Jak

minkymorgan

unread,
Dec 6, 2010, 9:51:34 AM12/6/10
to redisql-dev
Yeah, after I wrote this I dug a little deeper and have to agree with
you there.
Not trivial. I'm going to have a look through the spawk code, see how
it works in more detail.
A
> > Andrew- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages