MonetDB: default - add support for unix sockets

Stefan Manegold Stefan.Manegold at cwi.nl
Fri Sep 6 11:31:27 CEST 2013


Gijs,

on a side note, please also be aware the there are no UNIX sockets on Windows.

Thanks!
Stefan

----- Original Message -----
> 
> Hi Stefan, others,
> 
> Question:
> 
> * Is the path to the socket always /tmp.s.merovingian.<port> and
>   /tmp.s.monetdb.<port> ?
> 
> * If not, is it okay if I just make these the defaults?
> 
> * The SQL MAPI over the monetdb socket seems to work fine, but the
>   control MAPI seems to be quite slow and for some commands (kill)
>   is hanging or maybe not correctly implemented. The control MAPI
>   protocol over a socket is a bit weird, it differs quite a lot
>   from the other implementations. Maybe you guys have an idea what
>   is going on? i've been looking at the C code and found some hints,
>   (like you need to send a 0 at the beginning of communicating over
>   a socket, but not in the case of control), but i'm a bit stuck now.
> 
> I've been working on this so we can control MonetDB databases from
> python without the need to require to set a managed passphrase. Also
> i'm working on a SQLAlchemy Dialect:
> 
>   https://github.com/gijzelaerr/sqlalchemy-monetdb
> 
> greetings,
> 
>  - Gijs
> 
> 
> On 05/09/13 18:56, Stefan Manegold wrote:
> > Hi Gijs,
> > 
> > in case you did not notice this, yet:
> > 
> > This checkin breaks several tests that do test or use the Python interface,
> > resulting in errors like
> > 
> > "
> > Traceback (most recent call last):
> >   File "delete_all.SQL.py", line 9, in <module>
> >     dbh = monetdb.sql.Connection(port=port,database=db,autocommit=True)
> >   File "PREFIX/lib/python2.7/site-packages/monetdb/sql/connections.py",
> >   line 49, in __init__
> >     unix_socket=unix_socket)
> >   File "PREFIX/lib/python2.7/site-packages/monetdb/mapi.py", line 96, in
> >   connect
> >     self.socket.connect(unix_socket)
> >   File "/usr/lib64/python2.7/socket.py", line 224, in meth
> >     return getattr(self._sock,name)(*args)
> > socket.error: [Errno 2] No such file or directory
> > "
> > 
> > or
> > 
> > "
> > Traceback (most recent call last):
> >   File "SOURCE/clients/examples/python/sqlsample.py", line 23, in <module>
> >     dbh =
> >     monetdb.sql.Connection(port=int(sys.argv[1]),database=sys.argv[2],autocommit=True)
> >   File "PREFIX/lib/python3.3/site-packages/monetdb/sql/connections.py",
> >   line 49, in __init__
> >     unix_socket=unix_socket)
> >   File "PREFIX/lib/python3.3/site-packages/monetdb/mapi.py", line 97, in
> >   connect
> >     self.socket.connect(unix_socket)
> > FileNotFoundError: [Errno 2] No such file or directory
> > "
> > 
> > 
> > See also, e.g., `Mtest.py sql/benchmarks/tpch/fileleak sql/test/concurrent
> > sql/test/mapi`
> > 
> > or our nightly TestWeb @
> > http://monetdb.cwi.nl/testweb/web/status.php?branch=default
> > as of tomorrow morning.
> 
> --
> Gijs Molenaar
> http://www.astro.uva.nl/people/gijs-molenaar/
> 
> 

-- 
| Stefan.Manegold at CWI.nl | DB Architectures   (DA) |
| www.CWI.nl/~manegold/  | Science Park 123 (L321) |
| +31 (0)20 592-4212     | 1098 XG Amsterdam  (NL) |




More information about the developers-list mailing list