Arc Forumnew | comments | leaders | submitlogin
2 points by akkartik 3316 days ago | link | parent

That sounds amazing! I'd never heard that about sqlite. Patches would be most welcome. If you tell me your github username I'll give you commit rights to anarki.


2 points by highCs 3316 days ago | link

> That sounds amazing! I'd never heard that about sqlite.

Cool happy that sounds like interesting stuff.

> If you tell me your github username

Please find my github profile on my arc forum profile.

> I'll give you commit rights to anarki

I would be happy to contribute. Well, I have to, that's a duty; I'm given such an amazing language in the first place.

So I have these sqlite obj. I've coded worker processes which you can spawn and kill (they use the db to register, take jobs and kill themselves). You can give them any job by supplying a list. They return the result (using the db again).

I'm planning to write a cluster.arc, which manage a bunch of http servers which you can spawn and kill the same way as the worker processes (well you could do that using the worker processes themselves, I dont remember why I didnt retain that idea though, will remember...). Easy to use behind a reverse proxy, that's the goal.

I have a with-lock macro, which takes an id in argument; its like atomic but associated to an id (use the db again, so that it works inter-processes)(there is something similar in racket using files).

I have let1, alet1, when1 and aor. Not sure those macro are all relevant.

I'll be happy to contribute with the relevant part. Give me a few weeks though. Still have to tests most of these things and I'll need time to extract them from the pet-project.

-----

2 points by akkartik 3316 days ago | link

Absolutely; take your time.

-----

2 points by highCs 3311 days ago | link

Since sqlite is daemon-less, it doesnt work well when multiple processes try to access the same database; one starts receiving database locked errors. I'll see if I can find a daemon-less database engine which handles that. I want to run multiple arc http servers accessing a single database behind a load-balancer and I want a client app to have parallelism using worker processes, which would use the same kind of database engine. So I'm looking for a daemon-less database engine that multiple processes can access concurrently without me having to implement anything to support that and which works under windows, linux and OSX. Anyone knows one? I'm looking at Sophia right now [1]

[1] http://sphia.org/

-----

2 points by highCs 3309 days ago | link

Sophia doesn't allow multiple processes to access the same databse.

-----

2 points by highCs 3308 days ago | link

What I could do however, is have a master process starts an http server with a daemon-less database. At this point, one can read and write the database at any time via http requests. Then I can make the worker processes thing works. Then Arc has parallelism.

-----