1. why library does not serve as a factory for objects?

I think it should, so one can write:

library := MyLibrary new.
socket := library createTcpSocket.

socket connectTo: (library ipv4Address: 'x.y.z' port: 1000)

I think it could simplify a lot of things.

2. what is OCNConversationTcpSocket and what its role? As to me it is
unnecessary.
I'd rather leave only single socket class in kernel. And for others, i
think it would be better to use delegation instead of subclassing.
So you will have:
MyCustomRoleSocket (socket) -> OCNSocket (socketid, library) -> library

with such encapsulation, you could ensure that you won't leak unwanted
public/generic behavior outside of your model.
While if you subclassing, it always takes everything as granted, and
then it is unclear for user, what is safe to use and how.

3. Why OCNSocket keeps track its "state"? I think it would be better
to always ask system about its state,
because you never know for sure..

4. error handling is below the waterline and needs to be addressed properly :)
See the amount of error codes which connect() could produce. Where are they?
Also, there is a lot of missing things for finer socket controls, like
select(), poll(), fnctl()
setsockopt() etc.. with all flags.
So you have a lot to do :)

5. where i can put my code for NativeBoost backend of Ocean?

6. I understand that project is far from being complete, so don't
treat my comments as an arrogant asshole. Just my thoughts,
how it would be better to implement :)

I created couple of classes and couple of tests (i could create
socket, connect to remote host), but i stopping now,
since of the above issues.
Ideally, i would like to introduce you to NativeBoost and to see if
you like it and if you can use it without my direct involvement
(because it's already too much on my plate anyways ;)


-- 
Best regards,
Igor Stasenko AKA sig.

Reply via email to