Re: [Firebird-devel] Coroutines
With callbacks you will smear code over two methods: caller, callback. Also you will need to keep some state! AFAIU coroutins solve this problem in more elegant manner using saving running context. Operator A push a portion of data to pipe and *goto* operator B which pull the portion process it and push the result to the next operator. In some time operator A get CPU again and produce neew portion. Note: every operator located in SINGLE place of code, but you keep pipeline (streams) whithout huge buffers. 2016-10-26 17:51 GMT+03:00 Dimitry Sibiryakov: > 26.10.2016 16:41, Adriano dos Santos Fernandes wrote: >> We can't *callback* our caller. > >Why not? It is a matter of adding one method to your new API: > > class IEater > { > int pushData(IMessageMetadata* metadata, void* buffer); > }; > > IStatus* IAttachment::execute(const char* SQL, IMessageMetadata* > inputMetadata, void* > inputData, IEater* outputCallback); > > > -- >WBR, SD. > > -- > The Command Line: Reinvented for Modern Developers > Did the resurgence of CLI tooling catch you by surprise? > Reconnect with the command line and become more productive. > Learn the new .NET and ASP.NET CLI. Get your free copy! > http://sdm.link/telerik > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel -- С уважением Роман Симаков Директор департамента развития системных продуктов ООО "Ред Софт" skype: simakov_roman www.red-soft.ru -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Coroutines
Why not callbacks? On 26 October 2016 at 15:51, Roman Simakovwrote: > 2016-10-26 15:24 GMT+03:00 Dimitry Sibiryakov : >> It must be more than just nice to add gigabyte of boost sources or 30 >> megabytes library >> to Firebird > > I guess it's not about boost but about approach. I thought about the > same approach in SciDB to provide nice way to implement new operators > in one peace of well readable code but keep a pipeline processing of > data. > > -- > Roman Simakov > > -- > The Command Line: Reinvented for Modern Developers > Did the resurgence of CLI tooling catch you by surprise? > Reconnect with the command line and become more productive. > Learn the new .NET and ASP.NET CLI. Get your free copy! > http://sdm.link/telerik > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel -- Egor Pugin -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Coroutines
2016-10-26 15:24 GMT+03:00 Dimitry Sibiryakov: > It must be more than just nice to add gigabyte of boost sources or 30 > megabytes library > to Firebird I guess it's not about boost but about approach. I thought about the same approach in SciDB to provide nice way to implement new operators in one peace of well readable code but keep a pipeline processing of data. -- Roman Simakov -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] [FB-Tracker] Created: (CORE-5382) Incorrect processing (truncation) of SQL statement with length 10MB+1
Incorrect processing (truncation) of SQL statement with length 10MB+1 - Key: CORE-5382 URL: http://tracker.firebirdsql.org/browse/CORE-5382 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 3.0.2 Environment: Firebird 3.0.2.32619, IBProvider, direct INET-connection to FB3 (without fbclient.dll). Reporter: Kovalenko Dmitry SQL Statement (total length = 10*1024*1024+1): "select/*-- ---*/ID from DUAL " --- Prepare error: Dynamic SQL Error SQL error code = -204 Table unknown DUA --- 1. I think, the error message must be a little another. 2. Special for this case, I created the new table "DUA" and server prepared original query without any problem. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] Coroutines
26.10.2016 13:33, Adriano dos Santos Fernandes wrote: > This is so nice (and apparent fast in Linux) that I'm going to > investigate further. It must be more than just nice to add gigabyte of boost sources or 30 megabytes library to Firebird. -- WBR, SD. -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] Coroutines
Hi! Learning node.js and its single-threaded model with asynchronous execution, I looked for things that can improve Firebird as well. It's obvious that things like boost asio may be a good thing when dealing with sockets and filesystem, but is not subject of this thread. Today I got up thinking in coroutines and then I thought how good it would be in the context of Firebird statement execution. Statement execution is very dirty code most because semantics of SUSPEND. Here I paste very small hand-made statement execution with SUSPEND semantics using boost coroutine (with v1, but there is a v2 library). http://pastebin.com/VR7KcnTa This is so nice (and apparent fast in Linux) that I'm going to investigate further. Architecture support is mentioned here: http://www.boost.org/doc/libs/1_61_0/libs/context/doc/html/context/architectures.html. I didn't even evaluated this table with attention now. I think some disruptive ideas sometimes are good to bring new ideas. Adriano -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
Re: [Firebird-devel] error: '::lockf' has not been declared
On 10/26/16 12:29, marius adrian popa wrote: Any ideas ? This happens only on Android build with master (3.0 branch builds ok) make yvalve make[4]: Entering directory '/home/mariuz/Work/firebird/firebird/gen' /home/mariuz/android-ndk-r13/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/x86_64-linux-android-g++ -I/home/mariuz/Work/firebird/firebird/src/include/gen -I/home/mariuz/Work/firebird/firebird/src/include -ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 -I/home/mariuz/Work/firebird/firebird/extern/libtommath --sysroot=/home/mariuz/android-ndk-r13/platforms/android-24/arch-x86_64 -I/home/mariuz/android-ndk-r13/platforms/android-24/arch-x86_64/usr/include -I/home/mariuz/Work/firebird/firebird/gen/cross -fno-omit-frame-pointer -pthread -fno-rtti -pthread -std=c++11 -c /home/mariuz/Work/firebird/firebird/src/yvalve/gds.cpp -o /home/mariuz/Work/firebird/firebird/temp/Release/yvalve/gds.o In file included from /home/mariuz/Work/firebird/firebird/src/yvalve/gds.cpp:52:0: /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h: In function 'int os_utils::lockf(int, int, off_t)': /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h:185:9: error: '::lockf' has not been declared rc = ::lockf(fd, cmd, len); ^ /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h:185:9: note: suggested alternative: /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h:176:13: note: 'os_utils::lockf' inline int lockf(int fd, int cmd, off_t len) ^ This patch should help. diff --git a/src/common/os/os_utils.h b/src/common/os/os_utils.h index 00d4933..c4c7085 100644 --- a/src/common/os/os_utils.h +++ b/src/common/os/os_utils.h @@ -173,6 +173,8 @@ namespace os_utils } #ifndef WIN_NT + +#ifndef HAVE_FLOCK inline int lockf(int fd, int cmd, off_t len) { int rc; @@ -188,6 +190,7 @@ namespace os_utils return rc; } +#endif inline int mkstemp(char* templ) { -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerikFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
[Firebird-devel] error: '::lockf' has not been declared
Any ideas ? This happens only on Android build with master (3.0 branch builds ok) make yvalve make[4]: Entering directory '/home/mariuz/Work/firebird/firebird/gen' /home/mariuz/android-ndk-r13/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin/x86_64-linux-android-g++ -I/home/mariuz/Work/firebird/firebird/src/include/gen -I/home/mariuz/Work/firebird/firebird/src/include -ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DANDROID -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 -I/home/mariuz/Work/firebird/firebird/extern/libtommath --sysroot=/home/mariuz/android-ndk-r13/platforms/android-24/arch-x86_64 -I/home/mariuz/android-ndk-r13/platforms/android-24/arch-x86_64/usr/include -I/home/mariuz/Work/firebird/firebird/gen/cross -fno-omit-frame-pointer -pthread -fno-rtti -pthread -std=c++11 -c /home/mariuz/Work/firebird/firebird/src/yvalve/gds.cpp -o /home/mariuz/Work/firebird/firebird/temp/Release/yvalve/gds.o In file included from /home/mariuz/Work/firebird/firebird/src/yvalve/gds.cpp:52:0: /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h: In function 'int os_utils::lockf(int, int, off_t)': /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h:185:9: error: '::lockf' has not been declared rc = ::lockf(fd, cmd, len); ^ /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h:185:9: note: suggested alternative: /home/mariuz/Work/firebird/firebird/src/yvalve/../common/os/os_utils.h:176:13: note: 'os_utils::lockf' inline int lockf(int fd, int cmd, off_t len) ^ make.rules:106: recipe for target '/home/mariuz/Work/firebird/firebird/temp/Release/yvalve/gds.o' failed make[4]: *** [/home/mariuz/Work/firebird/firebird/temp/Release/yvalve/gds.o] Error 1 make[4]: Leaving directory '/home/mariuz/Work/firebird/firebird/gen' Makefile:240: recipe for target 'cross2' failed make[3]: *** [cross2] Error 2 make[3]: Leaving directory '/home/mariuz/Work/firebird/firebird/gen' Makefile:211: recipe for target 'cross_process' failed make[2]: *** [cross_process] Error 2 make[2]: Leaving directory '/home/mariuz/Work/firebird/firebird/gen' Makefile:74: recipe for target 'firebird' failed make[1]: *** [firebird] Error 2 make[1]: Leaving directory '/home/mariuz/Work/firebird/firebird/gen' Makefile:6: recipe for target 'firebird' failed make: *** [firebird] Error 2 -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerikFirebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel