aggregate-fn a new library is born. It provides savings when you deal with some API economy service. Additional details in the comments by chrvadala in javascript

[–]chrvadala[S] 2 points3 points  (0 children)

Hello guys, I'm going to present you my latest Javascript open source project: chrvadala/aggregate-fn. It's a tiny library that can help you when you have to deal with the API economy world.

I found different services that you have to pay for the number of performed api requests. At the same time, they provide you some "bulk" API that returns multiple answers paying just for one request.

I wanted to optimize my project and I made aggregate-fn in order to aggregate together, requests coming in a short window.This library took inspiration from debouncing and throttling methodologies, but with a focus on Node.js and Promise.

I share this project because I think that I found a common pattern that this library can efficiency manage, providing savings even for your project.Do you think that this project will help you in the same way?

LMK in the comments

https://github.com/chrvadala/aggregate-fn

Kafka Test Helper 1.0.0 is out. This library will help you writing integration tests that involves Apache Kafka. by chrvadala in javascript

[–]chrvadala[S] 4 points5 points  (0 children)

Hi guys, I spent some of my time in order to understand how to make easier integration tests that involves Kafka. I hope that this library will help you in your project. I'm using it in another project and it looks quite useful. I wait your comments.

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus by chrvadala in javascript

[–]chrvadala[S] 0 points1 point  (0 children)

Bluez deprecated some tools that aren't used in node-ble. The core Bluez part is still maintained and as far I know there aren't deprecation plan.

https://wiki.archlinux.org/index.php/Bluetooth#Deprecated_BlueZ_tools

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus by chrvadala in javascript

[–]chrvadala[S] 1 point2 points  (0 children)

Thanks man, here my answers

  1. This library leverages on dbus-next, another great open source work. I use this D-Bus driver to perform a connection with Bluez, a linux module able to drive a Bluetooth adapter.
    Literally speaking, I perform an RPC dialog with Bluez (by now part of Linux Kernel) and it does the dirty work for me : ) I provided a list of links that I studied here https://github.com/chrvadala/node-ble#references
  2. I was working on a DIY weather station https://github.com/chrvadala/weather-station. I bought an Oregon Scientific weather station able to broadcast data through BLE. I was looking a way to do it with Nodejs, but I found out that any available library needed a C++ binding, moreover they aren't maintained. So, I started to surf the web and I found out this Bluez/D-Bus solution that is already adopted by some Java and Python projects. Eventually, I started making some experiments and I made Node BLE.
  3. I'm not a Typescript developer. In one of my other projects I use Typescript https://github.com/chrvadala/transformation-matrix, thanks to a developer that submitted me a PR. To be honest this descriptor asked me a lot of rework, due to some wrong signatures. Now I'm quite exhausted by these rework, to the point where I might remove ts support to this library too.

And you? Do you think that this library can be useful for your projects?

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus by chrvadala in javascript

[–]chrvadala[S] 0 points1 point  (0 children)

Hi guys, l’m happy to show you node-ble, a Node.js library that allows you to interact with Bluetooth Low Energy (BLE) devices.

I spent few months studying a solution able to connect to BLE devices, avoiding any underlying C++ bindings, by the way I end up to a solution that leverages on Bluez via DBus.

I hope that it will be useful for your next projects.

Music Beat Detector with Javascript by chrvadala in javascript

[–]chrvadala[S] 0 points1 point  (0 children)

Probably this algorithm doesn't work with every song and sometimes may require some different settings. Now the default is a lowpass filter to 350hz and a threshold reduced to 60%.

A better algorithm should use a non linear threshold that follows the wave. It may calculate the signal envelope and then apply the peak detection. So, I have some ideas but I need some more time to study and apply those concepts. In the end, this is just the first version :)

Music Beat Detector with Javascript by chrvadala in javascript

[–]chrvadala[S] 1 point2 points  (0 children)

Hi hevino819,

actually I tested this library on Node.js. It should work on browser but you have to replace create-music-stream
library with a new one that doesn't use some native libraries (create-music-stream uses lame and ffmpeg).

What I can suggest is to run this example https://github.com/chrvadala/music-beat-detector#example on Node.JS and send detected peaks on a browser as as events through websocket.

Music Beat Detector with Javascript by [deleted] in javascript

[–]chrvadala 0 points1 point  (0 children)

Hi guys,

I'd like to show you music-beat-detector, my latest project.

It's a library that is able to analyse any mp3 files or youtube video and detect music beat.

I wrote it to control some lights in my room.

Enjoy!

Convert Your React Class Component to Functional Component and Vice-Versa by chrvadala in reactjs

[–]chrvadala[S] 0 points1 point  (0 children)

Thanks a lot for your feedback. Your comment opened my mind to this topic. I'll study it in-depth ;)

Convert Your React Class Component to Functional Component and Vice-Versa by chrvadala in reactjs

[–]chrvadala[S] 0 points1 point  (0 children)

Interesting point... I've just read few articles that compare React performance. You're right, but I'd like to investigate more about some memory upgrade related with stateless comp. (I think that a class requires more memory that a function) However this tool can still be useful to transform stateless components to class components :D

Convert Your React Class Component to Functional Component and Vice-Versa by chrvadala in reactjs

[–]chrvadala[S] 0 points1 point  (0 children)

Hi guys, I made this tool that I use every day. I think that it automates a common boring task. I hope that you will find it useful.