Comments (11)
from gleam.
Okay, thank you! I appreciate the work and the quick response.
from gleam.
Please let me know the use case you have in mind.
from gleam.
No problem. Basically what I want to do is something like this:
flow.New().Source(
// stream of protobuf messages
).Map(
// demarshal protobuf
).Filter(
// ...
).Map(
// protobuf to json
).Map(
// store into redis
).Run()
AFAIK, to do the above in gleam I'd need some external programs or I'd need to write the logic in Lua. Both of these options create additional dependencies (e.g. a redis client library for lua or having to ship these additional binaries).
from gleam.
gleam can automatically ship the binaries to the remote agents for each program, same as glow. This piece of function is not turned on at this moment, but should be fairly easy to do.
from gleam.
Do you mean it'd be easy to allow "mappers" to be written in go again, and that you'd just have to ship the binary from the driver like in glow? That'd be awesome. Glow handles my use case well right now but I would like to eventually upgrade to Gleam to take advantage of all the improvements.
Anyhow, thanks for the consideration/time.
from gleam.
I added an example to use Go code. It is not super nice since it is not that straight forward, but it can get the job done to run mapper in pure Go code.
See https://github.com/chrislusf/gleam/tree/master/examples/word_count_in_go
I am going to add more documentation tomorrow.
from gleam.
Awesome! Nice that you still have a way to distribute go code. As you say, it looks a bit cumbersome at least relative to doing the same in Glow, but it does handle my use case. I'm currently prototyping a project using Glow, I'll try to adapt it to Gleam and report back.
from gleam.
documentation is here https://github.com/chrislusf/gleam/wiki/Write-Mapper-Reducer-in-Go
from gleam.
I changed the implementation overnight. Please check example and documentation again. Now it is one single binary. Just need to register the mapper or reducer at the beginning of the main program.
from gleam.
That looks a lot more convenient! I'll try to give it a spin this week.
from gleam.
Related Issues (20)
- how to set parallesim when in distributed mode HOT 2
- Performance benchmarks
- any way similiar to flink/storm keyedBy to have data specific for 1 user always go into same single partition/thread? HOT 2
- wordcount executed in testing framework with EOF errors HOT 3
- standalone kafkareader no print HOT 12
- Is it possible to register mappers dynamically? HOT 4
- Does gleam have 32 bit system support? HOT 1
- Performance Optimization is required HOT 2
- Possible copy-paste error message HOT 1
- Possible risk of temporary file collision HOT 1
- Optimisation: S3/GS files shouldn't need to touch disk
- Support for reading multiple files from S3
- backward incompatible change in github.com/xitongsys/parquet-go HOT 1
- .
- [Feature] Supporting SeaweedFS with Gleam
- Are there any consumption cases of RocketMQ
- Question: Query To AST parser HOT 1
- Is this project active? HOT 2
- K8s executor failed to start: "no such file or directory" HOT 1
- Running Gleam Tasks external to a gleam cluster HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gleam.