On stage yesterday for DevCon6 Conference ; a live coding show in Paris organized by Programmez Magazine. My session was about the C language of Daddy ! And the implementation of LMDB NoSQL under Windows. It’s fast ! 1.000.000 rows inserted in 2 seconds !
Using OpenLDAP-LMDB in Relase x64, I can put elements at this stages:
- 10.000 simples key/values in 16 ms
- 100.000 simples key/values in 140 ms
- 300.000 simples key/values in 421 ms. My record !
- 1.000.000 simples key/values in 6s -> in this case, the DATA.MDB work data file is 820MB in size.
LMDB is one of the fastest NoSQL it exists and I know.
If you need like me, a logger for your deamons and services… just look at this simple logger:
void Init(std::wstring name);
void WriteLog(std::wstring message);
You put the name of the file in Init() method as then, you just call WriteLog() ! Let’s ook at the code impl:
void CLogger::Init(std::wstring name)
_name = name;
_stprintf_s(szPath, _T("%s\\%s"), szTemp, name.c_str());
_path = szPath;
void CLogger::WriteLog(std::wstring message)
std::string path(_path.begin(), _path.end());
memset(&st, 0, sizeof(SYSTEMTIME));
_T("%02d:%02d:%02d.%03d - INFO - %s\r\n"),
st.wHour, st.wMinute, st.wSecond, st.wMilliseconds,
std::wstring wsz = sz;
std::string msgToWrite(wsz.begin(), wsz.end());
HANDLE hFile = ::CreateFileA(path.c_str(),
LONG l = 0;
::SetFilePointer(hFile, 0, &l, FILE_END);
DWORD dwLen = 0;
I recently have done a 2 days event in MS Office about programming MXCHIP and Azure IoT stuff. It’s amazing what that kind of little hardware can achieve. For now, I have to make a demo for my managers.
The code and compilers are included into VSCode extensions and SDK Kit.
Everything is simple in the demo mode. But in real, you spend a lot of time… :)
The open-source community are not very happy. In my opinion, it’s the same thing that when Oracle buy Java and MySQL… You think of something just foolish. The problem is that Microsoft tell us that the company has changed and they do Open-Source.
First, we don’t have all the same definitions of what is Open-Source development. Microsoft vision is not Richard Stallman vision.
Some people tell us that a lot of companies/people will leave Github. True or False ?
Let’s take time to see and we will comment in 6 months.
Monday 25 June 2018, I will be a speaker for a Programmez magazine event.
I will code C live ! It will be about coding LMDB for Windows as a DLL and testing a client that can make 1.000.000 rows in 1 second. Can you say that ?
Source code from https://github.com/LMDB/lmdb. To make a DLL, it’s just some syntax errors compilation in MSVC 17. But if builds after minor corrections.
This week has been a busy week. I have changed from an appartment to another from Nogent sur Marne to Fontenay sous Bois. Putting all the little things in bags… It’s done. I am tired.
Look my desktop, it’s cool: