Status of the C++ daemon, Moving objects with references to other members of the same class

71 views
Skip to first unread message

Pedro Larroy

unread,
Apr 21, 2014, 3:58:39 AM4/21/14
to clearsk...@googlegroups.com
Hi

I spent many hours in a transcontinental flight tracking down a bug on the Share class, was displayed when moving a Share, the sqlite3pp::statements would get moved and the reference to the sqlite3pp::database would be invalidated, as the object to which they refer was destroyed, in this case the database. I identified this pattern two times in this class. This is a C++11 mistake that is not obvious and easy to do. It's fixed in the latest commits to master.

I also got a rudimentary GET command working, still is not pipelined as the protocol suggests.  So I think in the following weeks/month we should be able to use the C++ daemon so synchronize files without encryption.

It would be great if somebody finds the time to improve the status of the cryptographic parts.

I'm excited to getting closer to a first prototype.

Regards.

Steven Jewel

unread,
Apr 21, 2014, 12:24:46 PM4/21/14
to clearsk...@googlegroups.com
On 04/21/2014 01:58 AM, Pedro Larroy wrote:
> I also got a rudimentary GET command working, still is not pipelined as
> the protocol suggests.

I wouldn't worry about pipelining. It's an optimization for small
files, but in practice it will only impact the first sync.

> So I think in the following weeks/month we
> should be able to use the C++ daemon so synchronize files without
> encryption.

That will be great!


> It would be great if somebody finds the time to improve the status of
> the cryptographic parts.

I've been messing with it a little bit. The last time I looked at it I
was having a hard time deciding how to best wrap both TCP connections
and uTP connections. Perhaps it'd be better to get it to work just with
uTP to begin with.

Steven

pe...@larroy.com

unread,
May 4, 2014, 8:33:57 AM5/4/14
to clearsk...@googlegroups.com, clear...@stevenjewel.com
Hi

I merged the refactor to default. Now it should be easier to implement messages from control and extensions. I separated the core functionality in src/cs/core

So to implement control.md for example, we can make a src/cs/control and copy coder.* and message.* adapted to the particular messages that need to be implemented.

I think decoupling ProtocolState and cs::core::Protocol will allow us to have a better design. Now I'm more satisfied with how messages are handled.

If you have any other ideas don't hesitate to write them on the list.

Happy hacking!

Pedro.

Pedro Larroy

unread,
May 10, 2014, 4:47:34 PM5/10/14
to clearsk...@googlegroups.com, clear...@stevenjewel.com, pe...@larroy.com
Hi

Finished refactoring the message protocol with binary size prefixes:

https://github.com/larroy/clearskies_core/blob/master/test/protocolstate.cpp#L139


Anyone up for updating the protocol description?


Pedro

Steven Jewel

unread,
May 10, 2014, 11:34:46 PM5/10/14
to clearsk...@googlegroups.com, pe...@larroy.com
On 05/10/2014 02:47 PM, Pedro Larroy wrote:
>
> Finished refactoring the message protocol with binary size prefixes:
>
> https://github.com/larroy/clearskies_core/blob/master/test/protocolstate.cpp#L139
>
>
> Anyone up for updating the protocol description?

Great work! I will do it next week if nobody beats me to it.

Steven
Reply all
Reply to author
Forward
0 new messages