[00:01] *** vmlemon_ has joined #kamaelia |
[01:35] *** eikenberry_ has joined #kamaelia |
[02:03] *** eikenberry_ has joined #kamaelia |
[02:33] *** eikenberry_ is now known as eikenberry |
[05:49] < Lawouach_> hmm |
[05:49] < Lawouach_> MemoryError in the CSA |
[06:10] *** vmlemon_ has joined #kamaelia |
[10:12] *** MS- has joined #kamaelia |
[10:12] < MS-> afternoon |
[10:16] < Lawouach_> heya |
[10:17] *** Uraeus has joined #kamaelia |
[10:20] < Lawouach_> doing some micro optimisation |
[10:20] < Lawouach_> crazy stuff :) |
[10:40] < MS-> Cool |
[10:41] < MS-> If there's anything you want merged back, just let me know :) |
[10:42] < Lawouach_> will do |
[10:42] < Lawouach_> for now I'm focusing on headstock and bridge (the xml parser) |
[10:42] < MS-> cool |
[10:48] < MS-> I appear to be trying to write a test that a time source that ticks every second does so within a certain time accuracy. |
[10:48] < MS-> Realised that a "debug" outbox could be useful for testing purposes as well as debug |
[10:49] < Lawouach_> probably |
[10:49] < MS-> No idea if approach is useful beyond this context of course :) |
[10:49] < Lawouach_> It's funny because I'm hammeing the ejabberd server with XMPP stanzas |
[10:49] < Lawouach_> and it's the bottleneck of my system right now |
[10:49] < MS-> ejabberd is ? |
[10:49] < Lawouach_> I think it's not erlang's fault but the way ejabberd is architecture doesn't always make the best of erlang |
[10:49] < MS-> Interesting |
[10:53] < Lawouach_> but it's only the case when ejabberd is really under stress |
[10:53] < Lawouach_> at low volume, it's very fast and my code becomes the bottleneck of my throughput |
[10:54] *** MS- nods |
[10:54] < MS-> That's really interesting |
[10:55] < Lawouach_> Just to give you an idea of how it works |
[10:55] < Lawouach_> Like I explained the other day, XMPP allows a server to register new external components as services |
[10:55] < Lawouach_> With ejabberd, once your service is registered, ejabberd forwards all stanzas of the namespace the service support to the service |
[10:55] < Lawouach_> over a regular socket |
[10:56] < Lawouach_> So I have such a service running headstock in a process |
[10:56] < Lawouach_> and connexted to ejabberd via a socket |
[10:57] < Lawouach_> Now it does appear that internally ejabberd doesn't make the best of erlang in that specific case and it would appear (but I have to confirm it yet) that every stanza is bufferized by ejabberd |
[10:57] < Lawouach_> so that it is sent like a FIFO to the external service |
[10:58] < Lawouach_> I'm wondering if that's the best idea |
[10:58] < Lawouach_> erlang is fantastic to spawn simple erlang processes that could write to the socket in parallel |
[10:58] < Lawouach_> increasing the socket throughput |
[10:59] < Lawouach_> But then again, there would probably need some sort of synchronising element on the socket |
[10:59] < Lawouach_> so that each stanza is written to the socket as a whole |
[11:02] < MS-> I see |
[11:03] < MS-> Is it possible to tell ejabberd to make multiple connections in parallel to a service handler? |
[11:03] < MS-> It's possible it's working on the assumption that sending stanzas in parallel risking out of order processing is potentially problematic |
[11:07] < Lawouach_> 1. Not that I'm aware of. It's a limitation in the spec rather than in ejabberd IMO |
[11:07] < MS-> k |
[11:07] < Lawouach_> 2. I'm not sure message ordering is compulsory |
[11:07] *** MS- nods |
[11:08] < MS-> It's not something I've looked at, hence the basic qs :) |
[11:08] < Lawouach_> The thing is, to become a valid service, the external process must open a stream (similar to what a XMPP client would do) |
[11:08] < Lawouach_> however it would be interesting if ejabberd could perform some load balancing itself and allow several external components to serve the same namespace |
[11:10] < MS-> I see |
[11:10] < MS-> yes |
[11:16] < Lawouach_> Mind you, ejabberd is good at being clustered |
[11:16] < Lawouach_> I can only load-balnce using TCP between several ejabberd nodes |
[11:20] < MS-> I see |
[11:20] < MS-> k |
[11:21] < Lawouach_> That being said, it shows that erlang isn't magic |
[11:21] < Lawouach_> You need: |
[11:21] < Lawouach_> 1. To really know the language to make the best of it |
[11:21] < Lawouach_> 2. Have to deal with things that fundamentally can't be made concurrent like a single socket |
[11:22] < Lawouach_> at least the socket can, but the protocol can't in this case :) |
[11:22] < MS-> Absolutely |
[11:39] < MS-> OFFS. I've made a such a stable time source I can't break it |
[11:39] < MS-> :) |
[11:39] < MS-> Accuracy is sub millisecond. Want to increase that to >30ms |
[11:39] < MS-> lunch perhaps and come back later |
[11:42] < Lawouach_> :) |
[11:42] < Lawouach_> I had not considered it but it seems I can open more than one connection to the ejabberd service listener |
[11:42] < Lawouach_> ejabberd will load-balance internally apparently |
[11:42] < MS-> :) |
[11:42] < Lawouach_> let's see |
[11:42] < MS-> cool |
[11:51] < MS-> yay, I have successfully created an accurately crappy timesource, that's always out by about 1 frame per second :) |
[11:53] *** vmlemon_ has joined #kamaelia |
[12:21] < MS-> now not so sure. I think it's autocorrecting itself for drift now |
[12:28] *** vmlemon_1 has joined #kamaelia |
[12:42] *** vmlemon has joined #kamaelia |
[13:14] < vmlemon_1> Hi |
[13:18] *** Uraeus has joined #kamaelia |
[13:24] *** Davbo has joined #kamaelia |
[14:45] *** eikenberry has joined #kamaelia |
[15:18] *** Davbo_ has joined #kamaelia |
[15:35] *** vmlemon_ has joined #kamaelia |
[16:08] *** vmlemon_ has joined #kamaelia |
[16:28] *** MS- has parted #kamaelia |
[16:34] *** vmlemon_ has joined #kamaelia |
[17:09] *** vmlemon_ has joined #kamaelia |
[17:43] *** vmlemon_ has joined #kamaelia |
[18:34] *** vmlemon_1 has joined #kamaelia |
[18:41] *** MS- has joined #kamaelia |
[19:14] *** vmlemon_ has joined #kamaelia |
[22:01] *** vmlemon_ has joined #kamaelia |
[22:49] *** vmlemon_ has joined #kamaelia |
[23:12] *** eikenberry_ has joined #kamaelia |
[23:59] *** eikenberry_ is now known as eikenberry |